Closed MOREDataset closed 1 year ago
hi @MOREDataset
Thanks for opening the issue!
All models need to be wrap up in what can be called the "collector-class" WideDeep
please, see here: https://github.com/jrzaurin/pytorch-widedeep/blob/master/examples/scripts/adult_census.py
If you still have any questions let me know and I will post some code directly here
Cheers!
Hi @jrzaurin, Thank you for your quick response. Yes, a code to showcase how to train a deep learning model for regression (using only continuous data) would be very much appreciated.
@MOREDataset is it not the example and the library docs enough?
The code in the example does a classification, simply, when you use a target for regression, change the objective
param in the Trainer
class and off you go.
trainer = Trainer(model, objective="regression")
You have plenty of other examples (including regression) in the examples folder.
Cheers!
Hi,
I am new to using this library. I am trying to develop a regression model following the below script:
import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from sklearn.metrics import mean_squared_error from pytorch_widedeep import Trainer from pytorch_widedeep.models import TabMlp from pytorch_widedeep.preprocessing import TabPreprocessor
However, I get this error:
I do not know why this error happens or how to fix it. Can anyone help?