Displaying 5 results from an estimated 5 matches for "xweight".
Did you mean:
weight
2010 Apr 15
2
r-loop
HI, Dear community,
I am building the following loop,
ww<-function(file) {
lossw<-vector()
for (x in seq(0.1, 0.9, by=0.1)) {
cat('xweight ', x, '\n')
lossw[i] <- cross.validation(file, x)$avg
}
return(lossw) }
MY question is how to index the lossw[i]?
for (i in 1:9)
for (x in seq(0.1, 0.9, by=0.1))
Thanks so much!
--
Sincerely,
Changbin
--
[[alternative HTML version...
2010 Jun 02
1
how to label the som notes by the majority vote
...eric(alex1$Label)
alex1$outcome[1:20]
#self-organizing maps(unsupervised learning)
library("kohonen")
#SOM, the supervised learning, train the map using outcome as the class
variable.
set.seed(13)
final.xyf<- xyf(data=as.matrix(alex1[,c(1:256)]),
Y=classvec2classmat(alex1$outcome), xweight = 0.99, grid=somgrid(20, 30,
"hexagonal"))
outcome.xyf <- predict(final.xyf)$unit.prediction#get prediction
outcome.predict<- as.numeric(classmat2classvec(outcome.xyf)) #change matrix
to vectors.
outcome.label<-LETTERS[outcome.predict] #conver the numeric value to
letters.
p...
2013 Jul 24
1
Help to improve prediction from supervised mapping using kohonen package
...Attempting to follow the examples in Wehrens and Buydens, 2007,
21(5), J Stat Soft.
# somdata[1] is the MEAS_TC variable
somX <- scale(training[-1])
somY <- training[[1]] # Needs to return a vector
# Train the map (not sure this is how it should be done):
tc.xyf <- xyf(data=somX, Y=somY, xweight=0.5, grid=somgrid(6, 6,
"hexagonal"), contin=TRUE)
# Prediction with test set:
tc.xyf.prediction <- predict(tc.xyf, newdata = scale(testing[-1]))
# Basic plot:
x <- seq(nrow(testing))
plot(x, testing[, "MEAS_TC"], type="l", col="black", ylim=c(0, 3.5)...
2010 Apr 06
2
help in function in R akin to macro in SAS
...it may concern,
I need help to figure the "macro" function in R: I need to plot the
different data sets by a plotxyf function, I want the title to be different
for different data set.
# get the data set
final.xyf<- xyf(data=as.matrix(my.final),
Y=classvec2classmat(final$outcome), xweight = 0.5, grid=somgrid(5, 4,
"hexagonal"))
#plot function
plotxyf<-function (data) {
plot(data, type="mapping", labels=final$target, col=final$outcome+1,,
main="Supervised: Mapping plot for data")
}
#use the plotxyf function....
2010 Apr 15
4
Does "sink" stand for anything?
Hello Everyone,
Learning about R and its wonderful array of functions. If it's not obvious, I usually try to find out what a function stands for. I think this helps me remember better.
One function that has me stumped is "sink." Can anyone tell me if this stands for something?
Thanks,
Paul
__________________________________________________
[[alternative HTML