Comments (2)
Hi Ido,
sklearn-evaluation looks good, I will certainly use its functionalities for the next version.
Thanks.
from ezstacking.
Hi Ido,
I have started some experimentation with sklearn-evaluation, I have a problem with PCA.
I followed this , but I used a Pandas dataframe version of iris dataset
iris.csv
:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[80], line 2
1 target_names=["Setosa", "Versicolor", "Virginica"]
----> 2 skev.plot.pca(X, y, n_components=3)
File ~/anaconda3/envs/ezstacking/lib/python3.10/site-packages/sklearn_evaluation/plot/style.py:129, in apply_theme.<locals>.decorator.<locals>.wrapper_func(*args, **kwargs)
127 def wrapper_func(*args, **kwargs):
128 with tmp_theme(ax_style, cmap_style):
--> 129 return func(*args, **kwargs)
File ~/anaconda3/envs/ezstacking/lib/python3.10/site-packages/ploomber_core/exceptions.py:128, in modify_exceptions.<locals>.wrapper(*args, **kwargs)
125 @wraps(fn)
126 def wrapper(*args, **kwargs):
127 try:
--> 128 return fn(*args, **kwargs)
129 except (ValueError, TypeError) as e:
130 _add_community_link(e)
File ~/anaconda3/envs/ezstacking/lib/python3.10/site-packages/sklearn_evaluation/telemetry.py:51, in SKLearnEvaluationLogger.log.<locals>.wrapper.<locals>.inner(*args, **kwargs)
49 metadata["exception"] = str(e)
50 telemetry.log_api("sklearn-evaluation-error", metadata=metadata)
---> 51 raise e
53 return result
File ~/anaconda3/envs/ezstacking/lib/python3.10/site-packages/sklearn_evaluation/telemetry.py:47, in SKLearnEvaluationLogger.log.<locals>.wrapper.<locals>.inner(*args, **kwargs)
44 telemetry.log_api("sklearn-evaluation", metadata=metadata)
46 try:
---> 47 result = func(*args, **kwargs)
48 except Exception as e:
49 metadata["exception"] = str(e)
File ~/anaconda3/envs/ezstacking/lib/python3.10/site-packages/sklearn_evaluation/plot/pca.py:91, in pca(X, y, target_names, n_components, colors, ax)
39 @apply_theme()
40 @modify_exceptions
41 @SKLearnEvaluationLogger.log(feature="plot")
42 def pca(X, y=None, target_names=None, n_components=2, colors=None, ax=None):
43 """
44 Plot principle component analysis curve.
45
(...)
88
89 """
---> 91 _validate_inputs(X, n_components, target_names, colors, ax)
93 # Standardizing the features
94 X = StandardScaler().fit_transform(X)
File ~/anaconda3/envs/ezstacking/lib/python3.10/site-packages/sklearn_evaluation/plot/pca.py:21, in _validate_inputs(X, n_components, target_names, colors, ax)
20 def _validate_inputs(X, n_components, target_names, colors, ax):
---> 21 if np.isnan(X).sum():
22 raise ValueError("X array should not consist nan " "pca")
24 if n_components < 2:
File ~/anaconda3/envs/ezstacking/lib/python3.10/site-packages/pandas/core/generic.py:1527, in NDFrame.__nonzero__(self)
1525 @final
1526 def __nonzero__(self) -> NoReturn:
-> 1527 raise ValueError(
1528 f"The truth value of a {type(self).__name__} is ambiguous. "
1529 "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
1530 )
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
If you need help solving this issue, send us a message: https://ploomber.io/community
from ezstacking.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ezstacking.