Comments (7)
Yeah @bustios I had it figured out after looking at it for some time. Thanks anyways for the help!!!!
from zeppelin-notebooks.
Hi @Yash-Bolisetty ,
Thanks for reporting the problem. What version of sklearn are you using? It looks like your sklearn version does not accept repeated names for the transformers.
In the function create_fbcsp
, try replacing:
for low in bands:
pipeline_list.append(
("pipe", Pipeline([
("filter", BandPassFilter(low, low + band_width)),
("csp", CSP(n_components=n_csp_components))
]))
)
by
for low in bands:
pipeline_list.append(
Pipeline([
("filter", BandPassFilter(low, low + band_width)),
("csp", CSP(n_components=n_csp_components))
])
)
or give a different name for each Pipeline appended to pipeline_list
.
from zeppelin-notebooks.
Hey @bustios thanks for the quick reply. I am currently using sklearn version 0.18.1. I tried replacing the code you showed and was faced with this error:
Traceback (most recent call last):
File "", line 1, in
File "", line 14, in create_fbcsp
File "/Users/yashbolisetty/anaconda3/lib/python3.6/site-packages/sklearn/pipeline.py", line 618, in init
self._validate_transformers()
File "/Users/yashbolisetty/anaconda3/lib/python3.6/site-packages/sklearn/pipeline.py", line 649, in _validate_transformers
names, transformers = zip(*self.transformer_list)
TypeError: zip argument #1 must support iteration
Traceback (most recent call last):
File "", line 1, in
NameError: name 'fbcsp' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'X_train_feats' is not defined
How should I attempt to fix this or should I just try a different version of sklearn?
from zeppelin-notebooks.
@bustios If it would be easier, we could get in a google hangout call to discuss these issues or any further issues?
from zeppelin-notebooks.
@bustios I also tried to make the names unique by adding some random number to each of the Pipelines but I got the same error I think:
Traceback (most recent call last):
File "", line 1, in
File "", line 14, in create_fbcsp
File "/Users/yashbolisetty/anaconda3/lib/python3.6/site-packages/sklearn/pipeline.py", line 618, in init
self._validate_transformers()
File "/Users/yashbolisetty/anaconda3/lib/python3.6/site-packages/sklearn/pipeline.py", line 652, in _validate_transformers
self._validate_names(names)
File "/Users/yashbolisetty/anaconda3/lib/python3.6/site-packages/sklearn/pipeline.py", line 75, in _validate_names
'{0!r}'.format(list(names)))
ValueError: Names provided are not unique: ['pipe6', 'pipe1', 'pipe4', 'pipe4', 'pipe6', 'pipe10', 'pipe6', 'pipe4', 'pipe4', 'pipe2', 'pipe7', 'pipe9']
Traceback (most recent call last):
File "", line 1, in
NameError: name 'fbcsp' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'X_train_feats' is not defined
Once again, if there is a better way for communication and solving these issues, please feel free to mention them.
Thanks so much,
Yash Bolisetty
from zeppelin-notebooks.
Hey Paul,
Any help for the errors above are appreciated! Wondering what Sklearn version you used as well?
Thanks,
Yash B
from zeppelin-notebooks.
Hi @Yash-Bolisetty ,
sorry for the late response. I used sklearn version 0.17.1.
When you added random numbers to the names of the pipelines, the resulting names were not unique:
ValueError: Names provided are not unique: ['pipe6', 'pipe1', 'pipe4', 'pipe4', 'pipe6', 'pipe10', 'pipe6', 'pipe4', 'pipe4', 'pipe2', 'pipe7', 'pipe9']
that's why you still have the same error.
from zeppelin-notebooks.
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 zeppelin-notebooks.