similar to: how to store object without loosing their class property

Displaying 20 results from an estimated 10000 matches similar to: "how to store object without loosing their class property"

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
2011 Feb 18
1
segfault during example(svm)
If do: > library("e1071") > example(svm) I get: svm> data(iris) svm> attach(iris) svm> ## classification mode svm> # default with factor response: svm> model <- svm(Species ~ ., data = iris) svm> # alternatively the traditional interface: svm> x <- subset(iris, select = -Species) svm> y <- Species svm> model <- svm(x, y) svm>
2006 Jan 27
3
e1071: using svm with sparse matrices (PR#8527)
Full_Name: Julien Gagneur Version: 2.2.1 OS: Linux (Suse 9.3) Submission from: (NULL) (194.94.44.4) Using the SparseM library (SparseM_0.66) and the e1071 library (e1071_1.5-12) I fail using svm method with a sparse matrix. Here is a sample example. I experienced the same problem under Windows. > library(SparseM) [1] "SparseM library loaded" > library("e1071")
2004 Sep 14
1
how to use update if method for formula is not in namespace?
Dear R-devel, I've noticed that if the method for formula is not exported in NAMESPACE, then update() would fail. As an example: > library(e1071) > data(iris) > iris.svm <- svm(Species ~ ., data=iris) > update(iris.svm) Error in eval(expr, envir, enclos) : couldn't find function "svm.formula" The same thing happens with randomForest, because
2006 Feb 16
2
getting probabilities from SVM
I am using SVM to classify categorical data and I would like the probabilities instead of the classification. ?predict.svm says that its only enabled when you train the model with it enabled, so I did that, but it didn't work. I can't even get it to work with iris. The help file shows that probability = TRUE when training the model, but doesn't show an example. Then I try to
2002 Mar 11
4
svm in e1071 package segment fault in redhat 7.2
Hi, Guys I run one simple R script like this library(e1071) data(iris) attach(iris) model <- svm (Species~., data=iris) The R version is 1.4.1. The OS is standard redhat 7.2. Then I got a segmentation fault like this (run through R CMD BATCH scriptName) /usr/local/R/lib/R/bin/BATCH: line 54: 28513 Done ( echo "invisible(options(echo = TRUE))"; cat
2010 Oct 05
6
SVM functions
Hi ! Right now I am learning to use svm functions available in R and trying to use these function with given example. I was stuck with svmlight function which is available in klaR package. Any help would be appreciated regarding this function. 1. I am unable to use svmlight( ) which is available in package: klaR. Although I have downloaded klaR_0.6-3 package from
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
2008 Mar 02
2
listing components of an object
Is there a method to list the components of an object, instead of looking at the help for that method? Let me be more clear with an example data(iris) ## tune `svm' for classification with RBF-kernel (default in svm), ## using one split for training/validation set obj <- tune(svm, Species~., data = iris, ranges = list(gamma = 2^(-1:1), cost = 2^(2:4)),
2010 Jan 06
1
svm
Hi, I understand from help pages that in order to use a data set with svm, I have to divide it into two files: one for the dataset without the class label and the other file contains the class label as the following code:- library(e1071) x<- read.delim("mydataset_except-class-label.txt") y<- read.delim("mydataset_class-labell.txt") model <- svm(x, y, cross=5)
2017 Jul 06
0
svm.formula versus svm.default - different results
Dear community, I'm performing svm-regression with svm at library e1071. As I wrote in another post: "svm e1071 call - different results", I get different results if I use the svm.default rather than the svm.formula, being better the ones at svm.formula I've debugged both options. While debugging the svm.formula, I've seen that when I reach the call: ret <-
2011 Mar 04
1
Probabilities outside [0, 1] using Support Vector Machines (SVM) in e1071
Hi All, I'm attempting to use eps-regression or nu-regression SVM to compute probabilities but the predict function applied to an svm model object returns values outside [0, 1]: Variable Data looks like: Present X02 X03 X05 X06 X07 X13 X14 X15 X18 1 0 1634 48 2245.469 -1122.0750 3367.544 11105.013 2017.306 40 23227 2 0 1402 40 2611.519 -811.2500 3422.769 10499.425 1800.475 40 13822 3 0 1379
2011 Jul 24
0
repeated execution of svm(e1071) gives different results, if probability = TRUE is set
Hello, Connoisseurs! Please explain to novices, why svm model gives different results in the loop with the same data? As a result, I can not find the best gamma and cost parameters. Also tune.svm yields results that can not be repeated. How can I avoid this? My sessionInfo: R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
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
2006 Aug 04
0
training svm's with probability flag
Hi- I'm seeing some weirdness with svm and tune.svm that I can't figure out- was wondering if anyone else has seen this? Perhaps I'm failing to make something the expected class? Below is my repro case, though it *sometimes* doesn't repro. I'm using R2.3.1 on WindowsXP. I was also seeing it happen with R2.1.1 and have seen it on 2 different machines. data(iris) attach(iris)
2006 Aug 04
0
training svm's with probability flag (re-send in plain text)
Hi- I'm seeing some weirdness with svm and tune.svm that I can't figure out- was wondering if anyone else has seen this? Perhaps I'm failing to make something the expected class? Below is my repro case, though it *sometimes* doesn't repro. I'm using R2.3.1 on WindowsXP. I was also seeing it happen with R2.1.1 and have seen it on 2 different machines. data(iris) attach(iris)
2007 Sep 25
1
10- fold cross validation for naive bayes(e1071)
Hallo! I would need a code for 10-fold cross validation for the classifiers Naive Bayes and svm (e1071) package. Has there already been done something like that? I tried to do it myself by applying the tune function first: library(e1071) tune.control <- tune.control(random =F, nrepeat=1, repeat.aggregate=min.,sampling=c("cross"),sampling.aggregate=mean, cross=10, best.model=T,
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
2017 Sep 02
0
problem in testing data with e1071 package (SVM Multiclass)
Hello all, this is the first time I'm using R and e1071 package and SVM multiclass (and I'm not a statistician)! I'm very confused, then. The goal is: I have a sentence with sunny; it will be classified as "yes" sentence; I have a sentence with cloud, it will be classified as "maybe"; I have a sentence with rainy il will be classified as "no". The
2010 Jul 14
1
question about SVM in e1071
Hi, I have a question about the parameter C (cost) in svm function in e1071. I thought larger C is prone to overfitting than smaller C, and hence leads to more support vectors. However, using the Wisconsin breast cancer example on the link: http://planatscher.net/svmtut/svmtut.html I found that the largest cost have fewest support vectors, which is contrary to what I think. please see the scripts