From c88f7012e15fa06e2a966cc469fd7f3245fb951a Mon Sep 17 00:00:00 2001 From: tvdboom Date: Mon, 30 Mar 2020 13:50:01 +0200 Subject: [PATCH] tests fix --- README.md | 4 ++-- docs_sources/api.md | 4 ++-- tests/test_impute.py | 12 ++++++------ tests/test_plots.py | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 0e9c43b07..bb3122eee 100644 --- a/README.md +++ b/README.md @@ -69,11 +69,11 @@ Call the `ATOMClassifier` or `ATOMRegressor` class and provide the data you want ATOM has multiple data cleaning methods to help you prepare the data for modelling: - atom.impute(strat_num='knn', strat_cat='most_frequent', max_frac_rows=0.1) + atom.impute(strat_num='knn', strat_cat='most_frequent', min_frac_rows=0.7) atom.encode(max_onehot=10, frac_to_other=0.05) atom.outliers(max_sigma=4) atom.balance(oversample=0.8, n_neighbors=15) - atom.feature_selection(strategy='univariate', solver='chi2', max_features=0.9) + atom.feature_selection(strategy='univariate', solver='chi2', n_features=0.9) Run the pipeline with different models: diff --git a/docs_sources/api.md b/docs_sources/api.md index ef7930b56..724f8bc0b 100644 --- a/docs_sources/api.md +++ b/docs_sources/api.md @@ -395,8 +395,8 @@ cleaning steps. ATOM provides four data cleaning methods to handle missing value
function atom.ATOM.impute(strat_num='remove',
                           strat_cat='remove',
-                          max_frac_rows=0.5,
-                          max_frac_cols=0.5,
+                          min_frac_rows=0.5,
+                          min_frac_cols=0.5,
                           missing=None) 
 
[source]
diff --git a/tests/test_impute.py b/tests/test_impute.py index bf9d1a5e4..6a49ee250 100644 --- a/tests/test_impute.py +++ b/tests/test_impute.py @@ -47,18 +47,18 @@ def test_strat_num_parameter(): pytest.raises(ValueError, atom.impute, strat_num='test') -def test_max_frac_rows_parameter(): - ''' Assert that the mac_frac_rows parameter is set correctly ''' +def test_min_frac_rows_parameter(): + ''' Assert that the min_frac_rows parameter is set correctly ''' atom = ATOMClassifier(X_dim4, y_dim4) - pytest.raises(ValueError, atom.impute, max_frac_rows=1.0) + pytest.raises(ValueError, atom.impute, min_frac_rows=1.0) -def test_max_frac_cols_parameter(): - ''' Assert that the mac_frac_cols parameter is set correctly ''' +def test_min_frac_cols_parameter(): + ''' Assert that the min_frac_cols parameter is set correctly ''' atom = ATOMClassifier(X_dim4, y_dim4) - pytest.raises(ValueError, atom.impute, max_frac_cols=5.2) + pytest.raises(ValueError, atom.impute, min_frac_cols=5.2) def test_missing_string(): diff --git a/tests/test_plots.py b/tests/test_plots.py index 8f03c5011..5acd35716 100644 --- a/tests/test_plots.py +++ b/tests/test_plots.py @@ -355,12 +355,12 @@ def test_plot_gains(): # When invalid model pytest.raises(ValueError, atom.plot_gains, models='unknown') - # When model with no rpedict_proba method + # When model with no predict_proba method pytest.raises(ValueError, atom.pa.plot_gains) # When correct atom.tree.plot_gains(display=False) - atom.plot_gains(display=False) + atom.plot_gains(['tree', 'lgb'], display=False) assert 1 == 1 @@ -383,5 +383,5 @@ def test_plot_lift(): # When correct atom.tree.plot_lift(display=False) - atom.plot_lift(display=False) + atom.plot_lift(['tree', 'lgb'], display=False) assert 1 == 1