Taking log of y variable in regression

I am in the middle of converting some models from V1 to V2. When building a dataloader in fastai V1, you pass log=True to label_from_df to indicate that you wanted to take the logarithm of your y variable. It would take it into account during training while reversing the transformation when predicting.

Is there an equivalent for fastai V2 or has the functionality been dropped ?

It has been dropped: A walk with fastai2 - Tabular - Study Group and Online Lectures Megathread

1 Like

There is not, so you should preprocess with the log.

1 Like

If we did want to, we’d likely tie this to RegressionBlock as a transform or something

I have tried making my own LogRegressionBlock for that purposed but I got an error (even when I just copy pasted the code for the original RegressionBlock) so I left it.