Git Product home page Git Product logo

tr7200 / youdens_index Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 3.0 32 KB

PyTorch and Tf-Keras implementations of an epidemiology metric from Kaivanto (2008), suitable for imbalanced data

Home Page: https://d1wqtxts1xzle7.cloudfront.net/50608735/Maximization_of_the_sum_of_sensitivity_a20161129-31300-uod3px.pdf?1480411817=&response-content-disposition=inline%3B+filename%3DMaximization_of_the_sum_of_sensitivity_a.pdf&Expires=1592161108&Signature=aZUQY9

License: MIT License

Python 100.00%
imbalanced-data epidemiology suitable sensitivity measure

youdens_index's Introduction

Youdens_index

Youden's index, a metric for imbalanced data with Tensorflow-Keras and PyTorch. Keras 2.2.4 and Tensorflow 1.13.

Custom Keras metric that measures the maximization of sensitivity and specificity following Kaivanto (2008):

Kaivanto, K. (2008).
Maximization of the sum of sensitivity and specificity as a diagnostic cutpoint criterion
Journal of clinical epidemiology, 61, 516-518.

Imbalanced datasets need a custom metric function is used to help evaluate the best epoch to use for prediction. Youden's index is one such metric. It is a measure from epidemiology that is somewhat similar to the geometric mean of the sum of sensitivity and specificity, a measure that is often used to score machine learning models with imbalanced data He and Garcia 2009.

Usage:

model = Sequential()
...
model.compile(..., metrics=['accuracy', youdens_index], ...)

result = model.fit(train_x,
                   train_y,
                   ...)

This metric is suitable for training with imbalanced classification models.

python setup.py install to install.

MIT License

youdens_index's People

Contributors

tr7200 avatar

Stargazers

 avatar  avatar  avatar

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.