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

Infoaid Tech #8

Open
AndrajuBhanuPrakash opened this issue Jan 5, 2024 · 1 comment
Open

Infoaid Tech #8

AndrajuBhanuPrakash opened this issue Jan 5, 2024 · 1 comment

Comments

@AndrajuBhanuPrakash
Copy link

from ucimlrepo import fetch_ucirepo, list_available_datasets

check which datasets can be imported

list_available_datasets()

import dataset

heart_disease = fetch_ucirepo(id=45)

alternatively: fetch_ucirepo(name='Heart Disease')

access data

X = heart_disease.data.features
y = heart_disease.data.targets

sklearn.linear_model.LinearRegression().fit(X, y)

access metadata

print(heart_disease.metadata.uci_id)
print(heart_disease.metadata.num_instances)
print(heart_disease.metadata.additional_info.summary)

access variable info in tabular format

print(heart_disease.variables)

@ptruong0
Copy link
Collaborator

ptruong0 commented Jan 9, 2024

Could you please provide more details on your issue? If you are referring to the sklearn.linear_model.LinearRegression().fit(X, y) line, you need to perform some preprocessing first on the dataset, such as imputation of NaN values.

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

No branches or pull requests

2 participants