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

TypeError: unhashable type: 'slice' #1

Open
chunyanyin11 opened this issue Dec 21, 2018 · 6 comments
Open

TypeError: unhashable type: 'slice' #1

chunyanyin11 opened this issue Dec 21, 2018 · 6 comments

Comments

@chunyanyin11
Copy link

chunyanyin11 commented Dec 21, 2018

Hello, when I ran your code got "TypeError: unhashable type: 'slice' ".Can you help me analyze the problem?thanks

import pandas as pd from sklearn.linear_model import LogisticRegression from feature_selection_ga import FeatureSelectionGA data = pd.read_excel("D:\\Project_CAD\\实验6\\data\\train_data_1\\train_1.xlsx") x, y = data.iloc[:, :53], data.iloc[:, 56] model = LogisticRegression() fsga = FeatureSelectionGA(model, x, y) pop = fsga.generate(100)

@kaushalshetty
Copy link
Owner

Which line of code is throwing the error?

@chunyanyin11
Copy link
Author

chunyanyin11 commented Dec 25, 2018

OK,thank you .I Converted the dataframe data into numpy ,then the issue was solved.
Now ,I have some other questions. 1. I how to get the best features ? 2. how to print the selected features? 3. Could I use your algorithm as a classifier ,and how to do ?Thank you very much

@Sanjay1995
Copy link

It is not running on regression problem, how can I run it on regression model?

@PuneethaPai
Copy link
Collaborator

@kaushalshetty we may need to add example to use this for regression task.

@pandaseal
Copy link

@kaushalshetty we may need to add example to use this for regression task.

Does it even do regression? What I found so far was that the FitnessFunction uses classification metrics.. Is it enough to write a custom fitness function or are there other obstacles? Thanks!

@AliHaider20
Copy link

AliHaider20 commented May 8, 2021

Can someone define the problem again here? Cause the issue opened at the top was solved so why is this issue is still open? If there's some other problem then plz share here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants