MSKCC-Epi-Bio/dcurves

Latest version of dcurves on PyPi is not up-to-date with the package

PaulHiemstra opened this issue · 1 comments

I tried to use the smooth_frac parameter of plot_graphs, but this did not work for the PyPi version of the package. When installing directly from this github it worked:

pip install git+https://github.com/MSKCC-Epi-Bio/dcurves.git

Are there plans to update the PyPi version? Or is it up-to-date and have I done something wrong on my end?

Hi Paul,

There shouldn't be any differences between the PyPI and the GitHub dev dcurves as I pushed to PyPI after the very last commit I made to the GitHub repo. I'm very curious to see your code and/or hear about how you set up your environment. Perhaps you're using an older version of dcurves in your environment and you can try specifying the latest one (1.1.0).

I ran this code, which is using the dcurves from PyPI, and smooth_frac is working just fine:

from dcurves import dca, plot_graphs
  
import pandas as pd
import numpy as np
import statsmodels.api as sm
import lifelines


df_cancer_dx = pd.read_csv('https://raw.githubusercontent.com/ddsjoberg/dca-tutorial/main/data/df_cancer_dx.csv')


dca_multi_df = \
    dca(
        data=df_cancer_dx,
        outcome='cancer',
        modelnames=['famhistory', 'cancerpredmarker'],
        thresholds=np.arange(0,0.36,0.01)
    )

plot_graphs(
    plot_df=dca_multi_df,
    y_limits=[-0.05, 0.2],
    graph_type='net_benefit',
    smooth_frac=0.5
)