#ifndef DECISIONTREE_H
#define DECISIONTREE_H

#include "minmax.h"

/**
 * @brief The DecisionTree class holds functions for ID3 and Random Forest classes
 * @autor Jakub Srom
 * @required minmax.h
 */
class DecisionTree:public MinMax
{
public:
    DecisionTree();

    std::vector <probabilityPair> countProbabilities(std::vector < std::vector<std::string> > vec, std::map <std::string, double> cls);
    double countClassEntropy(std::map <std::string, double> cls);
    int countInstances(std::vector < std::vector<std::string> > vec);

    std::vector < std::vector<std::string> > divideData(std::vector < std::vector<std::string> > vec, std::string Atr);

    std::vector < std::vector<std::string> > returnDividedData(std::vector < std::vector<std::string> > vec, int column);

    std::map <std::string, double> countOccurances(std::vector < std::vector<std::string> > DataToDivide);

    double countEntropy(std::vector <probabilityPair> vec);
    double countInfoGain(std::vector < std::vector<std::string> > vec, int column, std::map <std::string, double> cls);

    std::vector < std::vector<std::string> > divideWhole(std::vector < std::vector<std::string> > Data, std::string atribute, int column);
};

#endif // DECISIONTREE_H
