On 01/06/2015 01:21 PM, Morgan Hoffman wrote:
Hi Andy,

Thanks for your help. Is there something in the scikit-learn documentation (or any other resource) that explains why the kernel matrix at test time needs to be the kernel between the test data and the training data? I am quite new to machine learning. What is the reason as to why we do this and how do we obtain a kernel matrix between the test and the training data
That is currently not in the docs, but we could add it to the docs.
Very shortly why:
because the decision for a new point is given by its kernel values with the training data weighted by the dual coefficients. That is the definition of the kernel SVM.
How to compute it depends on your kernel.
As I said, if you use the build-in functionality, you don't have to worry about it and just provide the kernel on the whole data.


I applied the MinMaxScaler to the gram matrix to scale the values in my matrix. Right now I get entries in the gram matrix that range from 0.7 to 1 and I want to scale this range of values from 0 to 1, so that a 0.7 is really a 0.

I don't know why you would rescale the kernel matrix like that.
Using MinMaxScaler should scale between 0 and 1.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to