[R] Birutal BZRUTAL Cdhick

2007-03-06 Thread Gladys

I am having so much fun performing, I feel almost guilty. I think, my God, I 
hope no one comes and busts me for this.

http://site.exrimad.com/extr/p1/1/
Young hzoney fsorced to sduck cvock and vyiolently BRBUTAL in various pjositions

Moral of the Work. In war: resolution. In defeat: defiance. In victory: 
magnanimity. In peace: goodwill.
A winner rebukes and forgives a loser is too timid to rebuke and too petty to 
forgiveA professional is someone who can do his best work when he doesn't feel 
like it.You know how you hate to be interrupted, so why are you always doing it 
to me.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] SVM linear kernel and SV

2005-05-12 Thread Gladys DRACON
Dear all,

I'm a trainee statistician in a company and we'd like to understand svm 
mechanism, at first with simple examples.

I use e1071 package and I have several questions. I'm working with data 
extracted from cats data (from R). My dataset corresponds to a completely 
separable case with a binary response variable ( Sex with 2 levels: F and 
M), two  explanatory variables (Bwt and Hwt) and the classes are balanced.

 I've used  svm() with a linear kernel and I'd like to plot the linear 
hyperplane and the support vectors. I use plot.svm() and, according to me, 
I would have found aligned support vectors (because the hyperplane is 
linear) for each class but it wasn't the case. Could you explain me why ?

In addition, when I change the option 'scale' (from TRUE to FALSE) the 
results change. Could you explain me why ? the option 'scale' of svm() 
acts on the dataset or on the weight vector w and threshold b  ?

Thank you very much,
Gladys.

My dataset 'catseq' is following:

n  Sex  Bwt Hwt
1 F 2.0  7.0
2 F 2.0  7.4
3 F 2.0  9.5
4 F 2.1  7.2
5 F 2.1  7.3
6 F 2.1  7.6
7 F 2.1  8.1
8 F 2.1  8.2
9 F 2.1  8.3
10F 2.1  8.5
11F 2.1  8.7
12F 2.1  9.8
13F 2.2  7.1
14F 2.2  8.7
15F 2.2  9.1
16F 2.2  9.7
17F 2.2 10.9
18F 2.2 11.0
19F 2.3  7.3
20F 2.3  7.9
21F 2.3  8.4
22F 2.3  9.0
23F 2.3  9.0
24F 2.3  9.5
25F 2.3  9.6
26F 2.3  9.7
27F 2.3 10.1
28F 2.3 10.1
29F 2.3 10.6
30F 2.3 11.2
31F 2.4  6.3
32F 2.4  8.7
33F 2.4  8.8
34F 2.4 10.2
35F 2.5  9.0
36F 2.5 10.9
37F 2.6  8.7
38F 2.6 10.1
39F 2.6 10.1
40F 2.7  8.5
42F 2.7 10.8
43F 2.9  9.9
91M 2.8 11.4
92M 2.8 12.0
93M 2.8 13.3
94M 2.8 13.5
98M 2.9 11.3
99M 2.9 11.8
103   M 3.0 11.6
104   M 3.0 12.2
105   M 3.0 12.4
106   M 3.0 12.7
107   M 3.0 13.3
108   M 3.0 13.8
110   M 3.1 11.5
111   M 3.1 12.1
112   M 3.1 12.5
113   M 3.1 13.0
114   M 3.1 14.3
115   M 3.2 11.6
116   M 3.2 11.9
117   M 3.2 12.3
118   M 3.2 13.0
119   M 3.2 13.5
120   M 3.2 13.6
121   M 3.3 11.5
122   M 3.3 12.0
123   M 3.3 14.1
124   M 3.3 14.9
125   M 3.3 15.4
126   M 3.4 11.2
127   M 3.4 12.2
128   M 3.4 12.4
129   M 3.4 12.8
130   M 3.4 14.4
131   M 3.5 11.7
132   M 3.5 12.9
133   M 3.5 15.6
134   M 3.5 15.7
135   M 3.5 17.2
136   M 3.6 11.8
137   M 3.6 13.3
138   M 3.6 14.8
139   M 3.6 15.0


My program is following:

library(e1071)
library(MASS)

catseq - read.table('P:/catsredeq.txt',header=T,sep=)
plot(catseq$Hwt,catseq$Bwt,pch=as.integer(catseq[,2]),col=as.integer(catseq[,2]),xlab=poids
 
du coeur,ylab=poids du corps)
title(main=Données 'chats' (cas séparable))

catseq - catseq[,2:4]
attach(catseq)


svm12 - svm(Sex~.,data=catseq,kernel=linear,scale=T)
svm12
x11()
plot(svm12,catseq,grid=200)

x11()
svm22 - svm(Sex~.,data=catseq,kernel=linear,scale=F)
svm22
plot(svm22,catseq,grid=200)
[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


=?iso-8859-1?Q?R=E9f=2E_=3A_[R]_SVM_linear_kernel_and_SV?=

2005-05-12 Thread Gladys DRACON
Thank you for your answer,

but my problem concerns the support vectors. Indeed the two classes are 
well separated and the hyperplane is linear but the support vectors aren't 
aligned in parallel to the hyperplane. And according to me,  the support 
vectors (for each class) should be aligned along the linear hyperplane and 
form the marge (by definition). But it's not the case. In fact,  I'd like 
to understand why they are not aligned. 

I hope my questions are clear.
Thank you very much.
[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] rbind for similar data frames

2004-08-27 Thread Gladys Castillo Jordán
Hi all:
I have a problem when I try to concatenate two similar data frames with
different number of rows using rbind.  I did something like this:

 d-data.frame(a=1:10,b=2:11,c=3:12)
 e-data.frame(a=101:105,b=102:106,c=103:107)
 data=rbind(d,e)

The resulting row enumeration is not sequentially ordered as I expected:
 
 data
 a   b   c
11   2   3
22   3   4
33   4   5
44   5   6
55   6   7
66   7   8
77   8   9
88   9  10
99  10  11
10  10  11  12
11 101 102 103
22 102 103 104
33 103 104 105
44 104 105 106
55 105 106 107

Any suggestion?
  Regard,
   Gladys


Gladys Castillo Jordan
Departamento de Matemática
Universidade de Aveiro
Campus Universitario de Santiago
3810-193 Aveiro, Portugal
Phone: (351) 234-370359
Fax: (351) 234-382014
email: [EMAIL PROTECTED]
HTTP: www.mat.ua.pt/gladys

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html