API Reference
Documentation for the OptimalFeatureSelection public interface.
Index
IAI.OptimalFeatureSelectionClassifierIAI.OptimalFeatureSelectionLearnerIAI.OptimalFeatureSelectionRegressorIAI.get_prediction_constantIAI.get_prediction_weightsIAI.variable_importance
Types
IAI.OptimalFeatureSelectionLearner — TypeAbstract type encompassing all optimal feature selection learners.
IAI.OptimalFeatureSelectionClassifier — TypeLearner for conducting optimal feature selection on classification problems.
The following parameters are supported (refer to the documentation for each):
IAI.OptimalFeatureSelectionRegressor — TypeLearner for conducting optimal feature selection on regression problems.
The following parameters are supported (refer to the documentation for each):
Model Details
These functions can be used to query the structure of a OptimalFeatureSelectionLearner. The examples make use of the following learner:
Fitted OptimalFeatureSelectionClassifier:
Constant: -3.30276
Weights:
region==C: 2.77645
score2: 0.0568292
(Higher score indicates stronger prediction for class `true`)IAI.get_prediction_constant — Functionget_prediction_constant(lnr::OptimalFeatureSelectionLearner)Return the constant term in the prediction in the trained lnr.
Example
IAI.get_prediction_constant(lnr)-3.3027632IAI.get_prediction_weights — Functionget_prediction_weights(lnr::OptimalFeatureSelectionLearner)Return the weights for each feature in the prediction in the trained lnr. The weights are returned as two Dicts, one for numeric features and one for categoric features.
The numeric Dict has key-value pairs of feature names and their corresponding weights in the prediction.
The categoric Dict has key-value pairs of feature names and a corresponding Dict that maps the categoric levels for that feature to their weights in the prediction.
Any feature not included in either Dict has zero weight in the prediction, and similarly, any categoric levels that are not included have zero weight.
Example
numeric_weights, categoric_weights = IAI.get_prediction_weights(lnr)
numeric_weightsDict{Symbol,Float64} with 1 entry:
:score2 => 0.0568292categoric_weightsDict{Symbol,Dict{Any,Float64}} with 1 entry:
:region => Dict{Any,Float64}("C"=>2.77645)Utilities
IAI.variable_importance — Methodvariable_importance(lnr::OptimalFeatureSelectionLearner)For OptimalFeatureSelectionLearners, the importance is determined using the coefficients in the resulting model after scaling to account for features of different magnitudes.