__init__() takes hyperparameters, but not data. In our case, that would be the tree, but not the comptable.
fit() takes training data and fits the model. In our case, comptable is training data.
predict() takes test data and predicts labels. In our case, comptable is the test data as well.
If we organize the tree's attributes similarly to DecisionTreeClassifier, we might be able to directly use sklearn's plot_tree.
It would also be really cool if we could figure out how to plot the decision surfaces based on features (see this example).
Summary
If we use
DecisionTreeClassifier
as the general template forComponentSelector
.__init__()
takes hyperparameters, but not data. In our case, that would be thetree
, but not thecomptable
.fit()
takes training data and fits the model. In our case,comptable
is training data.predict()
takes test data and predicts labels. In our case,comptable
is the test data as well.If we organize the tree's attributes similarly to
DecisionTreeClassifier
, we might be able to directly use sklearn'splot_tree
. It would also be really cool if we could figure out how to plot the decision surfaces based on features (see this example).