What are the details fitrkernel model and how the predictions are produced?

3 visualizzazioni (ultimi 30 giorni)
I am trying to implment my own predict function for a model produced using fitrkernel in which a Gaussian kernel regression model is fit using random feature expansion.
I Have two questions regarding fitrkernel
1) Question 1:
What I understand is that fitrkernel solves for β and b in the linear regression equaition, f(x)=T(x)β+b.
However, the model otuputs the following with no mention of β and b:
RegressionKernel
ResponseName: 'Y'
Learner: 'svm'
NumExpansionDimensions: 128
KernelScale: 1
Lambda: 0.000328947368421053
BoxConstraint: 1
Epsilon: 0.0192374351371386
So, how can I know what are the values of β and b?
2) Question 2:
I looked up the documentation of the model and I found in https://www.mathworks.com/help/stats/fitrkernel.html that Gaussian kernel approximation is done using Random Feature Expansion. That is,
T(x)=m^(−1/2)*exp(iZx′)′ --- Eq(1)
where Z∈ℝ^(m×p) is a sample drawn from N(0,σ^−2) and σ^2 is a kernel scale.
The values for m and σ^2 coresponds to the NumExpansionDimensions and KernelScale name-value pair arguments of fitrkernel, respectively.
However, In Eq(1) the sample Z ~ N(0,σ^−2) is drawn at random, so how the model can predict the same output for the same input all the time? and what is i?

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by