Created
July 6, 2021 06:56
-
-
Save anand086/3b10f51a9422e7242f6da4083736974f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fastai.tabular.all import * | |
path = untar_data(URLs.ADULT_SAMPLE) | |
dls = TabularDataLoaders.from_csv(path/'adult.csv', path=path, y_names="salary", | |
cat_names = ['workclass', 'education', 'marital-status', 'occupation', | |
'relationship', 'race'], | |
cont_names = ['age', 'fnlwgt', 'education-num'], | |
procs = [Categorify, FillMissing, Normalize]) | |
learn = tabular_learner(dls, metrics=accuracy) | |
learn.fit_one_cycle(3) | |
learn.show_results() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment