You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
***This method returns predicted class probabilities of the best tuned model as a numpy matrix. Similar to the predict_class_probabilities method but the name predict_proba is compatible with scikit-learn.***
59
59
60
60
### Parameters
61
61
62
62
#### X
63
-
A numpy matrix with predictor values.
63
+
A numpy matrix or pandas DataFrame with predictor values.
64
64
65
65
#### kwargs
66
66
Optional parameters sent to the predict_class_probabilities method in the best tuned model.
Copy file name to clipboardExpand all lines: API_REFERENCE_FOR_CLASSIFICATION.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,23 +65,23 @@ Restricts the maximum number of terms in any of the underlying models trained to
65
65
Specifies the (weighted) ridge penalty applied to the model. Positive values can smooth model effects and help mitigate boundary problems, such as regression coefficients with excessively high magnitudes near the boundaries. To find the optimal value, consider using a grid search or similar. Negative values are treated as zero.
A numpy matrix or pandas DataFrame with predictor values. If a pandas DataFrame is provided, the model will automatically handle categorical features and missing values. Categorical features will be one-hot encoded. Missing values will be imputed with the median of the column, and a new binary feature will be added to indicate that the value was missing.
76
76
77
77
#### y
78
-
A list of strings with response values (class names).
78
+
A numpy array or list of strings with response values (class names). Other data types will be converted to strings.
79
79
80
80
#### sample_weight
81
81
An optional numpy vector with sample weights. If not specified then the observations are weighted equally.
82
82
83
83
#### X_names
84
-
An optional list of strings containing names for each predictor in ***X***. Naming predictors may increase model readability because model terms get names based on ***X_names***.
84
+
An optional list of strings containing names for each predictor in ***X***. Naming predictors may increase model readability because model terms get names based on ***X_names***.**Note:** This parameter is ignored if ***X*** is a pandas DataFrame; the DataFrame's column names will be used instead.
85
85
86
86
#### cv_observations
87
87
An optional integer matrix specifying how each training observation is used in cross validation. If this is specified then ***cv_folds*** is not used. Specifying ***cv_observations*** may be useful for example when modelling time series data (you can place more recent observations in the holdout folds). ***cv_observations*** must contain a column for each desired fold combination. For a given column, row values equalling 1 specify that these rows will be used for training, while row values equalling -1 specify that these rows will be used for validation. Row values equalling 0 will not be used.
@@ -108,35 +108,35 @@ An optional list of floats specifying interaction penalties for each predictor.
108
108
An optional list of integers specifying the minimum effective number of observations in a split for each predictor. If provided then this supercedes ***min_observations_in_split***.
***Returns a numpy matrix containing predictions of the data in X. Requires that the model has been fitted with the fit method.***
114
114
115
115
### Parameters
116
116
117
117
#### X
118
-
A numpy matrix with predictor values.
118
+
A numpy matrix or pandas DataFrame with predictor values.
119
119
120
120
#### cap_predictions_to_minmax_in_training
121
121
If ***True*** then for each underlying logit model the predictions are capped so that they are not less than the minimum and not greater than the maximum prediction or response in the training dataset.
***Returns a list of strings containing predictions of the data in X. An observation is classified to the category with the highest predicted class probability. Requires that the model has been fitted with the fit method.***
127
127
128
128
### Parameters
129
129
Parameters are the same as in ***predict_class_probabilities()***.
***Returns a numpy matrix containing feature contribution to the linear predictor in X for each predictor. For each prediction this method uses calculate_local_feature_contribution() in the logit APLRRegressor model for the category that corresponds to the prediction. Example: If a prediction is "myclass" then the method uses calculate_local_feature_contribution() in the logit model that predicts whether an observation belongs to class "myclass" or not.***
135
135
136
136
### Parameters
137
137
138
138
#### X
139
-
A numpy matrix with predictor values.
139
+
A numpy matrix or pandas DataFrame with predictor values.
Copy file name to clipboardExpand all lines: API_REFERENCE_FOR_REGRESSION.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,14 +139,14 @@ If true, then a mean bias correction is applied to the model's intercept term. T
139
139
If true, then a scaling is applied to the negative gradient to speed up convergence. This should primarily be used when the algorithm otherwise converges too slowly or prematurely. This is only applied for the "identity" and "log" link functions.
140
140
This will not speed up the combination of "mse" loss with an "identity" link, as this combination is already optimized for speed within the algorithm. Furthermore, this option is not effective for all loss functions, such as "mae" and "quantile".
A numpy matrix or pandas DataFrame with predictor values. If a pandas DataFrame is provided, the model will automatically handle categorical features and missing values. Categorical features will be one-hot encoded. Missing values will be imputed with the median of the column, and a new binary feature will be added to indicate that the value was missing.
150
150
151
151
#### y
152
152
A numpy vector with response values.
@@ -155,7 +155,7 @@ A numpy vector with response values.
155
155
An optional numpy vector with sample weights. If not specified then the observations are weighted equally.
156
156
157
157
#### X_names
158
-
An optional list of strings containing names for each predictor in ***X***. Naming predictors may increase model readability because model terms get names based on ***X_names***.
158
+
An optional list of strings containing names for each predictor in ***X***. Naming predictors may increase model readability because model terms get names based on ***X_names***.**Note:** This parameter is ignored if ***X*** is a pandas DataFrame; the DataFrame's column names will be used instead.
159
159
160
160
#### cv_observations
161
161
An optional integer matrix specifying how each training observation is used in cross validation. If this is specified then ***cv_folds*** is not used. Specifying ***cv_observations*** may be useful for example when modelling time series data (you can place more recent observations in the holdout folds). ***cv_observations*** must contain a column for each desired fold combination. For a given column, row values equalling 1 specify that these rows will be used for training, while row values equalling -1 specify that these rows will be used for validation. Row values equalling 0 will not be used.
@@ -188,14 +188,14 @@ An optional list of floats specifying interaction penalties for each predictor.
188
188
An optional list of integers specifying the minimum effective number of observations in a split for each predictor. If provided then this supercedes ***min_observations_in_split***.
***Returns a numpy vector containing predictions of the data in X. Requires that the model has been fitted with the fit method.***
194
194
195
195
### Parameters
196
196
197
197
#### X
198
-
A numpy matrix with predictor values.
198
+
A numpy matrix or pandas DataFrame with predictor values.
199
199
200
200
#### cap_predictions_to_minmax_in_training
201
201
If ***True*** then predictions are capped so that they are not less than the minimum and not greater than the maximum prediction or response in the training dataset. This is recommended especially if ***max_interaction_level*** is high. However, if you need the model to extrapolate then set this parameter to ***False***.
@@ -211,67 +211,67 @@ If ***True*** then predictions are capped so that they are not less than the min
211
211
A list of strings containing names for each predictor in the ***X*** matrix that the model was trained on.
***Returns a numpy vector containing the contribution to the linear predictor from an user specified combination of interacting predictors for each observation in X. This makes it easier to interpret interactions (or main effects if just one predictor is specified), for example by plotting predictor values against the term contribution.***
257
257
258
258
### Parameters
259
259
260
260
#### X
261
-
A numpy matrix with predictor values.
261
+
A numpy matrix or pandas DataFrame with predictor values.
262
262
263
263
#### predictor_indexes
264
264
A list of integers specifying the indexes of predictors in X to use. For example, [1, 3] means the second and fourth predictors in X.
0 commit comments