Skip to content

Commit a3ebc5a

Browse files
updated documentation
1 parent e540d60 commit a3ebc5a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

API_REFERENCE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ The learning rate. Must be greater than zero and not more than one. The higher t
1414
Used to randomly split training observations into training and validation if ***validation_set_indexes*** is not specified when fitting.
1515

1616
#### family (default = "gaussian")
17-
Determines the loss function used. Allowed values are "gaussian", "binomial", "poisson", "gamma" and "tweedie". This is used together with ***link_function***.
17+
Determines the loss function used. Allowed values are "gaussian", "binomial", "poisson", "gamma" and "tweedie". This is used together with ***link_function***. Please note that the implementation of values other than "gaussian" is experimental.
1818

1919
#### link_function (default = "identity")
20-
Determines how the linear predictor is transformed to predictions. Allowed values are "identity", "logit", "log", "inverse" and "tweedie". These are canonical link functions for the "gaussian", "binomial", "poisson", "gamma" and "tweedie" ***family*** respectively. Canonical links usually work fine given that the data is appropriate for the selected combination of ***family*** and ***link_function***. Other combinations of ***family*** and ***link_function*** may or may not work (the model may fit poorly to the data if the wrong combination is used).
20+
Determines how the linear predictor is transformed to predictions. Allowed values are "identity", "logit", "log", "inverse" and "tweedie". These are canonical link functions for the "gaussian", "binomial", "poisson", "gamma" and "tweedie" ***family*** respectively. Canonical links usually work fine given that the data is appropriate for the selected combination of ***family*** and ***link_function***. Other combinations of ***family*** and ***link_function*** may or may not work (the model may fit poorly to the data if the wrong combination is used). Please note that the implementation of values other than "identity" is experimental.
2121

2222
#### n_jobs (default = 0)
2323
Multi-threading parameter. If ***0*** then uses all available cores for multi-threading. Any other positive integer specifies the number of cores to use (***1*** means single-threading).

examples/train_aplr_cross_validation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828

2929
#Training model
3030
param_grid = {"max_interaction_level":[0,1,2,3,100],"min_observations_in_split":[1, 20, 50, 100, 200]}
31-
family="gaussian" #other available families are binomial, poisson, gamma and tweedie
32-
link_function="identity" #other available link functions are logit, log, inverse and tweedie
31+
family="gaussian" #other available families are binomial, poisson, gamma and tweedie, but their implementation is experimental.
32+
link_function="identity" #other available link functions are logit, log, inverse and tweedie, but their implementation is experimental.
3333
grid_search_cv = GridSearchCV(APLRRegressor(random_state=random_state,verbosity=1,m=1000,v=0.1,family=family,link_function=link_function),param_grid,cv=5,n_jobs=4,scoring="neg_mean_squared_error")
3434
grid_search_cv.fit(data_train[predictors].values,data_train[response].values)
3535
best_model:APLRRegressor = grid_search_cv.best_estimator_

examples/train_aplr_validation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
best_validation_result=np.inf
3333
param_grid=ParameterGrid({"max_interaction_level":[0,1,2,3,100],"min_observations_in_split":[1, 20, 50, 100, 200]})
3434
bestmodel=None
35-
family="gaussian" #other available families are binomial, poisson, gamma and tweedie
36-
link_function="identity" #other available link functions are logit, log, inverse and tweedie
35+
family="gaussian" #other available families are binomial, poisson, gamma and tweedie, but their implementation is experimental.
36+
link_function="identity" #other available link functions are logit, log, inverse and tweedie, but their implementation is experimental.
3737
for params in param_grid:
3838
model = APLRRegressor(random_state=random_state,verbosity=3,m=1000,v=0.1,family=family,link_function=link_function,**params)
3939
model.fit(data_train[predictors].values,data_train[response].values,X_names=predictors)

0 commit comments

Comments
 (0)