4.4 KiB
Hyperparameters
Hyperparameter | Type/Values | Default | Meaning | |
---|---|---|---|---|
estimator | <sklearn.BaseEstimator> | Stree() | Base estimator used to build each element of the ensemble. | |
n_jobs | <int> | -1 | Specifies the number of threads used to build the ensemble (-1 equals to all cores available) | |
random_state | <int> | None | Controls the pseudo random number generation for shuffling the data for probability estimates. Ignored when probability is False. Pass an int for reproducible output across multiple function calls |
|
max_features | <int>, <float> or {“auto”, “sqrt”, “log2”} |
None | The number of features to consider when looking for the split: If int, then consider max_features features at each split. If float, then max_features is a fraction and int(max_features * n_features) features are considered at each split. If “auto”, then max_features=sqrt(n_features). If “sqrt”, then max_features=sqrt(n_features). If “log2”, then max_features=log2(n_features). If None, then max_features=n_features. |
|
max_samples | <int> | 3 | Degree of the polynomial kernel function (‘poly’). Ignored by all other kernels. | |
n_estimators | <int> | 100 | The number of trees the ensemble is going to build | |
be_hyperparams | <str> | "{}" | Hyperparameteres passed to the base estimator, i.e. "{\"C\": 17, \"kernel\": \"rbf\"}" |
** Splitting in a STree node
The decision function is applied to the dataset and distances from samples to hyperplanes are computed in a matrix. This matrix has as many columns as classes the samples belongs to (if more than two, i.e. multiclass classification) or 1 column if it's a binary class dataset. In binary classification only one hyperplane is computed and therefore only one column is needed to store the distances of the samples to it. If three or more classes are present in the dataset we need as many hyperplanes as classes are there, and therefore one column per hyperplane is needed.
In case of multiclass classification we have to decide which column take into account to make the split, that depends on hyperparameter split_criteria, if "impurity" is chosen then STree computes information gain of every split candidate using each column and chooses the one that maximize the information gain, otherwise STree choses the column with more samples with a predicted class (the column with more positive numbers in it).
Once we have the column to take into account for the split, the algorithm splits samples with positive distances to hyperplane from the rest.