Hi,
I trained a tabular pandas model, and as part of this training, I normalized the dataset following the example in the book. I want to deploy my model on a separate dataset (“test_df”), but first I need to normalize the data in test_df
using the same normalization routine (e.g., min max scaler using the same min and max) as was used with the training dataset. I assume there is a way to extract the normalization procedure from the TabularPandas
, but I haven’t been able to figure it out. Here is a basic example:
procs_nn = [Categorify, Normalize]
splits = RandomSplitter(valid_pct=0.2)(range_of(df))
to_nn = TabularPandas(df, procs_nn,
cat_names=None, cont_names=cont_nn, y_names='y',
splits=splits)
Ideally, there would be some way for me to normalize my test_df
the same way these training/validation data were normalized. E.g.,
to_nn.normalize(test_df)
Except when I do this, the output is identical to test_df
. The column names in df
and test_df
are identical.
I am using fastai v. 2.7.7
Note I also posted this in the 2019 forum yesterday. Sorry for crossposting, but I’m new here and learning my way around.