Giter Club home page Giter Club logo

plsample's Introduction

Regression Sample with PyTorch-Lightning

This repository contains the solution to the problem outlined in instructions, along with the model, training code in pytorch with pytorch-lightning, results and tensorboard logs collected during training.

Model definition

Model definition and training loop is present in plnn_module.py file. The current model may be a bit huge for the problem at hand, but it gives reasonable results, which can be verified by the training and validation loss given in the tensorboard logs. Given more time it might be possible to finetune the model and hyper parameters further using automated methods. The model definition can be easily customized by changing the hidden_layers arrray defining the neurons in each hidden layer.

Results

The model achieved reasonable results for the training and test data that was provided. The MAE (L1Loss) for validation was 0.2, when the training was finished. The result from the inference is saved in a separate column with label 'Y', along with inputs, in the file test_pred.csv.

The model checkpoint is saved in checkpoints folder and training logs are saved in logs folder. It can be inspected using tensorboard.

Training and validation loss during training is given in the following graphs.

Training Loss Validation Loss

Training progress and learning rate change are shown in the logs below.

Validation Loss

Running the program

Run program.py after installing pytorch, pytorch-lightning and pandas. Default parameters are included in the program, but can be customized using commandline arguments. It should be possible to replicate the same results as random seed is fixed and deterministic option is turned on for pytorch-lightning.

Basic sanity checks for the data can be done using 'data_analysis.ipynb'.

Warning!

No error handling is done in the current version.

plsample's People

Contributors

vrvlive 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.