similar to: problem with nnet

Displaying 20 results from an estimated 80 matches similar to: "problem with nnet"

2005 Mar 15
1
KNN one factor predicting problem
Could anybody help me out please? > cl<-as.factor(traindata[,13]) > knn(traindata[1:295,2], newdata[1:32,2], cl,k=2, prob=TRUE) Error in knn(traindata[1:295, 2], newdata[1:32, 2], cl, k = m, prob = TRUE) : Dims of test and train differ Both traindata and newdata have 13 elements. Only one of the first 12 elemnets is needed to predict the 13 element. What's the problem of
2011 May 24
1
seeking help on using LARS package
Hi, I am writing to seek some guidance regarding using Lasso regression with the R package LARS. I have introductory statistics background but I am trying to learn more. Right now I am trying to duplicate the results in a paper for shRNA prediction "An accurate and interpretable model for siRNA efficacy prediction, Jean-Philippe Vert et. al, Bioinformatics" for a Bioinformatics project
2006 Mar 23
0
front- end problem while using nnet and tune.nnet
Dear R people, I am using tune.nnet from e1071 package to tune the parameters for nnet. I am using the following syntax: tuneclass <-c(rep(1,46),rep(2,15)) tunennet <-tune.nnet(x=traindata,y=tuneclass,size=c(50,75,100),decay=c(0,0.005,0.010),MaxNWts = 20000) Here traindata is the training data that I want to tune for nnet which is a matrix with 61 rows(samples) and 200
2011 May 28
0
how to train ksvm with spectral kernel (kernlab) in caret?
Hello all, I would like to use the train function from the caret package to train a svm with a spectral kernel from the kernlab package. Sadly a svm with spectral kernel is not among the many methods in caret... using caret to train svmRadial: ------------------ library(caret) library(kernlab) data(iris) TrainData<- iris[,1:4] TrainClasses<- iris[,5] set.seed(2)
2009 Jan 23
1
predict function problem for glmmPQL
Hi all, I am using cross-validation to validate a generalized linear mixed effects model fitted using glmmPQL. i found that the predict function has a problem and i wonder if anyone has encountered the same problem? glmm1 = glmmPQL(y~aX+b,random=~1|sample,data=traindata) predict(glmm1,newdata=testdata,level=1,type="response") gives me all "NA"s. it works for level=0 (the
2009 Aug 04
1
Strange error with ROCR
Hello, I've come across a strange error... Here is what happens: model <- svm(traindata,trainlabels, type="C-classification", kernel="radial", cost=10, class.weights=c("win"=3,"lose"=1), scale=FALSE, probability = TRUE) predictions <- predict(model, traindata) pred <- prediction(predictions, trainlabels) This returns an error: Error in
2020 Apr 01
2
añadir líneas verticales con ggplot
Buenos días, hago un mapa con ggplot: world<-map_data('world') windows();ggplot(legend=FALSE) + ... geom_point(data=Data,aes(x=lon,y=lat,color=Clst),size=1.25) + scale_color_manual(values=c("grey45","navy","skyblue","gold","green3","darkgreen")) + geom_path( data=world, aes(x=long, y=lat,group=group)) + labs(title =
2007 May 15
3
qr.solve and lm
Dear R experts, I have a Matlab code which I am translating to R in order to examine and enhance it. First of all, I need to reproduce in R the results which were already obtained in Matlab (to make sure that everything is correct). There are some matrix manipulations and '\' operation among them in the code. I have the following data frame > ABS.df Pro syn
2010 Aug 17
1
ROCR data input
Hi there, I'm having some difficulty with the ROCR package. I've installed it fine, and the sample data works (ROCR.simple), however when I try to load my own data it complains that there is an error in prediction as the number of classes is not equal to 2. I read the data from a text file which contains one column of probabilities and one column of binary 0 and 1. I then put it into a
2012 Nov 07
5
Calling R object from R function
Hi, Can you please help me with this please? What I am trying to do is call a vector from R function and used in the new function So I create 4 functions with these arguments M11 <- function(TrainData,TestData,mdat,nsam) { ls <- list() I have few statments one of them is vectx <- c(,1,2,3,4,5,6,6) vectz <- c(12,34,5,6,78,9,90) and then................ ls(vectx=vtecx,vectz=vectz)
2006 Mar 10
1
need help in tune.nnet
Dear R people, I want to use the tune.nnet function of e1071 package to tune nnet . I am unable to understand the parameters of tune.nnet from the e1071 pdf document. I have performed nnet on a traindata and want to test it for class prediction with a testdata. I want to know the values of size,decay,range etc. parameters for which the prediction of testdata is best. Can anyone please tell me
2007 Aug 01
1
Predict using SparseM.slm
Hi, I am trying out the SparseM package and had the a question. The following piece of code works fine: ... fit = slm(model, data = trainData, weights = weight) ... But how do I use the fit object to predict the values on say a reserved testDataSet? In the regular lm function I would do something like this: predict.lm(fit,testDataSet) Thanks -Bala
2009 Aug 04
1
Save model and predictions from svm
Hello, I'm using the e1071 package for training an SVM. It seems to be working well. This question has two parts: 1) Once I've trained an SVM model, I want to USE it within R at a later date to predict various new data. I see the write.svm command, but don't know how to LOAD the model back in so that I can use it tomorrow. How can I do this? 2) I would like to add the
2020 Jun 05
3
líneas sobre un mapa
Gracias Emilio y Jorge. Tengo que explicarlo mejor. Mostrando a una audiencia cómo hacer un tipo de análisis, se hace un loop (abajo) que analiza un mapa por regiones longitudinales. Tal y como está el script, print(i) te indica la longitud por la que va (de 10º en 10º) pero me gustaría que en vez de eso te fuese representando una línea vertical sobre el mapa, que he representado previamente con
2010 Nov 26
1
Issues with nnet.default for regression/classification
Hi, I'm currently trying desperately to get the nnet function for training a neural network (with one hidden layer) to perform a regression task. So I run it like the following: trainednet <- nnet(x=traindata, y=trainresponse, size = 30, linout = TRUE, maxit=1000) (where x is a matrix and y a numerical vector consisting of the target values for one variable) To see whether the network
2004 Jan 09
2
Error on SMB Packages
-----BEGIN PGP SIGNED MESSAGE----- ******************************************************************** The contents of this email are intended exclusively for the addressee. If you are not the addressee you must not read use or disclose the email contents ; you should notify us immediately [ by clicking "Reply" ] and delete this email. Nationwide monitors e-mails to ensure its systems
2012 May 15
1
caret: Error when using rpart and CV != LOOCV
Hy, I got the following problem when trying to build a rpart model and using everything but LOOCV. Originally, I wanted to used k-fold partitioning, but every partitioning except LOOCV throws the following warning: ---- Warning message: In nominalTrainWorkflow(dat = trainData, info = trainInfo, method = method, : There were missing values in resampled performance measures. ----- Below are some
2009 Aug 25
1
Clogit or LRM?
Hello I believe that I'm getting very close in my modeling application. I've come across a challenge that I am unable to solve and would really appreciate the group's opinion. I've been using the val.prob function from the Design library (Thanks Frank!!) to both evaluate and visualize my model. From the scores and graph, it appears as my model is very accurate in
2006 Apr 27
15
Which is faster, calling helpers or rendering a partial?
Using partials is a nice way to separate chunks of content into separate pages as opposed to building strings in helpers, but I''m wondering which is faster. It scares me when I see stuff like: Rendered users/_public (0.00051) Rendered users/_public (0.00009) Rendered users/_public (0.00008) Rendered users/_public (0.00008) Rendered users/_public (0.00008) ....50 more times Has anyone
2005 Dec 26
0
problem with samr
Hello Everybody, I am trying to perform SAM with the samr package. I am using the following code: sink ("R005") library(siggenes) library(samr) library(nnet) A <- as.matrix(read.table("D:\samrgenes1000.txt")) B <- as.matrix(read.table("D:\genenames1000.txt")) y1 <- c(rep(1,20),rep(2,6)) #there are 20 chips of one kind and 6 of the other kind. datasam =