Prior to fast.ai, I’ve mainly acquainted myself with scikit-learn and Keras and have been used to manually cleaning the data into X and Y and calling fit() on a model object.
I’m a little embarrassed to admit I still don’t know how to put together a minimal neural network in Fast.ai and use it to fit a generic dataset, the way you call fit() in sklearn or keras.
Let’s say I have a dead simple dataset like the following, how would I fit it using Fast.ai?
import numpy as np
X = np.array([3,5,6,1,32,2,9,22,14,5])
Y = np.array([45,23,44,5,71,2,33,1,12,13])
What’s Fast.ai’s equivalent of a bare-minimum model for fitting X and Y?
I see that in Lesson 3 (Rossman), there were some steps like the following in the “DL” section:
md = ColumnarModelData.from_data_frame(PATH, val_idx, df, yl.astype(np.float32), cat_flds=cat_vars, bs=128, test_df=df_test)
cat_sz = [(c, len(joined_samp[c].cat.categories)+1) for c in cat_vars]
emb_szs = [(c, min(50, (c+1)//2)) for _,c in cat_sz]
m = md.get_learner(emb_szs, len(df.columns)-len(cat_vars),
0.04, 1, [1000,500], [0.001,0.01], y_range=y_range)
<... skip ... >
m.fit(lr, 3, metrics=[exp_rmspe])
What’s the simplest model in the Fast.ai stack that’ll fit X and Y here without any frills (and we can get to the frills later once we figure that the fit is imperfect)?