Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dcurves

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dcurves

A Python package for Decision Curve Analysis to evaluate prediction models, molecular markers, and diagnostic tests. For RELEASE NOTES, check RELEASE.md here: https://github.com/MSKCC-Epi-Bio/dcurves/RELEASE.md

  • 1.1.1
  • PyPI
  • Socket score

Maintainers
1

dcurves

Diagnostic and prognostic models are typically evaluated with measures of accuracy that do not address clinical consequences. Decision-analytic techniques allow assessment of clinical outcomes, but often require collection of additional information that may be cumbersome to apply to models that yield continuous results.

Decision Curve Analysis is a method for evaluating and comparing prediction models that incorporates clinical consequences, requiring only the data set on which the models are tested, and can be applied to models that have either continuous or dichotomous results.

Functions

dcurves is a Python package for performing Decision Curve Analysis (DCA). It evaluates and compares prediction models for both binary and survival outcomes.

Main functions:

  • dca(): Performs Decision Curve Analysis, calculating net benefit and interventions avoided
  • plot_graphs(): Visualizes DCA results
  • load_test_data(): Provides sample data for testing and examples

Simple Tutorial

This tutorial will guide you through installing and using the dcurves package to perform Decision Curve Analysis (DCA) with sample cancer diagnosis data.

Installation (bash)

# Install dcurves for DCA
pip install dcurves

# Install other required packages
pip install pandas numpy statsmodels lifelines

DCA Example

# Import Libraries
from dcurves import dca, plot_graphs, load_test_data
import pandas as pd
import numpy as np

# Load Package Simulation Data
df_binary = load_test_data.load_binary_df()

# Perform Decision Curve Analysis
df_dca = \
        dca(
            data=df_binary,
            outcome='cancer',
            modelnames=['famhistory'],
            thresholds=np.arange(0, 0.36, 0.01),
        )

# Standard DCA Plot
plot_graphs(
    plot_df=df_dca,
    graph_type='net_benefit',
    y_limits=[-0.05, 0.2]
)

DCA Plot

In-depth Tutorial and Explanations with Examples, Relevant Literature, and Forumn for Personalized Help

Visit https://www.decisioncurveanalysis.org

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Contributors

License

Apache 2.0

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc