mirror of
https://github.com/Doctorado-ML/benchmark.git
synced 2025-08-16 07:55:54 +00:00
Add nan manage to arff datasets
This commit is contained in:
@@ -28,8 +28,9 @@ class DatasetsArff:
|
||||
file_name = os.path.join(self.folder(), self.dataset_names(name))
|
||||
data = arff.loadarff(file_name)
|
||||
df = pd.DataFrame(data[0])
|
||||
df = df.dropna()
|
||||
X = df.drop(class_name, axis=1).to_numpy()
|
||||
y = df[class_name].to_numpy()
|
||||
y, _ = pd.factorize(df[class_name])
|
||||
return X, y
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user