You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For time series classification tasks, if there is an imbalance in the data among categories, such as three categories where one category greatly outnumbers the others, how should I handle it? For example, by modifying the loss function to assign different weights to different categories. How should I modify the following code? model = TST(dls.vars, dls.c, dls.len, dropout=.3, fc_dropout=.8).to(device) learn = Learner(dls, model, loss_func=LabelSmoothingCrossEntropyFlat(),metrics=[accuracy], cbs=ShowGraphCallback2()) start = time.time() learn.fit_one_cycle(50, lr_max=1e-4) print('\nElapsed time:', time.time() - start) learn.plot_metrics()
The text was updated successfully, but these errors were encountered:
For time series classification tasks, if there is an imbalance in the data among categories, such as three categories where one category greatly outnumbers the others, how should I handle it? For example, by modifying the loss function to assign different weights to different categories. How should I modify the following code?
model = TST(dls.vars, dls.c, dls.len, dropout=.3, fc_dropout=.8).to(device) learn = Learner(dls, model, loss_func=LabelSmoothingCrossEntropyFlat(),metrics=[accuracy], cbs=ShowGraphCallback2()) start = time.time() learn.fit_one_cycle(50, lr_max=1e-4) print('\nElapsed time:', time.time() - start) learn.plot_metrics()
The text was updated successfully, but these errors were encountered: