Пример #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));
     }
 }
Пример #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");
        }
    }