deepchem/DeepLearningLifeSciences

error of Classification metric can't handle a mix of binary and continous metric mean-matthews_corrcoef

VirtualChemist opened this issue · 2 comments

Hi,
While using the dude_erk2_mk01.csv as input on jupyer notebook code for (chapter_11_02_erk2_graph_conv.ipynb), I am experiencing the following error..

/home/surendra/anaconda3/lib/python3.6/site-packages/deepchem/metrics/init.py:312: UserWarning: Error calculating metric mean-matthews_corrcoef: Classification metrics can't handle a mix of binary and continuous-multioutput targets
warnings.warn("Error calculating metric %s: %s" % (self.name, e))
/home/surendra/anaconda3/lib/python3.6/site-packages/numpy/core/fromnumeric.py:2920: RuntimeWarning: Mean of empty slice.
out=out, **kwargs)
/home/surendra/anaconda3/lib/python3.6/site-packages/numpy/core/_methods.py:85: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)

the output i am getting is

computed_metrics: [nan]
computed_metrics: [nan]
[nan]
[nan]
computed_metrics: [nan]
computed_metrics: [nan]
[nan, nan]
[nan, nan]
computed_metrics: [nan]
computed_metrics: [nan]
[nan, nan, nan]
[nan, nan, nan]
computed_metrics: [nan]
computed_metrics: [nan]
[nan, nan, nan, nan]
[nan, nan, nan, nan]
computed_metrics: [nan]
computed_metrics: [nan]
[nan, nan, nan, nan, nan]
[nan, nan, nan, nan, nan]
computed_metrics: [nan]
computed_metrics: [nan]
[nan, nan, nan, nan, nan, nan]
[nan, nan, nan, nan, nan, nan]
computed_metrics: [nan]
computed_metrics: [nan]
[nan, nan, nan, nan, nan, nan, nan]
[nan, nan, nan, nan, nan, nan, nan]
computed_metrics: [nan]
computed_metrics: [nan]
[nan, nan, nan, nan, nan, nan, nan, nan]
[nan, nan, nan, nan, nan, nan, nan, nan]
computed_metrics: [nan]
computed_metrics: [nan]
[nan, nan, nan, nan, nan, nan, nan, nan, nan]
[nan, nan, nan, nan, nan, nan, nan, nan, nan]
computed_metrics: [nan]
computed_metrics: [nan]
[nan, nan, nan, nan, nan, nan, nan, nan, nan, nan]
[nan, nan, nan, nan, nan, nan, nan, nan, nan, nan]

Can you please help me out, why this kind of problem is happening.

Thanks

Surendra

Hi Surendra,

I just ran this notebook and everything worked. Here's what I did, is this consistent with the way you built your environment?

conda create -n dctest python=3.6
conda activate dctest
conda install -c deepchem -c rdkit -c conda-forge -c omnia deepchem-gpu=2.2.0
git clone https://github.com/deepchem/DeepLearningLifeSciences.git
cd DeepLearningLifeSciences/Chapter11/
jupyter notebook chapter_11_02_erk2_graph_conv.ipynb

It sounds like something is wrong with the dataframe created from dude_erk2_mk01.csv
Try reading the dataframe and looking at what's there. You can do something like this:
df = pd.read_csv("dude_erk2_mk01.csv")
df.info()

You should see:
RangeIndex: 4629 entries, 0 to 4628
Data columns (total 4 columns):
Unnamed: 0 4629 non-null int64
SMILES 4629 non-null object
ID 4629 non-null object
is_active 4629 non-null int64
dtypes: int64(2), object(2)
memory usage: 144.7+ KB

Hi PatWalters,

Thanks for the information and help.

It worked perfectly.

Once again thanks for your help.

Thanks,

Surendra