<div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)">Thank you, these articles discuss about ML application of the types of fingerprints I working with! I will read them thoroughly to get some hints.</div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)">In the meantime I tried to eliminate some features using RandomizedLasso and the performance escalated from R=0.067 using all 615 features to R=0.524 using only the 15 top ranked features. Naive question: does it make sense to use the RandomizedLasso to select the good features in order to train a MLP? I had the impression that RandomizedLasso uses multi-variate linear regression to fit the observed values to the experimental and rank the features.</div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)">Another question: this dataset consists of 31 observations. The Pearson's R values that I reported above were calculated using cross-validation. Could someone claim that they are inaccurate because the number of features used for training the MLP is much larger than the number of observations?</div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)"> </div></div><div class="gmail_extra"><br><div class="gmail_quote">On 19 December 2016 at 23:42, Sebastian Raschka <span dir="ltr"><<a href="mailto:se.raschka@gmail.com" target="_blank">se.raschka@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Oh, sorry, I just noticed that I was in the wrong thread — meant answer a different Thomas :P.<br>
<br>
Regarding the fingerprints; scikit-learn’s estimators expect feature vectors as samples, so you can’t have a 3D array … e.g., think of image classification: here you also enroll the n_pixels times m_pixels array into 1D arrays.<br>
<br>
The low performance can have mutliple issues. In case dimensionality is an issue, I’d maybe try stronger regularization first, or feature selection.<br>
If you are working with molecular structures, and you have enough of them, maybe also consider alternative feature representations, e.g,. learning from the graphs directly:<br>
<br>
<a href="http://papers.nips.cc/paper/5954-convolutional-networks-on-graphs-for-learning-molecular-fingerprints.pdf" rel="noreferrer" target="_blank">http://papers.nips.cc/paper/<wbr>5954-convolutional-networks-<wbr>on-graphs-for-learning-<wbr>molecular-fingerprints.pdf</a><br>
<a href="http://pubs.acs.org/doi/abs/10.1021/ci400187y" rel="noreferrer" target="_blank">http://pubs.acs.org/doi/abs/<wbr>10.1021/ci400187y</a><br>
<br>
Best,<br>
Sebastian<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> On Dec 19, 2016, at 4:56 PM, Thomas Evangelidis <<a href="mailto:tevang3@gmail.com">tevang3@gmail.com</a>> wrote:<br>
><br>
> this means that both are feasible?<br>
><br>
> On 19 December 2016 at 18:17, Sebastian Raschka <<a href="mailto:se.raschka@gmail.com">se.raschka@gmail.com</a>> wrote:<br>
> Thanks, Thomas, that makes sense! Will submit a PR then to update the docstring.<br>
><br>
> Best,<br>
> Sebastian<br>
><br>
><br>
> > On Dec 19, 2016, at 11:06 AM, Thomas Evangelidis <<a href="mailto:tevang3@gmail.com">tevang3@gmail.com</a>> wrote:<br>
> ><br>
> > ​​<br>
> > Greetings,<br>
> ><br>
> > My dataset consists of objects which are characterised by their structural features which are encoded into a so called "fingerprint" form. There are several different types of fingerprints, each one encapsulating different type of information. I want to combine two specific types of fingerprints to train a MLP regressor. The first fingerprint consists of a 2048 bit array of the form:<br>
> ><br>
> >  ​FP​1 = array([ 1.,  1.,  0., ...,  0.,  0.,  1.], dtype=float32)<br>
> ><br>
> > The second is a 60 float number array of the form:<br>
> ><br>
> > FP2 = array([ 2.77494618,  0.98973243,  0.34638652,  2.88303715,  1.31473857,<br>
> >        -0.56627112,  4.78847547,  2.29587913, -0.6786228 ,  4.63391109,<br>
> >        ...<br>
> >         0.        ,  0.        ,  5.89652792,  0.        ,  0.        ])<br>
> ><br>
> > At first I tried to fuse them into a single 1D array of 2048+60 columns but the predictions of the MLP were worse than the 2 different MLP models trained from one of the 2 fingerprint types individually. My question: is there a more effective way to combine the 2 fingerprints in order to indicate that they represent different type of information?<br>
> ><br>
> > To this end, I tried to create a 2-row array (1st row 2048 elements and 2nd row 60 elements) but sklearn complained:<br>
> ><br>
> > ​    mlp.fit(x_train,y_train)<br>
> >   File "/usr/local/lib/python2.7/<wbr>dist-packages/sklearn/neural_<wbr>network/multilayer_perceptron.<wbr>py", line 618, in fit<br>
> >     return self._fit(X, y, incremental=False)<br>
> >   File "/usr/local/lib/python2.7/<wbr>dist-packages/sklearn/neural_<wbr>network/multilayer_perceptron.<wbr>py", line 330, in _fit<br>
> >     X, y = self._validate_input(X, y, incremental)<br>
> >   File "/usr/local/lib/python2.7/<wbr>dist-packages/sklearn/neural_<wbr>network/multilayer_perceptron.<wbr>py", line 1264, in _validate_input<br>
> >     multi_output=True, y_numeric=True)<br>
> >   File "/usr/local/lib/python2.7/<wbr>dist-packages/sklearn/utils/<wbr>validation.py", line 521, in check_X_y<br>
> >     ensure_min_features, warn_on_dtype, estimator)<br>
> >   File "/usr/local/lib/python2.7/<wbr>dist-packages/sklearn/utils/<wbr>validation.py", line 402, in check_array<br>
> >     array = array.astype(np.float64)<br>
> > ValueError: setting an array element with a sequence.<br>
> > ​<br>
> ><br>
> > ​Then I tried to ​create for each object of the dataset a 2D array of size 2x2048, by adding 1998 zeros in the second row in order both rows to be of equal size. However sklearn complained again:<br>
> ><br>
> ><br>
> >     mlp.fit(x_train,y_train)<br>
> >   File "/usr/local/lib/python2.7/<wbr>dist-packages/sklearn/neural_<wbr>network/multilayer_perceptron.<wbr>py", line 618, in fit<br>
> >     return self._fit(X, y, incremental=False)<br>
> >   File "/usr/local/lib/python2.7/<wbr>dist-packages/sklearn/neural_<wbr>network/multilayer_perceptron.<wbr>py", line 330, in _fit<br>
> >     X, y = self._validate_input(X, y, incremental)<br>
> >   File "/usr/local/lib/python2.7/<wbr>dist-packages/sklearn/neural_<wbr>network/multilayer_perceptron.<wbr>py", line 1264, in _validate_input<br>
> >     multi_output=True, y_numeric=True)<br>
> >   File "/usr/local/lib/python2.7/<wbr>dist-packages/sklearn/utils/<wbr>validation.py", line 521, in check_X_y<br>
> >     ensure_min_features, warn_on_dtype, estimator)<br>
> >   File "/usr/local/lib/python2.7/<wbr>dist-packages/sklearn/utils/<wbr>validation.py", line 405, in check_array<br>
> >     % (array.ndim, estimator_name))<br>
> > ValueError: Found array with dim 3. Estimator expected <= 2.<br>
> ><br>
> ><br>
> > In another case of fingerprints, lets name them FP3 and FP4, I observed that the MLP regressor created using FP3 yields better results when trained and evaluated using logarithmically transformed experimental values (the values in y_train and y_test 1D arrays), while the MLP regressor created using FP4 yielded better results using the original experimental values. So my second question is: when combining both FP3 and FP4 into a single array is there any way to designate to the MLP that the features that correspond to FP3 must reproduce the logarithmic transform of the experimental values while the features of FP4 the original untransformed experimental values?<br>
> ><br>
> ><br>
> > I would greatly appreciate any advice on any of my 2 queries.<br>
> > Thomas<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > ==============================<wbr>==============================<wbr>==========<br>
> > Thomas Evangelidis<br>
> > Research Specialist<br>
> > CEITEC - Central European Institute of Technology<br>
> > Masaryk University<br>
> > Kamenice 5/A35/1S081,<br>
> > 62500 Brno, Czech Republic<br>
> ><br>
> > email: <a href="mailto:tevang@pharm.uoa.gr">tevang@pharm.uoa.gr</a><br>
> >               <a href="mailto:tevang3@gmail.com">tevang3@gmail.com</a><br>
> ><br>
> > website: <a href="https://sites.google.com/site/thomasevangelidishomepage/" rel="noreferrer" target="_blank">https://sites.google.com/site/<wbr>thomasevangelidishomepage/</a><br>
> ><br>
> ><br>
> > ______________________________<wbr>_________________<br>
> > scikit-learn mailing list<br>
> > <a href="mailto:scikit-learn@python.org">scikit-learn@python.org</a><br>
> > <a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/scikit-learn</a><br>
><br>
> ______________________________<wbr>_________________<br>
> scikit-learn mailing list<br>
> <a href="mailto:scikit-learn@python.org">scikit-learn@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/scikit-learn</a><br>
><br>
><br>
><br>
> --<br>
> ==============================<wbr>==============================<wbr>==========<br>
> Thomas Evangelidis<br>
> Research Specialist<br>
> CEITEC - Central European Institute of Technology<br>
> Masaryk University<br>
> Kamenice 5/A35/1S081,<br>
> 62500 Brno, Czech Republic<br>
><br>
> email: <a href="mailto:tevang@pharm.uoa.gr">tevang@pharm.uoa.gr</a><br>
>               <a href="mailto:tevang3@gmail.com">tevang3@gmail.com</a><br>
><br>
> website: <a href="https://sites.google.com/site/thomasevangelidishomepage/" rel="noreferrer" target="_blank">https://sites.google.com/site/<wbr>thomasevangelidishomepage/</a><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> scikit-learn mailing list<br>
> <a href="mailto:scikit-learn@python.org">scikit-learn@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/scikit-learn</a><br>
<br>
______________________________<wbr>_________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/scikit-learn</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div>


        
        
        
        

