Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8926859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:05:11+00:00 2026-06-15T08:05:11+00:00

I am looking at the R function gausspr from the kernlab package for Gaussian

  • 0

I am looking at the R function gausspr from the kernlab package for Gaussian process regression. The process is defined by the hyperparameters of the kernel function and by the noise in the data. I see in the documentation that I can specify

var: the initial noise variance, (only for regression) (default : 0.001)

but I do not see how to access the estimated value after the regression has run. For instance, consider I have some observed points, and want to predict y values at the locations given by X:

obs <- data.frame(x = c(-4, -3, -1,  0,  2),
                  y = c(-2,  0,  1,  2, -1))
X <- seq(-5,5,len=50)

I can do so with kernlab::gausspr as such:

gp <- gausspr(obs$x, obs$y, kernel="rbfdot", scaled=FALSE, var=.09)
Ef <- predict(gp, X)

I can get the estimated value of the kernel hyperparameter:

gp@kernelf@kpar

But I don’t see how I can return the estimated value of the noise parameter, var?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:05:12+00:00Added an answer on June 15, 2026 at 8:05 am

    I might be overlooking something, but I don’t think that the initial noise variance var is “fit” to anything; I don’t think it is a parameter (although I agree that using the word “initial” makes you think otherwise).

    The noise variance is just added to the diagonal of the correlation matrix of the training points, as described on this page about some other software. Looking through the function definition, it looks like this is exactly what it is doing in kernlab as well:

    # The only relevant line where 'var' is used
    alpha(ret) <- solve(K + diag(rep(var, length = m))) %*% y
    

    If you wanted to get the error (or any measure of fit) by the noise variance, you could do something like:

    error.fun<-function(x) error(gausspr(obs$x, obs$y, kernel="rbfdot", scaled=FALSE, var=x))
    noises<-seq(0.1,1,by=0.1)
    y<-sapply(noises,error.fun)
    plot(noises,y,type='l')
    

    The built-in cross-validation does not “fit” var in any way, from what I can tell. The only relevant line in the cross validation is here:

    cret <- gausspr(x[cind, ], y[cind], type = type(ret), 
                    scaled = FALSE, kernel = kernel, var = var, 
                    tol = tol, cross = 0, fit = FALSE)
    

    And you can see that var is just put in with no changes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a function that calculates years from a date in format: 0000-00-00.
I'm looking for a function to get a directory path from the user; I
I'm looking for a function that finds a substring from an array of strings
Hi I'm starting from http://matplotlib.sourceforge.net/users/path_tutorial.html . I'm looking a function to get all bezier
Looking to learn function writing. I have data laid out in the following (e.g.):
I'm looking for a function from which i can select specific cells and place
I am looking for a function that would search for the closet 2 elements
I'm looking for a function that reverses clojure hiccup so <html></html> turns into [:html]
I'm looking for some function to determine opening and closing virtual keyboard on samsung
I'm looking for a function to allow me to print the binary representation of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.