Skip to content

Commit 1a574c1

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 3f08f35 + 02273ea commit 1a574c1

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

examples/maximal_classification.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ fn main() {
2525
.with_n_trees(100)
2626
.with_min_samples_split(20),
2727
)
28-
.with_logistic_settings(LogisticRegressionParameters::default())
28+
.with_logistic_settings(
29+
LogisticRegressionParameters::default()
30+
.with_alpha(1.0)
31+
.with_solver(LogisticRegressionSolverName::LBFGS),
32+
)
2933
.with_svc_settings(
3034
SVCParameters::default()
3135
.with_epoch(10)

src/settings/mod.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
//! use automl::settings::{
7575
//! Algorithm, CategoricalNBParameters, DecisionTreeClassifierParameters, Distance,
7676
//! GaussianNBParameters, KNNAlgorithmName, KNNClassifierParameters, KNNWeightFunction, Kernel,
77-
//! LogisticRegressionParameters, Metric, RandomForestClassifierParameters, SVCParameters,
77+
//! LogisticRegressionParameters, LogisticRegressionSolverName, Metric,
78+
//! RandomForestClassifierParameters, SVCParameters,
7879
//! };
7980
//!
8081
//! let settings = automl::Settings::default_classification()
@@ -91,7 +92,11 @@
9192
//! .with_n_trees(100)
9293
//! .with_min_samples_split(20),
9394
//! )
94-
//! .with_logistic_settings(LogisticRegressionParameters::default())
95+
//! .with_logistic_settings(
96+
//! LogisticRegressionParameters::default()
97+
//! .with_alpha(1.0)
98+
//! .with_solver(LogisticRegressionSolverName::LBFGS),
99+
//! )
95100
//! .with_svc_settings(
96101
//! SVCParameters::default()
97102
//! .with_epoch(10)
@@ -160,6 +165,9 @@ pub use smartcore::ensemble::random_forest_classifier::RandomForestClassifierPar
160165
/// Parameters for logistic regression (re-export from [Smartcore](https://docs.rs/smartcore/))
161166
pub use smartcore::linear::logistic_regression::LogisticRegressionParameters;
162167

168+
/// Parameters for logistic regression (re-export from [Smartcore](https://docs.rs/smartcore/))
169+
pub use smartcore::linear::logistic_regression::LogisticRegressionSolverName;
170+
163171
/// Parameters for decision tree classification (re-export from [Smartcore](https://docs.rs/smartcore/))
164172
pub use smartcore::tree::decision_tree_classifier::DecisionTreeClassifierParameters;
165173

0 commit comments

Comments
 (0)