search for: housevotes84

Displaying 5 results from an estimated 5 matches for "housevotes84".

2011 Feb 08
1
Naive Bayes Issue - Can't Predict - Error is "Error in log(sapply(attribs...)
...r Data & Analytics - ValueClick mike.schumacher@gmail.com * Functional Example Code from UCLA: http://www.stat.ucl.ac.be/ISdidactique/Rhelp/library/e1071/html/predict.naiveBayes.html * install.packages('e1071') install.packages('mlbench') library(e1071) library(mlbench) data(HouseVotes84) model <- naiveBayes(Class ~ ., data = HouseVotes84) predict(model, HouseVotes84[1:10,-1]) *My Code That Errors:* resp<-c(0,0,0,0,0,0,0,0,0,1,1,1,1,1,1) var <-c('y','n','y','y','y','n','y','y','y','n','n&...
2012 Jul 05
1
Different level set when predicting with e1071's Naive Bayes classifier
...the ones used for fitting. From inspecting the predict.naiveBayes I came to the conclusion that this is due to the conversion of factors to their internal codes using the data.matrix function. For example, consider the following piece of R code: > library(mlbench) > library(e1071) > data(HouseVotes84) > model <- naiveBayes(Class ~ ., data = HouseVotes84) > head(HouseVotes84) Class V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15 V16 1 republican n y n y y y n n n y <NA> y y y n y 2 republican n y n y y y n n n n n...
2012 Nov 08
0
FW: Interfacing R and Weka
...012 month 10 day 26 svn rev 61015 language R version.string R version 2.15.2 (2012-10-26) nickname Trick or Treat I'm trying to use RWeka, in particular an example in the help file for make_Weka_classifier > model <- NB(Class ~ ., data = HouseVotes84) Error in .jnew("weka/core/Attribute", attname[i], .jcast(levels, "java/util/List")) : java.lang.NoSuchMethodError: <init> > traceback() 8: stop(list(message = "java.lang.NoSuchMethodError: <init>", call = .jnew("weka/core/Attribute",...
2007 Aug 22
1
"subscript out of bounds" Error in predict.naivebayes
I'm trying to fit a naive Bayes model and predict on a new data set using the functions naivebayes and predict (package = e1071). R version 2.5.1 on a Linux machine My data set looks like this. "class" is the response and k1 - k3 are the independent variables. All of them are factors. The response has 52 levels and k1 - k3 have 2-6 levels. I have about 9,300 independent variables
2009 Jun 01
1
installing sn package
...istian .jmethods("weka/core/SerializationHelper") [2] "public static void weka.core.SerializationHelper.write(java.lang.String,java.lang.Object) throws java.lang.Exception"  > NB <- make_Weka_classifier("weka/classifiers/bayes/NaiveBayes") >    data("HouseVotes84", package = "mlbench") >    model <- NB(Class ~ ., data = HouseVotes84) > > .jcall("weka/core/SerializationHelper",returnSig="V","write","nb.model",model) Fehler in .jcall("weka/core/SerializationHelper", returnSig = &quo...