Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running the "getting started" example #6

Closed
JvdHoogen opened this issue Jun 8, 2021 · 3 comments
Closed

Error when running the "getting started" example #6

JvdHoogen opened this issue Jun 8, 2021 · 3 comments

Comments

@JvdHoogen
Copy link

Hi tvdboom,

The package that you made looks really nice! However, for some reason I am not able to run the simple example that you mention on your page (see error message below).

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
~/My_data/ATOM_model.py in 
      26 
      27 X, y = load_breast_cancer(return_X_y = True)
----> 28 atom = ATOMClassifier(X, y, logger="auto", n_jobs=2, verbose=2)

~/miniconda3/envs/lib/python3.7/site-packages/typeguard/__init__.py in wrapper(*args, **kwargs)
    921         memo = _CallMemo(python_func, _localns, args=args, kwargs=kwargs)
    922         check_argument_types(memo)
--> 923         retval = func(*args, **kwargs)
    924         try:
    925             check_return_type(retval, memo)

~/miniconda3/envs/lib/python3.7/site-packages/atom/api.py in __init__(self, y, n_rows, test_size, n_jobs, verbose, warnings, logger, random_state, *arrays)
    262 
    263         self.goal = "classification"
--> 264         ATOM.__init__(self, arrays, y=y, n_rows=n_rows, test_size=test_size)
    265 
    266 

~/miniconda3/envs/lib/python3.7/site-packages/atom/utils.py in wrapper(*args, **kwargs)
   1047                     logger.exception("Exception encountered:")
   1048 
-> 1049                 raise exception  # Always raise it
   1050         else:
   1051             return f(*args, **kwargs)

~/miniconda3/envs/lib/python3.7/site-packages/atom/utils.py in wrapper(*args, **kwargs)
   1039         if logger is not None:
   1040             try:  # Run the function
-> 1041                 return f(*args, **kwargs)
   1042 
   1043             except Exception as exception:

~/miniconda3/envs/lib/python3.7/site-packages/atom/utils.py in wrapper(*args, **kwargs)
   1066             logger.info(f"{args[0].__class__.__name__}.{f.__name__}()")
   1067 
-> 1068         result = f(*args, **kwargs)
   1069         return result
   1070 

~/miniconda3/envs/lib/python3.7/site-packages/atom/atom.py in __init__(self, arrays, y, n_rows, test_size)
    100 
    101         self.log('', 1)  # Add empty rows around stats for cleaner look
--> 102         self.stats(1)
    103         self.log('', 1)
    104 

~/miniconda3/envs/lib/python3.7/site-packages/atom/utils.py in wrapper(*args, **kwargs)
   1047                     logger.exception("Exception encountered:")
   1048 
-> 1049                 raise exception  # Always raise it
   1050         else:
   1051             return f(*args, **kwargs)

~/miniconda3/envs/lib/python3.7/site-packages/atom/utils.py in wrapper(*args, **kwargs)
   1039         if logger is not None:
   1040             try:  # Run the function
-> 1041                 return f(*args, **kwargs)
   1042 
   1043             except Exception as exception:

~/miniconda3/envs/lib/python3.7/site-packages/atom/utils.py in wrapper(*args, **kwargs)
   1066             logger.info(f"{args[0].__class__.__name__}.{f.__name__}()")
   1067 
-> 1068         result = f(*args, **kwargs)
   1069         return result
   1070 

~/miniconda3/envs/lib/python3.7/site-packages/atom/atom.py in stats(self, _vb)
    269             nans = self.nans.sum()
    270             n_categorical = self.n_categorical
--> 271             outliers = self.outliers.sum()
    272             duplicates = self.dataset.duplicated().sum()
    273 

~/miniconda3/envs/lib/python3.7/site-packages/atom/atom.py in outliers(self)
    217         if not check_deep(self.X):
    218             num_and_target = self.dataset.select_dtypes(include=["number"]).columns
--> 219             z_scores = stats.zscore(self.train[num_and_target], nan_policy="propagate")
    220             srs = pd.Series((np.abs(z_scores) > 3).sum(axis=0), index=num_and_target)
    221             return srs[srs > 0]

TypeError: zscore() got an unexpected keyword argument 'nan_policy'

Do you know how to solve this problem?

Kind regards,
JvdHoogen

@tvdboom
Copy link
Owner

tvdboom commented Jun 9, 2021

Hi,

You probably have an older version of scipy. Try updating it with: pip install -U scipy

@JvdHoogen
Copy link
Author

Hi tvdboom,

That worked. Thanks!

@tvdboom
Copy link
Owner

tvdboom commented Jun 10, 2021

Glad it worked. Feel free to open a new issue if you encounter another problem.

@tvdboom tvdboom closed this as completed Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants