Example #1
0
 // Flext attribute setters
 void dtree::set_training_mode(int training_mode)
 {
     bool success = grt_dtree.setTrainingMode(training_mode);
     
     if (success == false)
     {
         error("unable to set training_mode, hint: must be a value between 0 and " + std::to_string(GRT::DecisionTree::NUM_TRAINING_MODES));
     }
 }
Example #2
0
    // Flext attribute setters
    void dtree::set_training_mode(int training_mode)
    {
        GRT::Tree::TrainingMode training_mode_ = GRT::Tree::TrainingMode::BEST_ITERATIVE_SPILT;
        
        try
        {
            training_mode_ = get_grt_training_mode(training_mode);

        }
        catch (std::exception& e)
        {
            error("unable to set training_mode, hint: must be a value between 0 and " + std::to_string(GRT::Tree::NUM_TRAINING_MODES));
            return;
        }
        
        bool success = grt_dtree.setTrainingMode(training_mode_);
        
        if (success == false)
        {
            error("unable to set training mode");
        }
    }
Example #3
0
 void dtree::get_remove_features_at_each_split(bool &remove_features_at_each_split) const
 {
     remove_features_at_each_split = grt_dtree.getRemoveFeaturesAtEachSpilt();
 }
Example #4
0
 void dtree::get_max_depth(int &max_depth) const
 {
     max_depth = grt_dtree.getMaxDepth();
 }
Example #5
0
 void dtree::get_min_samples_per_node(int &min_samples_per_node) const
 {
     min_samples_per_node = grt_dtree.getMinNumSamplesPerNode();
 }
Example #6
0
 void dtree::get_num_splitting_steps(int &num_splitting_steps) const
 {
     num_splitting_steps = grt_dtree.getNumSplittingSteps();
 }
Example #7
0
 // Flext attribute getters
 void dtree::get_training_mode(int &training_mode) const
 {
     training_mode = grt_dtree.getTrainingMode();
 }
Example #8
0
 void dtree::set_remove_features_at_each_split(bool remove_features_at_each_split)
 {
     grt_dtree.setRemoveFeaturesAtEachSpilt(remove_features_at_each_split);
 }
Example #9
0
 void dtree::set_max_depth(int max_depth)
 {
     grt_dtree.setMaxDepth(max_depth);
 }
Example #10
0
 void dtree::set_min_samples_per_node(int min_samples_per_node)
 {
     grt_dtree.setMinNumSamplesPerNode(min_samples_per_node);
 }
Example #11
0
 void dtree::set_num_splitting_steps(int num_splitting_steps)
 {
     grt_dtree.setNumSplittingSteps(num_splitting_steps);
 }