Differences Between: [Versions 400 and 403]
(no description)
File Size: | 170 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
Bagging:: (8 methods):
__construct()
setSubsetRatio()
setClassifer()
train()
getRandomSubset()
initClassifiers()
initSingleClassifier()
predictSample()
__construct(int $numClassifier = 50) X-Ref |
Creates an ensemble classifier with given number of base classifiers Default number of base classifiers is 50. The more number of base classifiers, the better performance but at the cost of procesing time |
setSubsetRatio(float $ratio) X-Ref |
This method determines the ratio of samples used to create the 'bootstrap' subset, e.g., random samples drawn from the original dataset with replacement (allow repeats), to train each base classifier. return: $this |
setClassifer(string $classifier, array $classifierOptions = []) X-Ref |
This method is used to set the base classifier. Default value is DecisionTree::class, but any class that implements the <i>Classifier</i> can be used. <br> While giving the parameters of the classifier, the values should be given in the order they are in the constructor of the classifier and parameter names are neglected. return: $this |
train(array $samples, array $targets) X-Ref |
No description |
getRandomSubset(int $index) X-Ref |
No description |
initClassifiers() X-Ref |
No description |
initSingleClassifier(Classifier $classifier) X-Ref |
No description |
predictSample(array $sample) X-Ref |
return: mixed |