Merge pull request #39 from lorenzovolpi/ucimulti

Fix UCI multiclass features
This commit is contained in:
Alejandro Moreo Fernandez 2024-07-12 20:48:14 +02:00 committed by GitHub
commit 2140aedf6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -751,7 +751,7 @@ def fetch_UCIMulticlassLabelledCollection(dataset_name, data_home=None, min_clas
df = fetch_ucirepo(id=id)
df.data.features = pd.get_dummies(df.data.features, drop_first=True)
X, y = df.data.features.to_numpy(), df.data.targets.to_numpy().squeeze()
X, y = df.data.features.to_numpy(dtype=np.float64), df.data.targets.to_numpy().squeeze()
assert y.ndim == 1, 'more than one y'