[scikit-learn] MLPClassifier as a feature selector

Thomas Evangelidis tevang3 at gmail.com
Fri Dec 29 06:09:00 EST 2017


Alright, with these attributes I can get the weights and biases, but what
about the values on the nodes of the last hidden layer? Do I have to work
them out myself or there is a straightforward way to get them?

On 7 December 2017 at 04:25, Manoj Kumar <manojkumarsivaraj334 at gmail.com>
wrote:

> Hi,
>
> The weights and intercepts are available in the coefs_ and intercepts_
> attribute respectively.
>
> See https://github.com/scikit-learn/scikit-learn/blob/
> a24c8b46/sklearn/neural_network/multilayer_perceptron.py#L835
>
> On Wed, Dec 6, 2017 at 4:56 PM, Brown J.B. via scikit-learn <
> scikit-learn at python.org> wrote:
>
>> I am also very interested in knowing if there is a sklearn cookbook
>> solution for getting the weights of a one-hidde-layer MLPClassifier.
>> J.B.
>>
>> 2017-12-07 8:49 GMT+09:00 Thomas Evangelidis <tevang3 at gmail.com>:
>>
>>> Greetings,
>>>
>>> I want to train a MLPClassifier with one hidden layer and use it as a
>>> feature selector for an MLPRegressor.
>>> Is it possible to get the values of the neurons from the last hidden
>>> layer of the MLPClassifier to pass them as input to the MLPRegressor?
>>>
>>> If it is not possible with scikit-learn, is anyone aware of any
>>> scikit-compatible NN library that offers this functionality? For example
>>> this one:
>>>
>>> http://scikit-neuralnetwork.readthedocs.io/en/latest/index.html
>>>
>>> I wouldn't like to do this in Tensorflow because the MLP there is much
>>> slower than scikit-learn's implementation.
>>>
>>>
>>> Thomas
>>>
>>>
>>> --
>>>
>>> ======================================================================
>>>
>>> Dr Thomas Evangelidis
>>>
>>> Post-doctoral Researcher
>>> CEITEC - Central European Institute of Technology
>>> Masaryk University
>>> Kamenice 5/A35/2S049,
>>> 62500 Brno, Czech Republic
>>>
>>> email: tevang at pharm.uoa.gr
>>>
>>>           tevang3 at gmail.com
>>>
>>>
>>> website: https://sites.google.com/site/thomasevangelidishomepage/
>>>
>>>
>>> _______________________________________________
>>> scikit-learn mailing list
>>> scikit-learn at python.org
>>> https://mail.python.org/mailman/listinfo/scikit-learn
>>>
>>>
>>
>> _______________________________________________
>> scikit-learn mailing list
>> scikit-learn at python.org
>> https://mail.python.org/mailman/listinfo/scikit-learn
>>
>>
>
>
> --
> Manoj,
> http://github.com/MechCoder
>
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
>


-- 

======================================================================

Dr Thomas Evangelidis

Post-doctoral Researcher
CEITEC - Central European Institute of Technology
Masaryk University
Kamenice 5/A35/2S049,
62500 Brno, Czech Republic

email: tevang at pharm.uoa.gr

          tevang3 at gmail.com


website: https://sites.google.com/site/thomasevangelidishomepage/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20171229/40eaa98c/attachment.html>


More information about the scikit-learn mailing list