Hi Joao.
There is no build-in way to achieve this.
You can create the kernel matrix of the tensor product of the linear and the nonlinear kernel explicitly and pass that to SVR.
That will allow the SVR to use both kernels at once.
I think it should just be the product of the two kernel values.

Using different kernels in different regions is not that easily possible.


Hth,
Andy


On 04/10/2014 01:20 PM, João André wrote:
Hi!

I have a question regarding support vectors regression.
Is it possible to develope a kernel that combines the linear and the rbf kernel, that is, it uses both kernels and applies each one to a region where each kernel fits better the data?

I thought of this because I was asked to fit this simple, but discontinuous function, and tried svr but the results were very poor. Since polynomial expantions are also not a viable solution I thought that combining a linear + nonlinear kernel would solve this. Any ideas? Thanks!

Y = f(X) with:
0 <= X <= 0.5 -> Y = 0
0.5 < X < 3.5 -> Y = sin(0.5*(x-0.5)/3)
3.5 <= X <= 4 -> Y = 1

               X                Y
0       0
0.1     0
0.2     0
0.3     0
0.4     0
0.5     0
0.6     0.052336
0.7     0.104528
0.8     0.156434
0.9     0.207912
1       0.258819
1.1     0.309017
1.2     0.358368
1.3     0.406737
1.4     0.45399
1.5     0.5
1.6     0.544639
1.7     0.587785
1.8     0.62932
1.9     0.669131
2       0.707107
2.1     0.743145
2.2     0.777146
2.3     0.809017
2.4     0.838671
2.5     0.866025
2.6     0.891007
2.7     0.913545
2.8     0.93358
2.9     0.951057
3       0.965926
3.1     0.978148
3.2     0.987688
3.3     0.994522
3.4     0.99863
3.5     1
3.6     1
3.7     1
3.8     1
3.9     1
4       1



--
João André
Engenheiro Civil, Mestre / Civil Engineer, M.Sc.
Bolseiro de Doutoramento / PhD Student
Núcleo de Comportamento de Estruturas / Structural Behaviour Division
Departamento de Estruturas / Structures Department
Laboratório Nacional de Engenharia Civil / National Laboratory for Civil Engineering
LNEC, Av. Brasil 101, 1700-066 Lisboa / Lisbon, Portugal
Web: http://www.lnec.pt/
E-mail: jan...@lnec.pt <mailto:jan...@lnec.pt>
Telefone / Phone: (+351) 218 443 355
Fax: (+351) 218 443 025


------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees


_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to