Code Monkey home page Code Monkey logo

adaptivesplit's Introduction

AdaptiveSplit

A Scikit-Learn compatible Adaptive training-validation split during prospective data acquisition to improve the development and external validation of predictive models.

Scikit-Learn example usage:

from adaptivesplit.sklearn_interface.split import AdaptiveSplit

X = "your predictors here"
y = "your target here"

model = "an sklearn estimator"

adsplit = AdaptiveSplit(total_sample_size=len(y), plotting=True)
res, fig = adsplit(X, y, model, fast_mode=True, predict=False, random_state=42)
stop = res.estimated_stop

This prints out the results and plots the learning and power curves. An extended, working example can be found in "notebooks/example.ipynb"

Documentation

The package documentation is available in "docs/_build/html/index.html".

Concept

You can find an extensive illustration of the concept behind the AdaptiveSplit package in our preprint here. The paper also describes why AdaptiveSplit is preferable to a fixed data splitting strategy (e.g pareto split).

The concept, in short, is shown by the image below: alt text The "adaptive splitting design" for prospective predictive modeling studies: (A) show a normal study pre-registration, the model with its parameters is first pre-registered, then trained and validated. (B) With AdaptiveSplit, the model is trained to fix its parameters and the training sample size, then it is registered and subsequently acquired data is used for external validation.

Phases of a prospective study with AdaptiveSplit:

  • The study starts by pre-registering the stopping rule (C),
  • During the training phase, candidate models are trained and the splitting rule is repeatedly evaluated, as the data acquisition proceeds (R1)
  • When the splitting rule activates, the model is finalized using the training samples (R2)
  • Finally, data acquisition continues and the prospective external validation is performed on the newly acquired data.

adaptivesplit's People

Contributors

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