Displaying 20 results from an estimated 10000 matches similar to: "what is the cost in cv.glm?"
2013 Nov 21
0
Cost function in cv. glm for a fitted logistic model when cutoff value of the model is not 0.5
I have a logistic model fitted with the following R function:
glmfit<-glm(formula, data, family=binomial)
A reasonable cutoff value in order to get a good data classification (or
confusion matrix) with the fitted model is 0.2 instead of the mostly used
0.5.
And I want to use the `cv.glm` function with the fitted model:
cv.glm(data, glmfit, cost, K)
Since the response in the fitted
2011 Jul 22
1
cv.glm and "longer object length is not a multiple of shorter object length" error
Hi,
I've done some searching where others have had trouble with this error (or
"warning" actually), but I'm unable to solve my problem. I have a data
sheet with 13 columns and 36 rows. Each column has exactly the same number
of rows. I've created glms and now want to do cross-validation on 2 of
them. Please be gentle-- I'm new to R (and statistics, too, for that
2007 Jul 20
1
cv.glm error function
I have a couple quick questions about the use of cv.glm for
cross-validation.
1. If we have a Poisson GLM with counts Y~Poisson(mu) and
ln(mu)=beta0+beta1*x1+..., is the prediction error (delta) that is output
from cv.glm provided in terms of the counts (y) or the (mu)?
2. Can cv.glm be used for negative binomial models fit using glm.nb? It
appears to work, but since NB models aren't
2005 Dec 29
1
function cv.glm in library 'boot'
Hi, everyone,
I have a question regarding function cv.glm in library
'boot'.
Basically cv.glm can calculate the estimated K-fold
cross-validation prediction error for generalized
linear models. My question is this: if I am fitting a
logit model, what kind of threshold will it use to
calculate the prediction error (saved in 'delta')? It
will use 0.5 as the threshold or pick a
2006 Feb 16
1
cv.glm function error message in a loop
Dear list,
I am modelling fish distributions using the glm-function followed by the
step-function, and then want to cross-validate the model via the
cv.glm-function from the {boot} package. I am working on fish
distributions on coral reefs. The code I have works for one fish
species. Since I have 227 fishes, I wrote a loop. Now the
cv.glm-function comes up with an error message: "Error in
2008 Mar 06
0
glm.cv delta value?
Hi!
When I use the glm.cv function I get a value called "delta" which is explained as the "raw cross-validation estimate of prediction error". I recently found a formula for that term in literature where it is defined as:
alpha = 1 / N * sum over( yi - yi,pred,CV)
Well it is somehow similar to the RSS for R2 and the PRESS for Q2.
But this delta value increases with
2012 Apr 10
1
Package boot, funtion cv.glm
Hey all,
I need some help with a cross validation. I'm new with R and as well with
statistics. I had a group work to create a tool for remote sensing class
that extracts the best bands of hyperspectral satellite images that describe
vegetation. Its a regression between a linear function of using a normalized
differenced index (i-j)/(i+j) while i and j are the bands (in the data these
are the
2005 Mar 15
2
cv.glm {boot}
I am try to cross validate some logistic regressions. cv.glm allows me to do this randomly but since I have data over a number of years and over a number of distince areas, I would like to cross-validate temporarly and spatially. I've already attached the temporal and spatial attributes to my data, but I'm unsure as to how to achieve this, as it seems I can't use cv.glm for this
2005 Nov 19
1
predicted values from cv.glm
Hi. Is there a way to get the values predicted from (leave-one-out)
cv.glm?
It seems like a useful diagnostic to plot observed vs. predicted values.
Thanks,
Jeff
****************************************
Jeffrey A. Stratford, Ph.D.
Postdoctoral Associate
331 Funchess Hall
Department of Biological Sciences
Auburn University
Auburn, AL 36849
334-329-9198
FAX 334-844-9234
2009 Jan 20
5
Error message from CV.GLM
Dear list members.
I have problems with the usage of cv.glm from the boot package. Here are some parts of the script I wanted to use:
data <- read.table("selected_2D.csv", header=TRUE, sep=",")
?
glm.fitted <- glm("ydata$ y ~ 1 + density + vsurf_ID6 + vsurf_S ", data=data)
error <- cv.glm(data=data, glm.fitted, K=6)
ydata$y is a separate data set, where
2009 Jan 21
0
cv.glm: delta squared --> squared q
Dear list members,
I am using a cross validation of a generalised linear model (glm). The cv.glm function (from boot package) returns an error as so-called ?delta? value. I would like to get to a (cross-validated) squared q, because I want to directly compare it to the squared correlation coefficient r.
I tried to find an an equation for the raw and/or adjusted cross-validation estimate of
2006 Feb 28
3
does svm have a CV to obtain the best "cost" parameter?
Hi all,
I am using the "svm" command in the e1071 package.
Does it have an automatic way of setting the "cost" parameter?
I changed a few values for the "cost" parameter but I hope there is a
systematic way of obtaining the best "cost" value.
I noticed that there is a "cross" (Cross validation) parameter in the "svm"
function.
But I
2005 Jul 25
5
passing formula arguments cv.glm
I am trying to write a wrapper for the last example in help(cv.glm) that
deals with leave-one-out-cross-validation (LOOCV) for a logistic model.
This wrapper will be used as part of a bigger program.
Here is my wrapper funtion :
logistic.LOOCV.err <- function( formu=NULL, data=NULL ){
cost.fn <- function(cl, pred) mean( abs(cl-pred) > 0.5 )
glmfit <- glm(
2008 Feb 08
0
Using cv.tree to assign cases to specific cv-groups
Hello,
I would like to use cv.tree to run a 10-fold cross-validation
experiment on a tree object to help me choose a tree size.
Many users seem to allow their cases to be assigned to CV groups
randomly, but I have assigned each case to one of 10 cv groups, such
that the data from each of my experimental units is included in only
one cv-group.
According to the manual for the tree Package
2023 Nov 03
0
new cv package: cross-validation of regression models
Georges Monette and I would like to announce a new package, cv, now on
CRAN, which implements cross-validation of regression models.
Some of the functions supplied by the package:
- cv() is a generic function with a default method and computationally
efficient "lm" and "glm" methods, along with a method for a list of
competing models. There are also experimental
2023 Nov 03
0
new cv package: cross-validation of regression models
Georges Monette and I would like to announce a new package, cv, now on
CRAN, which implements cross-validation of regression models.
Some of the functions supplied by the package:
- cv() is a generic function with a default method and computationally
efficient "lm" and "glm" methods, along with a method for a list of
competing models. There are also experimental
2011 Nov 01
1
predict for a cv.glmnet returns an error
Hi there,
I am trying to use predict() with an object returned by cv.glmnet(), and get
the following error:
no applicable method for 'predict' applied to an object of class "cv.glmnet"
What's wrong?
my code:
x=matrix(rnorm(100*20),100,20)
y=rnorm(100)
cv.fit=cv.glmnet(x,y)
predict(cv.fit,newx=x[1:5,])
coef(cv.fit)
Thanks so much,
Asaf
--
View this message in context:
2019 Jun 09
2
Strange local variable cv::VideoCapture allocated
Hi
I am using clang-6 to compile this C++ code and I see a strange temporary
variable allocated at expression address 0x7ff1131536e8.
If I change the ternary operator at line 483 to an if-else, the temporary
is not allocated.
Thanks
Variables:
=========
FFMPEGVideoCapture ffmpeg_video_capture_;
cv::VideoCapture opencv_video_capture_;
Function:
========
bool
2007 May 12
0
There might be something wrong with cv.lm(DAAG)
Hi, everyone
When I was using cv.lm(DAAG) , I found there might be something wrong with
it. The problem is that we can't use it to deal with a linear model with
more than one predictor variable. But the usage documentation
hasn't informed us about this.
You can find it by excuting the following code:
xx=matrix(rnorm(20*3),ncol=3)
bb=c(1,2,0)
yy=xx%*%bb+rnorm(20,0,10)
2009 Aug 21
1
LASSO: glmpath and cv.glmpath
Hi,
perhaps you can help me to find out, how to find the best Lambda in a
LASSO-model.
I have a feature selection problem with 150 proteins potentially
predicting Cancer or Noncancer. With a lasso model
fit.glm <- glmpath(x=as.matrix(X), y=target, family="binomial")
(target is 0, 1 <- Cancer non cancer, X the proteins, numerical in
expression), I get following path (PICTURE