Hi Maciek,

Thanks!  My brain was stuck on this for a while, as it has been ages since
I have written any Python.

BTW- I also took a look at your ODDT, and it reminded me that I need to get
the OB python wrappers re-compiled.  :)

Thanks,
Matthew

On Fri, Feb 20, 2015 at 1:06 AM, Maciek Wójcikowski <mac...@wojcikowski.pl>
wrote:

> Hello,
>
> If I can remember correctly coefficients are Numpy array. You can try
> model.coef_.flatten() to get flat Numpy Array. If you really want a
> python list, then you probably should wrap it up with list(model.
> coef_.flatten()).
>
> The main reason, why the vector is nested is that you can have many
> output values for one feature vector.
>
> PS.
> I could also recommend my "Open Drug Discovery Toolkit" for playing
> around with RDKit and scikit-learn.
> https://github.com/oddt/oddt
>
> ----
> Pozdrawiam,  |  Best regards,
> Maciek Wójcikowski
> mac...@wojcikowski.pl
>
> 2015-02-20 7:29 GMT+01:00 Greg Landrum <greg.land...@gmail.com>:
>
>>
>>
>> On Thu, Feb 19, 2015 at 11:59 PM, Matthew Lardy <mla...@gmail.com> wrote:
>>
>>>
>>> I have been able to build models via scikit-learn with the RDKit python
>>> wrappers.  That all works beautifully!
>>>
>>
>> It's a nice combination, isn't it?
>>
>>
>>> What I am struggling to get are the weights, or scalers, applied to each
>>> bit position.  For a SVM regression model (SVR) I think that the values I
>>> seek are in the coef_ (if the model is created via the linear kernel).
>>> But, all I get is something like this when I print that out:
>>>
>>> [[-0.         -0.87146158 -0.46331996 ...,  0.31076767 -0.
>>> -0.81882195]]
>>>
>>>
>> I don't really know the SVM regression approach particularly well, but it
>> looks like that's a vector of vectors. Is the length of the inner vector
>> the same as the length of the fingerprint/descriptor vector you are
>> providing?
>>
>> -greg
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>> Get technology previously reserved for billion-dollar corporations, FREE
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to