Giter Club home page Giter Club logo

complicated_cdi_prediction's Introduction

Overview

Usage

  1. import helpers_log_reg as log_reg
  2. Call function: log_reg.do_log_reg(X, y, feature_dict, train_indices, test_indices, C_range, k_best_range, n_random_iters, random_split)
    • Input: feature matrix, labels, indices (for temporal data splits), hyperparameter ranges, and settings for random data splits
    • Does: five-fold cross-validation and model-training
    • Output: optimal hyperparameters, model performance, and figures

Parameters

  • X: nxd feature matrix where n = number of examples and d = number of features
  • y: n-length labels vector. The ith row (example) in X must correspond to the ith label in y
  • feature_dict: for random splits, can pass in dictionary of features with key=index and value=feature name for analysis of most important features
  • train_indices: for temporal splits. These must be the first 80% (or 50%, 60%, 90%, etc.) of the rows in X for the temporal c-v to work correctly. For example, if X is 100x20, train_indices must be the first 80 rows
  • test_indices, for temporal splits. These must be the last 20% (or 50%, 40%, 10%, etc.) of the rows in X
  • C_range: list of C regularization hyperparameters for L2 regularization to test
  • k_best_range: list of k hyperparamters for chi-square feature selection to test. k_best_range = [X.shape[1]] means no filter feature selection
  • n_random_iters. for random splits. Number of random split experiments to run
  • random_split: True for random splits, False for (single) temporal splits

Authors

  • Benjamin Y. Li, Jeeheh Oh, Vincent B. Young, Krishna Rao, and Jenna Wiens

complicated_cdi_prediction's People

Contributors

benyli avatar

Stargazers

 avatar

Watchers

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