Skip to content

Commit

Permalink
tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdboom committed Mar 30, 2020
1 parent dc171e5 commit c88f701
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions docs_sources/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ cleaning steps. ATOM provides four data cleaning methods to handle missing value
<a name="atom-impute"></a>
<pre><em>function</em> atom.ATOM.<strong style="color:#008AB8">impute</strong>(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)
<div align="right"><a href="https://github.com/tvdboom/ATOM/blob/master/atom/atom.py#L711">[source]</a></div></pre>
<div style="padding-left:3%" width="100%">
Expand Down
12 changes: 6 additions & 6 deletions tests/test_impute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
6 changes: 3 additions & 3 deletions tests/test_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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

0 comments on commit c88f701

Please sign in to comment.