Giter VIP home page Giter VIP logo

snakepot's Introduction

snakepot

snakepot_logo

snakepot is a snakemake workflow designed to train and evaluate a binary classifier using the TPOT auto-ML library.

Quick Start

  1. Install snakepot (requires conda)

  2. Edit parameters in config.json

  3. Run snakemake

  4. View outputs in new directory

Features

I developed snakepot during my elective at the William Harvey Research Institute. We used snakepot to quickly train a baseline model on a variety of gene-phenotype datasets. The workflow takes the following steps:

  1. Clean the data set (simple N/A drop by rows and explicit drop by columns)
  2. Split data into train/test/validate sets
  3. Call the TPOT automated machine learning algorithm to train a classifier
  4. Save classifier and re-run it on the houldout/validation data
  5. Evaluate the classifier on the holdout set
  6. Call the classifier for predictions on the unlabelled data

An example dataset (/test/data.csv) and config file (config.json) are provided.

Setup

# Build conda environment
conda env create -f environment.yaml
conda activate snakepot
# Install python helper scripts to path
pip install . 
# Run the workflow in Snakefile using config.json
snakemake 

config.json

Parameter Description
directory Output directory for new files
input Input CSV file. All data must be encoded as binary or continuous variables
drop_columns Features to drop from the data. Skipped if not found
encode_columns Categorical features to encode. Skipped if not found
target_column The name of the target variable
target_1 Target variable value to label as '1'
target_0 Target variable value to label as '0'
to_predict Target variable value for final predictions
perc_split Percentage of training data (target '1' or '0') to split for holdout set
TPOT_max_time Maximum time to run TPOT in muntes

License

MIT License. Copyright (c) 2019 Nana Mensah

snakepot's People

Watchers

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