similar to: how to obtain predicted labels for test data using "kernelpls"

Displaying 20 results from an estimated 800 matches similar to: "how to obtain predicted labels for test data using "kernelpls""

2004 Nov 15
0
how to obtain predicted labels for test data using "kerne lpls"
You need to do some extra work if you want to do classification with a regression method. One simple way to do classification with PLS is to code the classes as 0s and 1s (assuming there are only two classes) or -1s and 1s, fit the model, then threshold the prediction; e.g., those with predicted values < 0.5 (in the 0/1 coding) get labeled as 0s. There's a predict() method for mvr
2007 Oct 23
1
Compute R2 and Q2 in PLS with pls.pcr package
Dear list I am using the mvr function of the package pls.pcr to compute PLS resgression using a X matrix of gene expression variables and a Y matrix of medical varaibles. I would like to obtain the R2 (sum of squares captured by the model) and Q2 (proportion of total sum of squares captured in leave-one-out cross validation) of the model. I am not sure if there are specific slots in the
2010 Aug 16
0
Help for using nnet in R for NN training and testing
Hello, I want to use nnet package in R, to train and simulate a NN and get the value of MSE. I am reading in a file which has 19 input variables and one output variable and has a total of 2000 observations. The first column in the file is a column just for giving the serial numbers of the observations. I have already read in the file and also extracted the different values into the matrices to
2007 Jan 22
0
Recursive-SVM (R-SVM)
I am trying to implement a simple r-svm example using the iris data (only two of the classes are taken and data is within the code). I am running into some errors. I am not an expert on svm's. If any one has used it, I would appreciate their help. I am appending the code below. Thanks../Murli ####################################################### ### R-code for R-SVM ### use leave-one-out
2018 Feb 19
0
questions regarding the svmpath package (functions svmpath and predict)
Hello, I have two questions. The svmpath package provides a svmpath function: --- fit <- svmpath(xtrain, ytrain, kernel.function = radial.kernel, param.kernel = 0.8) --- 1) How to get the optimal lambda value out of this result? The svmpath package also provides a predict function: --- ytest <- predict(fit, xtest) --- How to get a score (or a probability of belonging to one of the two
2013 Jul 13
1
Alternative to eval(cl, parent.frame()) ?
Dear developeRs, I maintain a package 'pls', which has a main fit function mvr(), and functions plsr() and pcr() which are meant to take the same arguments as mvr() and do exactly the same, but have different default values for the 'method' argument. The three functions are all exported from the name space. In the 'pre namespace' era, I took inspiration from lm() and
2005 May 12
1
pls -- crossval vs plsr(..., CV=TRUE)
Hi, Newbie question about the pls package. Setup: Mac OS 10.3.9 R: Aqua GUI 1.01, v 2.0.1 I want to get R^2 and Q^2 (LOO and Leave-10-Out) values for each component for my model. I was running into a few problems so I played with the example a little and the results do not match up with the comments in the help pages. $ library(pls) $ data(NIR) $ testing.plsNOCV <- plsr(y ~ X, 6, data =
2009 Oct 14
0
Confusion matrix from cross validation in R:
Hey! How do I get the confusion matrix after performing 10-fold cross validation from SVM in R? When I try to print it, I get the confusion matrix without cross validation. I need to compute PPV. Should I report PPV without CV and total accuracy with CV? I am confused. > svmtrain <- svm(xtrain,ytrain,kernel="sigmoid",cross=10) > pred <- predict(svmtrain, xtrain) >
2012 Sep 13
0
I need help for svm package kernlab in R
I use the svm package kernlab .I have two question. In R library(kernlab) m=ksvm(xtrain,ytrain,type="C-svc",kernel=custom function, C=10) alpha(m) alphaindex(m) I can get alpha value and alpha index about package. 1. Assumption that number of sample are 20. number of support vectors are 15. then rest 5`s alphas are 0? 2. I want use kernelMatrix xtrain=as.matrix(xtrain)
2011 May 24
1
seeking help on using LARS package
Hi, I am writing to seek some guidance regarding using Lasso regression with the R package LARS. I have introductory statistics background but I am trying to learn more. Right now I am trying to duplicate the results in a paper for shRNA prediction "An accurate and interpretable model for siRNA efficacy prediction, Jean-Philippe Vert et. al, Bioinformatics" for a Bioinformatics project
2011 Nov 30
1
Invalid number of components, ncomp
Error in mvr(Kd_nM ~ qsar, ncomp = 6, data = my, validation = "CV", method = "kernelpls") :   Invalid number of components, ncomp How I can fix this? [[alternative HTML version deleted]]
2008 Feb 05
0
Uninformative error msgs w/ svm.default - Error in svm.default ... y must be a vector or a factor -
Hello, I'm using recursive SVM script (rSVM - http://www.stanford.edu/group/wonglab/RSVMpage/R-SVM.html ) on some microarray data. The data to be input are log2, as numeric matrix w/ attributes -- str(svm_num_mat) num [1:10, 1:12340] 13.1 13.1 13.1 13.1 13.0 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:10] "rma_log2_con_sample_1"
2012 Aug 27
0
kernlab`s custom kernel of ksvm freeze
Hello, together I'm trying to use user defined kernel. I know that kernlab offer user defined kernel(custom kernel functions) in R. I used data spam including package kernlab. (number of variables=58 number of examples =4061) i'm user defined kernel's form, kp=function(d,e){ as=v*d bs=v*e cs=as-bs cs=as.matrix(cs) exp(-(norm(cs,"F")^2)/2) }
2010 Mar 30
1
predict.kohonen for SOM returns NA?
All, The kohonen predict function is returning NA for SOM predictions regardless of data used... even the package example for a SOM using wine data is returning NA's Does anyone have a working example SOM. Also, what is the purpose of trainY, what would be the dependent data for an unsupervised SOM? As may be apparent to you by my questions, I am very new to kohonen maps and am very grateful
2005 Sep 04
2
Help: PLSR
Hello, I have a data set with 15 variables (first one is the response) and 1200 observations. Now I use pls package to do the plsr as below. trainSet = as.data.frame(scale(trainSet, center = T, scale = T)) trainSet.plsr = mvr(formula, ncomp = 14, data = trainSet, method = "kernelpls", model = TRUE, x = TRUE, y = TRUE) from the model, I wish to know the
2018 Apr 21
0
Cross-validation : can't get the predicted response on the testing data
Dear R-experts, Doing cross-validation for 2 robust regressions (HBR and fast Tau). I can't get the 2 errors rates (RMSE and MAPE). The problem is to predict the response on the testing data. I get 2 error messages. Here below the reproducible (fictional example) R code. #install.packages("MLmetrics") # install.packages( "robustbase" ) # install.packages(
2011 Oct 18
1
problem in exceuting PLS
Hi I'm performing a PLS This is my data present in a file Year Y X2 X3 X4 X5 X6 1960 27.8 397.5 42.2 50.7 78.3 65.8 1960 29.9 413.3 38.1 52 79.2 66.9 1961 29.8 439.2 40.3 54 79.2 67.8 1961 30.8 459.7 39.5 55.3 79.2 69.6 1962 31.2 492.9 37.3 54.7 77.4 68.7 My R-code Data <- read.csv("C:/TestData.csv") variable=names(Data)[4:8] dataset=NULL dataset$X=NULL len=length(variable)
2005 Nov 25
3
obtaining a ROC curve
Hello, I have a classification tree. I want to obtain a ROC curve for this test. What is the easiest way to obtain one? -Anjali --------------------------------- [[alternative HTML version deleted]]
2018 May 22
1
Bootstrap and average median squared error
Hello, Right! I copied from the OP's question without thinking about it. Corrected would be bootMedianSE <- function(data, indices){ d <- data[indices, ] fit <- rq(crp ~ bmi + glucose, tau = 0.5, data = d) ypred <- predict(fit) y <- d$crp median((y - ypred)^2) } Sorry, rui Barradas On 5/22/2018 11:32 AM, Daniel Nordlund wrote: > On 5/22/2018
2018 May 22
2
Bootstrap and average median squared error
I forgot, you should also set.seed() before calling boot() to make the results reproducible. Rui Barradas On 5/22/2018 10:00 AM, Rui Barradas wrote: > Hello, > > If you want to bootstrap a statistic, I suggest you use base package boot. > You would need the data in a data.frame, see how you could do it. > > > library(boot) > > bootMedianSE <- function(data,