-
Notifications
You must be signed in to change notification settings - Fork 0
Current implementation of SPORF
parthgvora edited this page May 3, 2021
·
6 revisions
The current implementation of SPORF is located on the main branch of the repository.
The usage of SPORF is exactly the same as scikit-learn's Random Forest algorithm, but with two extra parameters. These parameters are implemented in the same way as RerF
- max_features is a float (0.0, 1.0) that controls the output dimension of SPORF after applying the projection matrix. Specifically, the output dimension is equal to int(max_features * n_features), where n_features is the number of features of the data.
- feature_combinations is a float (0.0, n_features) that controls the average number of features to consider at a split.
To build and run SPORF, simply use the following commands:
from oblique_forests.sporf import ObliqueForestClassifier
clf = ObliqueForestClassifier(**params)
clf.fit(X_train, y_train)
y_predict = clf.predict(X_test)