[R] Unusual behavior in e1071?

Daniel Jeske daniel.jeske at ucr.edu
Tue May 2 07:25:56 CEST 2017


Hello -

I have noticed that when I run svm() the order of my data matters.  If the
first case in the data frame has y=+1 I get the expected decision rule that
says to classify as +1 if f(x)>0.  However, if the first case in the data
frame has y=-1 then apparently the decision rule being used says to
classify as +1 if f(x)<0, and in this case all the coefficients are
negative of their values compared to the first case.  So the two
classification rules are equivalent, but is a user really supposed to know
the difference?  It is likely they would assume the decision rule is always
to classify as +1 if f(x)>0.  Does anyone think the behavior I have noticed
is as intended, or is otherwise benign?

Thank you,
Daniel Jeske
Professor
Department of Statistics
University of California - Riverside

	[[alternative HTML version deleted]]



More information about the R-help mailing list