<p style="margin-bottom:0cm" align="LEFT"><span style="font-family:arial,helvetica,sans-serif"><font size="2">======================================================================</font></span></p>
<p style="margin-bottom:0cm" align="LEFT"><span style="font-family:arial,helvetica,sans-serif"><font size="2">Thomas Evangelidis</font></span></p>
<p style="margin-bottom:0cm" align="LEFT"><span style="font-family:arial,helvetica,sans-serif"><font size="2">Research Specialist<br></font></span></p><span style="font-family:arial,helvetica,sans-serif"><font size="2"><span style="color:rgb(0,0,0)">CEITEC - Central European Institute of Technology<br>Masaryk University<br>Kamenice 5/A35/1S081, <br>62500 Brno, Czech Republic <br></span></font></span></div><div dir="ltr"><br><p style="margin-bottom:0cm" align="LEFT"><span style="font-family:arial,helvetica,sans-serif"><font size="2">email: <a href="mailto:tevang@pharm.uoa.gr" target="_blank">tevang@pharm.uoa.gr</a></font></span></p>
<p style="margin-bottom:0cm" align="LEFT"><span style="font-family:arial,helvetica,sans-serif"><font size="2">               <a href="mailto:tevang3@gmail.com" target="_blank">tevang3@gmail.com</a></font></span></p>
<p style="margin-bottom:0cm" align="LEFT"><span style="font-family:arial,helvetica,sans-serif"><font size="2"><br>website:
<a href="https://sites.google.com/site/thomasevangelidishomepage/" target="_blank">https://sites.google.com/site/thomasevangelidishomepage/</a></font></span></p><br><p style="margin-bottom:0cm" align="LEFT">
</p>
</div></div></div></div>
</div>