Maciek,
I think scikit-learn is using numpy arrays and not plain Python lists. They
look very similar, but are not quite the same thing.
Maybe post a bit more complete code sample for people to play with?
Igor
On Fri, Feb 20, 2015 at 4:06 AM, Maciek Wójcikowski <[email protected]>
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
> [email protected]
>
> 2015-02-20 7:29 GMT+01:00 Greg Landrum <[email protected]>:
>
>>
>>
>> On Thu, Feb 19, 2015 at 11:59 PM, Matthew Lardy <[email protected]> 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
>> [email protected]
>> 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
> [email protected]
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss