Skip to content

Commit 430a5bb

Browse files
default value and documentation
1 parent e2990f7 commit 430a5bb

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

API_REFERENCE_FOR_CLASSIFICATION.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# APLRClassifier
22

3-
## class aplr.APLRClassifier(m:int=3000, v:float=0.3, random_state:int=0, n_jobs:int=0, cv_folds:int=5, bins:int=300, verbosity:int=0, max_interaction_level:int=1, max_interactions:int=100000, min_observations_in_split:int=20, ineligible_boosting_steps_added:int=10, max_eligible_terms:int=5, boosting_steps_before_interactions_are_allowed: int = 0, monotonic_constraints_ignore_interactions: bool = False, early_stopping_rounds: int = 500)
3+
## class aplr.APLRClassifier(m:int=3000, v:float=0.1, random_state:int=0, n_jobs:int=0, cv_folds:int=5, bins:int=300, verbosity:int=0, max_interaction_level:int=1, max_interactions:int=100000, min_observations_in_split:int=20, ineligible_boosting_steps_added:int=10, max_eligible_terms:int=5, boosting_steps_before_interactions_are_allowed: int = 0, monotonic_constraints_ignore_interactions: bool = False, early_stopping_rounds: int = 500)
44

55
### Constructor parameters
66

77
#### m (default = 3000)
88
The maximum number of boosting steps. If validation error does not flatten out at the end of the ***m***th boosting step, then try increasing it (or alternatively increase the learning rate).
99

10-
#### v (default = 0.3)
11-
The learning rate. Must be greater than zero and not more than one. The higher the faster the algorithm learns and the lower ***m*** is required. If the algorithm learns too fast (requires few boosting steps to converge) then try lowering the learning rate. Computational costs can be reduced by increasing the learning rate while simultaneously decreasing ***m***, potentially at the expense of predictiveness.
10+
#### v (default = 0.1)
11+
The learning rate. Must be greater than zero and not more than one. The higher the faster the algorithm learns and the lower ***m*** is required. However, empirical evidence suggests that ***v <= 0.1*** gives better results. If the algorithm learns too fast (requires few boosting steps to converge) then try lowering the learning rate. Computational costs can be reduced by increasing the learning rate while simultaneously decreasing ***m***, potentially at the expense of predictiveness.
1212

1313
#### random_state (default = 0)
1414
Used to randomly split training observations into cv_folds if ***cv_observations*** is not specified when fitting.

aplr/aplr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ class APLRClassifier:
300300
def __init__(
301301
self,
302302
m: int = 3000,
303-
v: float = 0.3,
303+
v: float = 0.1,
304304
random_state: int = 0,
305305
n_jobs: int = 0,
306306
cv_folds: int = 5,

cpp/APLRClassifier.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class APLRClassifier
4646
bool monotonic_constraints_ignore_interactions;
4747
size_t early_stopping_rounds;
4848

49-
APLRClassifier(size_t m = 3000, double v = 0.3, uint_fast32_t random_state = std::numeric_limits<uint_fast32_t>::lowest(), size_t n_jobs = 0,
49+
APLRClassifier(size_t m = 3000, double v = 0.1, uint_fast32_t random_state = std::numeric_limits<uint_fast32_t>::lowest(), size_t n_jobs = 0,
5050
size_t cv_folds = 5, size_t reserved_terms_times_num_x = 100, size_t bins = 300, size_t verbosity = 0, size_t max_interaction_level = 1,
5151
size_t max_interactions = 100000, size_t min_observations_in_split = 20, size_t ineligible_boosting_steps_added = 10, size_t max_eligible_terms = 5,
5252
size_t boosting_steps_before_interactions_are_allowed = 0, bool monotonic_constraints_ignore_interactions = false,

cpp/pythonbinding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ PYBIND11_MODULE(aplr_cpp, m)
233233

234234
py::class_<APLRClassifier>(m, "APLRClassifier", py::module_local())
235235
.def(py::init<int &, double &, int &, int &, int &, int &, int &, int &, int &, int &, int &, int &, int &, int &, bool &, int &>(),
236-
py::arg("m") = 3000, py::arg("v") = 0.3, py::arg("random_state") = 0, py::arg("n_jobs") = 0, py::arg("cv_folds") = 5,
236+
py::arg("m") = 3000, py::arg("v") = 0.1, py::arg("random_state") = 0, py::arg("n_jobs") = 0, py::arg("cv_folds") = 5,
237237
py::arg("reserved_terms_times_num_x") = 100, py::arg("bins") = 300, py::arg("verbosity") = 0,
238238
py::arg("max_interaction_level") = 1, py::arg("max_interactions") = 100000, py::arg("min_observations_in_split") = 20,
239239
py::arg("ineligible_boosting_steps_added") = 10, py::arg("max_eligible_terms") = 5,

documentation/APLR 9.3.0.pdf

-52 KB
Binary file not shown.

documentation/APLR 9.4.0.pdf

65.4 KB
Binary file not shown.

examples/train_aplr_classification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
best_model = None
4646
for params in param_grid:
4747
model = APLRClassifier(
48-
random_state=random_state, verbosity=2, m=1000, v=0.3, **params
48+
random_state=random_state, verbosity=2, m=3000, v=0.1, **params
4949
)
5050
model.fit(
5151
data_train[predictors].values, data_train[response].values, X_names=predictors

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
setuptools.setup(
2323
name="aplr",
24-
version="9.3.0",
24+
version="9.4.0",
2525
description="Automatic Piecewise Linear Regression",
2626
ext_modules=[sfc_module],
2727
author="Mathias von Ottenbreit",

0 commit comments

Comments
 (0)