Open rruizdeaustri opened 7 months ago
Hey @rruizdeaustri
I will have a more detail look, but in general here are some comments:
optimizers
and schedures
are not correctly defined. The Trainer
not throwing an error is intentional, I might change it, but just define your Trainer as trainer = Trainer(
model,
objective="binary",
callbacks=[ModelCheckpoint(filepath="model_weights/wd_out")],
metrics=[Accuracy],
)
I hope this helps and let me know how you get on with this, see if I can help more
Hi @jrzaurin,
I have made the modifications you suggested and results make more sense now. I'm optimising hyper-parameters with optima in resnet and transformer models but the results are far from the one got with LightGMB: AUC ~0.93 versus ~ 0.98 for lgqbm
Thanks !
Rbt
Hey @rruizdeaustri
Thanks for sharing the results :)
0.05 is perhaps a bit too much, maybe I can look at some examples if you would be willing to share them. However, I am afraid that this is the "brutal" reality for most (true) real world cases when it comes to DL vs GBMs.
You could try some other libraries see if their implementations are better or you get better results (?)
In my experience I have used DL for tabular data in a few occasions, but never aimed to beat GBMs, since I knew was a lost battle.
Hi @jrzaurin,
Yes, these are too much differences !
I could share with you the files I'm using to train as well as the data if you like. Let me know !
Thanks !
Hey @rruizdeaustri !
I am traveling at the moment, but if you join the slack channel we can move the conversation there and we can share the files. See if I have the time to give it a go myself! :)
Thanks!
Hello,
I'm trying to classify events for a dark matter direct detection experiment which are tabulated in some optimal features (data are continuous). When I run both xgboost and lgbm algorithms I get AUCs about 0.98. When I run an MLP model (without optimisation) I get about 0.93 which is a bit far from the decision trees but maybe this is the best one can get with an MLP. The issue comes with the transformer models. From those I get just like a random classifier (~0.5) so there must be wrong in my script but it is not obvious to me identify the issue. Could you pls have a look at my script and tell me if you see something wrong ? This is my script:
import numpy as np import torch import pandas as pd
from pytorch_widedeep.initializers import XavierNormal from pytorch_widedeep import Trainer from pytorch_widedeep.models import ( SAINT, Wide, WideDeep, TabPerceiver, FTTransformer, TabFastFormer, TabTransformer, ) from pytorch_widedeep.metrics import Accuracy, Precision from pytorch_widedeep.datasets import load_adult from pytorch_widedeep.callbacks import ( LRHistory, EarlyStopping, ModelCheckpoint, ) from pytorch_widedeep.preprocessing import TabPreprocessor from pytorch_widedeep.initializers import XavierNormal, KaimingNormal
from torchmetrics import AUROC
from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report, roc_auc_score, roc_curve
use_cuda = torch.cuda.is_available()
if name == "main":
Thanks a lot !
Roberto