Skip to content
Sign upLog in
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
4

sklearn error

Leroy01010
Leroy01010

the package isn't working if you have the solution please tell me

2 years ago

Voters

Comments

TopNew
2
Coder100
Coder100

Hello. I found your error!
image


You forgot a parenthesis.
Fixed code:

from sklearn import datasets from sklearn.model_selection import train_test_split iris = datasets.load_iris() features = iris.data labels = iris.target features_train, features_test, labels_train, labels_test, = train_test_split(features, labels, test_size=.5) print(features_train)
2 years ago
1
Leroy01010
Leroy01010

thanks


@Coder100

2 years ago
2
Muffinlavania
Muffinlavania

@Leroy01010
i thought you asked about the package...

2 years ago
1
Leroy01010
Leroy01010

sorry i didn't explain it properly

@Muffinlavania

2 years ago
2
Muffinlavania
Muffinlavania

It works for me, you just have to wait a minute for everything to update and install

2 years ago
2
Muffinlavania
Muffinlavania

@Leroy01010
yes, just hit run and it works for me

image


Then more

image

Then it runs

2 years ago
Load more