Skip to content

Commit 4ca2628

Browse files
updated example and api ref
1 parent 398e882 commit 4ca2628

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

API_REFERENCE_FOR_REGRESSION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ A numpy matrix with predictor values.
314314

315315
## Method: get_main_effect_shape(predictor_index:int)
316316

317-
***For the predictor in X specified by predictor_index, get_main_effect_shape returns a dictionary with keys equal to predictor values and values equal to the corresponding contribution to the linear predictor (interactions with other predictors are ignored). This method makes it easier to interpret main effects.***
317+
***For the predictor in X specified by predictor_index, get_main_effect_shape returns a dictionary with keys equal to predictor values and values equal to the corresponding contribution to the linear predictor (interactions with other predictors are ignored). This method makes it easier to interpret main effects, for example by visualizing the output in a scatter plot.***
318318

319319
### Parameters
320320

examples/train_aplr_regression.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,13 @@
102102
}
103103
)
104104

105-
# Main effect shape for the third predictor. Will be empty if the third predictor is not used as a main effect in the model.
105+
# Main effect shape for the third predictor. This can be visualized in a scatter plot.
106+
# Will be empty if the third predictor is not used as a main effect in the model.
106107
main_effect_shape = best_model.get_main_effect_shape(predictor_index=2)
107108
main_effect_shape = pd.DataFrame(
108109
{
109110
"predictor_value": main_effect_shape.keys(),
110-
"coefficient": main_effect_shape.values(),
111+
"contribution_to_linear_predictor": main_effect_shape.values(),
111112
}
112113
)
113114

0 commit comments

Comments
 (0)