Exemplo n.º 1
0
bool RegressionTree::computeBestSpilt( const RegressionData &trainingData, const Vector< UINT > &features, UINT &featureIndex, Float &threshold, Float &minError ){
    
    switch( trainingMode ){
        case BEST_ITERATIVE_SPILT:
            return computeBestSpiltBestIterativeSpilt( trainingData, features, featureIndex, threshold, minError );
            break;
        case BEST_RANDOM_SPLIT:
            //return computeBestSpiltBestRandomSpilt( trainingData, features, featureIndex, threshold, minError );
            break;
        default:
            Regressifier::errorLog << "Uknown trainingMode!" << std::endl;
            return false;
            break;
    }
    
    return false;
}
bool DecisionTreeNode::computeBestSpilt( const UINT &trainingMode, const UINT &numSplittingSteps,const ClassificationData &trainingData, const vector< UINT > &features, const vector< UINT > &classLabels, UINT &featureIndex, double &minError ){
    
    switch( trainingMode ){
        case Tree::BEST_ITERATIVE_SPILT:
            return computeBestSpiltBestIterativeSpilt( numSplittingSteps, trainingData, features, classLabels, featureIndex, minError );
            break;
        case Tree::BEST_RANDOM_SPLIT:
            return computeBestSpiltBestRandomSpilt( numSplittingSteps, trainingData, features, classLabels, featureIndex, minError );
            break;
        default:
            errorLog << "computeBestSpilt(...) - Uknown trainingMode!" << endl;
            return false;
            break;
    }
    
    return false;
}