search for: crand

Displaying 6 results from an estimated 6 matches for "crand".

Did you mean: brand
2005 May 27
1
logistic regression
...ng this: > pred = predict(logistic.model, data) > pred[pred <= 1.5] = 0 > pred[pred > 1.5] = 1 > t = table(pred, data[,24]) > t pred 0 1 0 102 253 1 255 3701 > > classAgreement(t) $diag [1] 0.8821619 $kappa [1] 0.2222949 $rand [1] 0.7920472 $crand [1] 0.1913888 > but as you can see I am using a break point well outside the range 0 to 1 and the kappa is rather low (I think). I am a bit of a novice in this, and the results worry me. Can anyone comment if the results look strange, or if they know I am doing something wrong? Steph...
2005 May 24
1
best.svm
...0 But when I applied it: > pred = predict(svm.model, data[3001:4000,1:23]) > pred[pred > .5] = 1 > pred[pred <= .5] = 0 > t = table(pred,data[3001:4000,24]) > t pred 0 1 1 65 935 > classAgreement(t) $diag [1] 0.065 $kappa [1] 0 $rand [1] 0.8783283 $crand [1] 0 It didn’t produce really good results. Will best.svm get me the best svm? Have I given it the wrong parameters? Any help most welcome. Stephen -- No virus found in this outgoing message. Checked by AVG Anti-Virus. [[alternative HTML version deleted]]
2011 May 28
0
how to train ksvm with spectral kernel (kernlab) in caret?
...- library(caret) library(kernlab) data(iris) TrainData<- iris[,1:4] TrainClasses<- iris[,5] set.seed(2) fitControl$summaryFunction<- Rand svmNew<- train(TrainData, TrainClasses, method = "svmRadial", preProcess = c("center", "scale"), metric = "cRand", tuneLength = 4) svmNew ------------------- here is an example on how to train the ksvm with spectral kernel ------------------- # Load the data data(reuters) y <- rlabels x <- reuters sk <- stringdot(type="spectrum", length=4, normalized=TRUE) svp <- ksvm(x,y,kern...
2006 Jan 08
1
Clustering and Rand Index - VS-KM
Dear WizaRds, I have been trying to compute the adjusted Rand index as by Hubert/ Arabie, and could not correctly approach how to define a partition object as in my last request yesterday. With package fpc I try to work around the problem, using my original data: mat <- matrix( c(6,7,8,2,3,4,12,14,14, 14,15,13,3,1,2,3,4,2, 15,3,10,5,11,7,13,6,1, 15,4,10,6,12,8,12,7,1), ncol=9, byrow=T )
2006 Dec 11
1
cohen kappa for two-way table
...85 it seems like the second method (type='counts') is the correct way to use a contingency table... but am i correct? Secondly, when using the classAgreements() function I get different numbers: classAgreement(table(A,B)) $diag [1] 0.03296703 $kappa [1] 0.02180419 $rand [1] 0.9874325 $crand [1] 0.7648124 Perhaps I am mis-reading the relevant manual pages. Can anyone shed some light on the proper use, and therfore interpretation of these two methods - when using a contingency table as input? Thanks in advance, Dylan
2016 Apr 27
3
Create a new variable and concatenation inside a "for" loop
Hello, Suppose the you need a loop to create a new variable , i.e., you are not reading data from outside the loop. This is a simple example in Matlab code, for i=1:5 r1=randn r2=randn r=[r1 r2] c(i,:)=r; % creation of each row of c , % the ":" symbol indicates all columns. In R this would be [i,] end The output of interest is c which I'm creating inside the "for" loop