Giter Club home page Giter Club logo

erisk2022-lausan's Introduction

eRisk2022-LauSAn

Setup

  1. Install dependencies:
    $ pip install -r requirements.txt
  2. Copy data for task 2 into the data directory.

Training

We use two different train/test sets for evaluating our models before submission. To train on set 1:

$ python src/main.py train ModelType --data data/train_set_1.txt

By default, the model will be saved with a timestamp in the filename in the current working directory. Use python src/main.py train --help to see available model types and other options.

To optimize the threshold scheduler parameters, use:

$ python src/main.py optimize-threshold my_model.pickle --metrics erde5 erde50 latency-f1 --data data/train_set_1.txt

This will perform grid search over a range of parameter values defined in the model class and store the optimized model in a second file (by default, appending .optimized to the filename base).

To see information about a saved model, including optimized threshold scheduler parameters, use python src/main.py info my_model.pickle.

Testing

The final submission will work via a JSON API, so we use a local dummy API (running at http://localhost:5000) with the same interface to evaluate our results and test our submission client during development.

  1. Run the local submission API, providing the test set and the number of runs as an argument. For example, using our test set 1:
    $ python src/api.py --data data/test_set_1.txt --runs 2
  2. Run the submission client (one model per run):
    $ python src/main.py submit path/to/model1 path/to/model2 ...
  3. Go to http://localhost:5000/results to analyze results.

erisk2022-lausan's People

Contributors

l-stahlhut avatar neo-y avatar saeub avatar

Stargazers

 avatar

Watchers

 avatar

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.