GithubHelp home page GithubHelp logo

Comments (5)

songyouwei avatar songyouwei commented on May 11, 2024 4

Datasets are of course an important factor.
The average result of K-fold cross-validation can be used to evaluate the generalization ability of the model, which is useful for model design and hyperparamter selection.

from absa-pytorch.

xiliu-m avatar xiliu-m commented on May 11, 2024 1

Hi Youwei, now I gain the results as following, whether they are normal or still problematic?
Twitter
(seed=0) test_acc: 0.7211, test_f1: 0.7101 10 fold mean_test_acc: 0.7211, mean_test_f1: 0.7075
Restaurant
(seed=0) test_acc: 0.8187, test_f1: 0.7066 10 fold mean_test_acc: 0.8036, mean_test_f1: 0.6787

the parameter settings are:
parser.add_argument('--model_name', default='aen_bert', type=str)
parser.add_argument('--dataset', default='twitter', type=str, help='twitter, restaurant, laptop')
parser.add_argument('--optimizer', default='adam', type=str)
parser.add_argument('--initializer', default='xavier_uniform_', type=str)
parser.add_argument('--learning_rate', default=2e-5, type=float, help='try 5e-5, 2e-5 for BERT, 1e-3 for others')
parser.add_argument('--dropout', default=0.1, type=float)
parser.add_argument('--l2reg', default=0.01, type=float)
parser.add_argument('--num_epoch', default=10, type=int, help='try larger number for non-BERT models')
parser.add_argument('--batch_size', default=32, type=int, help='try 16, 32, 64 for BERT models')
parser.add_argument('--log_step', default=10, type=int)
parser.add_argument('--embed_dim', default=300, type=int)
parser.add_argument('--hidden_dim', default=300, type=int)
parser.add_argument('--bert_dim', default=768, type=int)
parser.add_argument('--pretrained_bert_name', default='bert-base-uncased', type=str)
parser.add_argument('--max_seq_len', default=80, type=int)
parser.add_argument('--polarities_dim', default=3, type=int)
parser.add_argument('--hops', default=3, type=int)
parser.add_argument('--device', default=None, type=str, help='e.g. cuda:0')
parser.add_argument('--seed', default=0, type=int, help='set seed for reproducibility')
parser.add_argument('--cross_val_fold', default=10, type=int, help='k-fold cross validation')

from absa-pytorch.

songyouwei avatar songyouwei commented on May 11, 2024

This result is obviously problematic. I'm not sure what the problem is, you can set batch_size=32, seed=0, and try again.

from absa-pytorch.

songyouwei avatar songyouwei commented on May 11, 2024

This result is normal.

from absa-pytorch.

xiliu-m avatar xiliu-m commented on May 11, 2024

ok. Thanks! Btw, the laptop results (seed=0) are: test_acc: 0.7915, test_f1: 0.7454 mean_test_acc: 0.7652, mean_test_f1: 0.7138.
It seems that the result will be influenced a lot by dataset? If I want to use model on a typical domain dataset(like financial text), what is the best way to create an innovative model? Mayby just try the 10-fold experiment and use the best record one?

from absa-pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.