Description Usage Arguments Value
Fits a linear regression model to the data and scores the relative quality of the model using r-squared, aic, or bic.
1 | fit_and_score(S, feature, algorithm, X_train, y_train, X_val, y_val, criterion)
|
S |
A vector representing the list of selected features in 'forward()' and 'backward()' |
feature |
Feature to add or drop, expressed as an integer. |
algorithm |
Direction of feature selection. One of: 'forward', 'backward'. |
X_train |
Training data. Represented as a 2D matrix of (observations, features). |
y_train |
Target class for training data. Represented as a 1D vector of target classes for |
X_val |
Validation data. Represented as a 2D matrix of (observations, features). |
y_val |
Target class for validation data. Represented as a 1D vector of target classes for |
criterion |
Model selection criterion to measure relative model quality. Can be one of:
|
Score of the model (as a float).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.