Created
January 22, 2019 14:54
-
-
Save holmesal/fc2d26f67caa52a44b4d92ed074f1cba to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# stick our data in a dataframe: | |
df = pd.DataFrame({'x': x, 'y': y}); | |
# use 20% of our data for validation: | |
valid_idx = random.sample(list(df.index), int(0.2 * len(df))); | |
# what we're predicting: | |
dep_var = 'y' | |
# we don't have any categorical variables: | |
cat_names = [] | |
# create a FastAI TabularDataBunch | |
data = TabularDataBunch.from_df(df=df, | |
dep_var=dep_var, | |
valid_idx=valid_idx, | |
cat_names=cat_names, | |
path=path, | |
bs=64, | |
procs=[]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment