Displaying 20 results from an estimated 2000 matches similar to: "How to abort function execution after x-seconds"
2011 Aug 26
1
kernlab: ksvm() bug?
Hello all,
I'm trying to run a gird parameter search for a svm.
Therefore I'M using the ksvm function from the kernlab package.
----
svp <- ksvm(Ktrain,ytrain,type="nu-svc",nu=C)
----
The problem is that the optimization algorithm does not return
for certain parameters.
I tried to use setTimeLimit() but that doesn't seem to help.
I suspect that ksvm() calls c code that
2009 Nov 29
2
kernlab's ksvm method freeze
Hello,
I am using kernlab to do some binary classification on aminoacid
strings.
I am using a custom kernel, so i use the kernel="matrix" option of the
ksvm method.
My (normalized) kernel matrix is of size 1309*1309, my results vector
has the same length.
I am using C-svc.
My kernlab call is something similiar to this:
ksvm(kernel="matrix", kernelMatrix, trainingDataYs,
2009 Apr 28
1
kernlab - custom kernel
hi,
I am using R's "kernlab" package, exactly i am doing classification using
ksvm(.) and predict.ksvm(.).I want use of custom kernel. I am getting some
error.
# Following R code works (with promotergene dataset):
library("kernlab")
s <- function(x, y) {
sum((x*y)^1.25)
}
class(s) <- "kernel"
data("promotergene")
gene <- ksvm(Class ~ .,
2009 Oct 23
1
Data format for KSVM
Hi,
I have a process using svm from the e1071 library. it works.
I want to try using the KSVM library instead. The same data used wiht
e1071 gives me an error with KSVM.
My data is a data.frame.
sample code:
svm_formula <- formula(y ~ a + B + C)
svm_model <- ksvm(formula, data=train_data, type="C-svc",
kernel="rbfdot", C=1)
I get the following error:
2008 Jun 25
1
stringdot
Hi!!
I am trying to figure out how to use the string kernel "stringdot" in kernlab.
k <- function(x,y) {
(sum(x*y) +1)*exp(-0.001*sum((x-y)^2))
}
class(k) <- "kernel"
data(promotergene)
## train svm using custom kernel
gene.k <- ksvm(Class~.,data=promotergene,kernel=k,C=10,cross=5) # works fine in this case
gene.rbf <-
2012 Aug 19
1
kernlab | ksvm error
Dear list,
I am using the ksvm function from kernlab as follows:
(1) learning
> svm.pol4 <- ksvm(class.labs ~ ., data = train.data, prob.model = T, scale
= T, kernel = "polydot")
(2) prediction
> svm.pol.prd4 <- predict(svm.pol4, train.data, type = "probabilities")[,2]
But unfortunately, when calling the prediction, once in every 10s of times
(using the exact
2006 Nov 24
1
How to find AUC in SVM (kernlab package)
Dear all,
I was wondering if someone can help me. I am learning SVM for
classification in my research with kernlab package. I want to know about
classification performance using Area Under Curve (AUC). I know ROCR
package can do this job but I found all example in ROCR package have
include prediction, for example, ROCR.hiv {ROCR}. My problem is how to
produce prediction in SVM and to find
2009 Dec 25
2
Help with SVM package Kernlab
Hi useR's,
I am resending this request since I got no response for my last post and I
am new to the list so pardon me if I am violating the protocol.
I am trying to use the "Kernlab" package for training and prediction using
SVM's. I am getting the following error when I am trying to use the predict
function:
> predictSvm = predict(modelforSVM, testSeq);
Error in
2012 Nov 15
1
Can't see what i did wrong..
with
pred.pca<-predict(splits[[i]]$pca,trainingData at samples)[,1:nPCs]
dframe<-as.data.frame(cbind(pred.pca,class=isExplosive(trainingData,2)));
results[[i]]$classifier<-ksvm(class~.,data=dframe,scaled=T,kernel="polydot",type="C-svc",
C=C,kpar=list(degree=degree,scale=scale,offset=offset),prob.model=T)
and a degree of 5 i get an error of 0 reported by the ksvm
2012 Nov 29
1
Help with this error "kernlab class probability calculations failed; returning NAs"
I have never been able to get class probabilities to work and I am relatively new to using these tools, and I am looking for some insight as to what may be wrong.
I am using caret with kernlab/ksvm. I will simplify my problem to a basic data set which produces the same problem. I have read the caret vignettes as well as documentation for ?train. I appreciate any direction you can give. I
2009 Oct 04
3
error installing/compiling kernlab
Hi everybody,
I''m using R on a 64-bit Ubuntu 9.04 (Jaunty). I prefer to install R
packages from source, even if they are available in Synaptic. The
problem is that I can''t install/compile kernlab. Everything works fine
until it gets to the lazy loading part:
** preparing package for lazy loading
Creating a new generic function for "terms" in "kernlab"
2005 Jul 07
1
Kernlab: problem with small datasets
Hi,
I found a small problem with kernlab. The problem, I think, is that the
3-fold cross-validation performed to estimate probabilities is not
class-balanced, so the classifier could find empty classes.
The following example (maybe a little forced) show the error:
data(glass)
set.seed(1)
2010 Jul 07
3
use sliding window to count substrings found in large string
Hello together,
I'm looking for advice on how to do some tests on strings.
What I want to do is the following:
(just an example, real strings/sequence are about 200-400 characters long)
given set of Strings:
String1 abcdefgh
String2 bcdefgop
use a sliding window of size x to create an vector of all subsequences
of size x
found in the set (order matters! ).
Now create, for every string
2011 Oct 30
1
Confidence interval for Support Vector Regression
Hi,
Is it possible to calculate confidence intervals for support vector
regression?
In the "ksvm{kernlab}" manual, it says that it supports confidence
intervals for regression.
However, i couldn't find any information about how to calculate confidence
interval.
Do you have any documents or examples about this or any other suggestions?
Thanks in advance
--
[[alternative HTML
2013 Nov 15
1
Inconsistent results between caret+kernlab versions
I'm using caret to assess classifier performance (and it's great!). However, I've found that my results differ between R2.* and R3.* - reported accuracies are reduced dramatically. I suspect that a code change to kernlab ksvm may be responsible (see version 5.16-24 here: http://cran.r-project.org/web/packages/caret/news.html). I get very different results between caret_5.15-61 +
2011 Jun 10
1
ggplot2 avoid automatic color selection
Hey all,
I'm trying to replicate some plots with ggplot2. The problem is that I
need to specify the color for every
attribute (drug). If I use the code below the colors get automatically
assigned but I need to plot drug1 in black drug2 in blue
etc.
How do I do that?
q = qplot(days,vol,data = cellLine7064, color = drug, geom = c("line", "point"))
best regards,
Immanuel
2010 Oct 25
4
zoo.read intraday data
Hello all,
I'm trying to use zoo.read but can't figure out
how to deal with the time format. (example below)
would be nice if someone could help.
best regards,
Immanuel
---------------------------
L <- "Date,Time,Open,High,Low,Close,Up,Down
05.02.2001,00:30,421.20,421.20,421.20,421.20,11,0
05.02.2001,01:30,421.20,421.40,421.20,421.40,7,0
2010 Apr 06
3
svm of e1071 package
Hello List,
I am having a great trouble using svm function in e1071 package. I have 4gb of data that i want to use to train svm. I am using Amazon cloud, my Amazon Machine Image(AMI) has 34.2 GB of memory. my R process was killed several times when i tried to use 4GB of data for svm. Now I am using a subset of that data and it is only 1.4 GB. i remove all unnecessary objects before calling
2011 Aug 22
1
Threads in R
Hello all,
I posted a questions on how to terminate a function call that does not
return after a certain time ( I can not modify the function code) some
time ago.
Since I didn't find a solution I just came up with the idea to run the
functions call in a separate thread who I could terminate a will.
Would this be possible? Any pointers in the right direction? A looked
briefly a snow and Rmpi
2010 Jun 11
1
Decision values from KSVM
Hi,
I'm working on a project using the kernlab library.
For one phase, I want the "decision values" from the SVM prediction, not
the class label. the e1071 library has this function, but I can't find
the equivalent in ksvm.
In general, when an SVM is used for classification, the label of an
unknown test-case is decided by the "sign" of its resulting value as