xypan1232 / IPMiner

Predicting ncRNA-protein interaction using high-level features based on deep learning
15 stars 8 forks source link

the problem about updating IPMiner #6

Closed Ci-TJ closed 1 year ago

Ci-TJ commented 5 years ago

Hi! I would use the IPMiner for testing the dataset for a long time, but IPMiner depends on python2, I wonder whether you will update IPMiner for python2' unavailibility? Ci

xypan1232 commented 5 years ago

I guess you mean "update IPMiner to python 3"? since IPMiner also depends on an older Keras version and scikie-learn, which all use python 2. now we do not have plan to upgrade IPMiner to python3. I recommend you use Virtualenv ( https://virtualenv.pypa.io/en/latest/) to configure the environment for IPMiner and this will not affect other programs.

  1. virtualenv py2env --python=python2.7
  2. source py2env/bin/activate
  3. install all dependency of IPMiner in this environment, and run IPMiner.
Ci-TJ commented 5 years ago

Thank you for your reply! And I will try it following your suggetions in 2020!

Ci-TJ commented 5 years ago

@xypan1232 Hi! Does the predicting score scale from 0 to 1? and is interaction threshold 0.? What's more, I found the predicting score is not changeless; is there any problem?

_root@linqin-GF63-8RD:/home/linqin/RPImethod/IPMiner-master# python IPMiner.py -r RNA1 -p Hur /usr/local/lib/python2.7/dist-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release. from numpy.core.umath_tests import inner1d WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions. please install Keras 0.1.2 RPI488 dataset (486, 343) (486, 256) (1, 343) (1, 256) autoencode learning Training the layer 1: Input 343 -> Output 256 /usr/local/lib/python2.7/dist-packages/Theano-1.0.4-py2.7.egg/theano/tensor/subtensor.py:2197: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result. rval = inputs[0].getitem(inputs[1:]) (486, 256) Training the layer 2: Input 256 -> Output 128 (486, 128) Training the layer 3: Input 128 -> Output 64 (486, 64) Training the layer 1: Input 256 -> Output 256 (486, 256) Training the layer 2: Input 256 -> Output 128 (486, 128) Training the layer 3: Input 128 -> Output 64 (486, 64) (486, 256) (486, 128) (486, 64) (486, 256) (486, 128) (486, 64) fine tunning number of layers: 3 deep autoencoder Training classifier [0] Fold [0] Fold [1] Fold [2] Y_dev.shape = 486 deep autoencoder without fine tunning Training classifier [1] Fold [0] Fold [1] Fold [2] Y_dev.shape = 486 random forest Training classifier [2] Fold [0] Fold [1] Fold [2] Y_dev.shape = 486 stacked ensembling ('RNA1', 'HUR') 0.19628884226520887 root@linqin-GF63-8RD:/home/linqin/RPImethod/IPMiner-master# python IPMiner.py -r RNA1 -p Hur | tail -1 /usr/local/lib/python2.7/dist-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release. from numpy.core.umath_tests import inner1d WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions. /usr/local/lib/python2.7/dist-packages/Theano-1.0.4-py2.7.egg/theano/tensor/subtensor.py:2197: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result. rval = inputs[0].getitem(inputs[1:]) ('RNA1', 'HUR') 0.294903181602232 root@linqin-GF63-8RD:/home/linqin/RPImethod/IPMiner-master# python IPMiner.py -r RNA1 -p Hur | tail -1 /usr/local/lib/python2.7/dist-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release. from numpy.core.umath_tests import inner1d WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions. /usr/local/lib/python2.7/dist-packages/Theano-1.0.4-py2.7.egg/theano/tensor/subtensor.py:2197: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result. rval = inputs[0].getitem(inputs[1:]) ('RNA1', 'HUR') 0.34817699784710776 root@linqin-GF63-8RD:/home/linqin/RPImethod/IPMiner-master# python IPMiner.py -r RNA1 -p Hur | tail -1 /usr/local/lib/python2.7/dist-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release. from numpy.core.umathtests import inner1d WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions. /usr/local/lib/python2.7/dist-packages/Theano-1.0.4-py2.7.egg/theano/tensor/subtensor.py:2197: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result. rval = inputs[0].getitem(inputs[1:]) ('RNA1', 'HUR') 0.31400924404996705

Best! Ci

xypan1232 commented 5 years ago

the default threshold is 0.5, maybe you need tune it according to your data. Maybe it is better to fix the random init number, many parameters in deep models are randomly initialed at the beginning, which has some impact on the final prediction value.

Ci-TJ commented 4 years ago

Get it, thank you!