[R] RWeka cross-validation and Weka_control Parametrization

strinz at freenet.de strinz at freenet.de
Wed Aug 1 10:52:02 CEST 2007


Hello,

	I have two questions concerning the RWeka package:

	1.) First question:
	How can one perform a cross validation, -say 10fold- for a given data set and given model ?

	2.) Second question
	What is the correct syntax for the parametrization of e.g. Kernel classifiers interface
  m1 <- SMO(Species ~ ., data = iris, control = Weka_control(K="weka.classifiers.functions.supportVector.RBFKernel",G=0.1))
  m2 <- SMO(Species ~ ., data = iris, control = Weka_control(K="weka.classifiers.functions.supportVector.RBFKernel",G=1.0))

	> m1
	SMO

	Kernel used:
  	RBF kernel: K(x,y) = e^-(0.01* <x-y,x-y>^2)      

	## should be: RBF kernel: K(x,y) = e^-(0.1* <x-y,x-y>^2)      

	> m2
	SMO

	Kernel used:
  	RBF kernel: K(x,y) = e^-(0.01* <x-y,x-y>^2)

	## should be: RBF kernel: K(x,y) = e^-(1.0* <x-y,x-y>^2)      

	That is, the control arguments ignores the parameter 'G' (Gamma) for the above syntax.
        What's wrong with this syntax ? 


many thanks
Bjoern



More information about the R-help mailing list