You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I misunderstood the use of python's import command. I see now that the repository contains a file, datasets/datasets.py that specifies the code for GetDataset. I apologize for my confusion.
I'm now getting this error when trying to run the same code.
ImportError Traceback (most recent call last)
in
31
32 # load the dataset
---> 33 X, y = datasets.GetDataset(dataset_name, dataset_base_path)
34
35 # divide the dataset into test and train based on the test_ratio parameter
~/work/research/cqr/datasets/datasets.py in GetDataset(name, base_path)
338
339 # Impute mean values for samples with missing values
--> 340 from sklearn.preprocessing import Imputer
341
342 imputer = Imputer(missing_values = 'NaN', strategy = 'mean', axis = 0)
ImportError: cannot import name 'Imputer' from 'sklearn.preprocessing' (/home/fred/.local/lib/python3.9/site-packages/sklearn/preprocessing/init.py)
I'm encountering an error when I try to run code in the file real_data_example.ipynb. Specifically, I encounter the error in the line:
X, y = datasets.GetDataset(dataset_name)
I appreciate any suggestions or assistance that you might provide.
The text was updated successfully, but these errors were encountered: