Displaying 20 results from an estimated 21 matches for "abstol".
2005 Mar 09
1
nnet abstol
Hi,
I am using nnet to learn transfer functions. For each transfer function I can estimate the best possible Mean Squared Error (MSE). So, rather than trying to grind the MSE to 0, I would like to use abstol to stop training once the best MSE is reached.
Can anyone confirm that the abstol parameter in the nnet function is the MSE, or is it the Sum-of-Squares (SSE)?
Best regards,
Sam.
[[alternative HTML version deleted]]
2005 Apr 13
0
abstol in nnet
Hello All,
I would like to know what fit criterion (abstol arg)
is in nnet. Is it the threshold for the difference btw
the max output and target values?
Is the value at each iteration also the difference btw
max of output and target values over all output units
(case of multiple classes)?
How could value displayed at each iteration be related
to SSE and...
2009 Nov 02
2
a prolem with constrOptim
...RR))
theta.0 = numeric(3*K)
for(i in 1:K) {theta.0[(1+3*(i-1)):(3*i)] = rep(1/10,3)+i/100}
# data1 gives an error but data2 does not!
constrOptim(theta=theta.0, f=likelihood, grad=score, ui=RR,ci=zeros,
data = data1, method="BFGS",
control=list(fnscale=-1,abstol=1e-16,reltol=1e-16))$par
constrOptim(theta=theta.0, f=likelihood, grad=score, ui=RR,ci=zeros,
data = data2, method="BFGS",
control=list(fnscale=-1,abstol=1e-16,reltol=1e-16))$par
# If you want to further check run the simulation below.
K = 3
N = rep(20,...
2006 Apr 13
1
bus error on calling nmmin
...le session:
nmminDemo.c:
#include <R_ext/Applic.h>
#include <stdio.h>
double parabola(int n, double *par, void *ex) {
double xm = par[0] - 1;
return xm * xm + 13;
}
int main()
{
double initial[1] = {1.5};
double result[1];
double value;
int convergenceCode;
const double abstol = 1e-16;
const double reltol = 1e-8;
const double alpha = 1.0; /* reflection factor */
const double beta = 0.5; /* contraction factor */
const double gamm = 2.0; /* expansion factor */
const int trace = 4; /* tracing on */
int fncount;
const int maxit = 10000;
nmmin(1, initial, resu...
2009 Mar 25
2
Listing of LAPACK error codes
...apack routine 'dsyevr'?
Especially I am interested about the meaning and handling of error codes 1
and 2. In Lapack.c I only see the reference to the variable info in certain
Fortran code:
F77_CALL(dsyevr)(jobv, range, uplo, &n, rx, &n, &vl, &vu, &il, &iu,
&abstol, &m, rvalues, rz, &n, isuppz, &tmp, &lwork, &itmp, &liwork, &info);
if (info != 0)
error(_("error code %d from Lapack routine '%s'"), info, "dsyevr");
lwork = (int) tmp;
liwork = itmp;
work = (double *) R_alloc(lwork,...
2006 Mar 29
1
calling R's optimization routines from C
...int n = mydata->n;
double mu = par[0];
double sum = 0.0;
int i;
for (i=0; i<n; i++) {
double t = X[i] - mu;
sum += t*t;
}
return sum;
}
int main(void)
{
int i,n=1, trace=1, maxit=100, fail, fncount;
double *par, abstol=0.0001, intol=.0001, alpha=1, beta=.5, gamma=2, *xin, *x,
Fmin;
MyData ex;
par=malloc(n*sizeof(double));
xin=malloc(n*sizeof(double));
x=malloc(n*sizeof(double));
par[0]=5;
xin[0]=5;
ex.n=5;
ex.X=malloc(ex.n*sizeof(double));
for(i=0;i<ex.n;i++) ex.X[i]=i;
nmmin(n,xin...
2007 Oct 13
1
R API - optim
...)
{
char *argv[]= {"nmminDemo", "--gui=none", "--silent"}; const int argc =
3;
double initial[1] = {1.5};
double result[1];
double value;
int convergenceCode;
/*
* The following values are based on the help
* page for optim.
*/
const double abstol = 1e-16;
const double reltol = 1e-8;
const double alpha = 1.0; /* reflection factor */ const double beta =
0.5; /* contraction factor */ const double gamm = 2.0; /* expansion factor
*/ const int trace = 0; /* tracing on */
int fncount;
const int maxit = 10000;
Rf_initEmbeddedR(argc,...
2008 Jul 05
3
Editing the "..." argument
Dear all,
I'd like tweaking the ... arguments that one user can pass in my
function for fitting a model. More precisely, my objective function is
(really) problematic to optimize using the "optim" function.
Consequently, I'd like to add in the "control" argument of the latter
function a "ndeps = rep(something, #par)" and/or "parscale =
2012 Jan 05
2
difference of the multinomial logistic regression results between multinom() function in R and SPSS
...ion in SPSS software.
The input data, model and parameters are below:
choles <- c(94, 158, 133, 164, 162, 182, 140, 157, 146, 182);
sbp <- c(105, 121, 128, 149, 132, 103, 97, 128, 114, 129);
case <- c(1, 3, 3, 2, 1, 2, 3, 1, 2, 2);
result <- multinom(case ~ choles + sbp + choles:sbp, abstol=1.0e-20,
reltol=1.0e-20, MaxNWts=10000);
However, the estimated coeffcients and standard errors of the coefficeints
are different from the SPSS.
For instance,
the estimated coefficients of the variable "choles" are 0.1946555 and
0.6244513 from the above result, but the SPSS result are...
2004 Oct 18
1
nnet learning
...ork learning a "noisy sine wave".
Suppose I generate my data like so..
x <- seq(-2*pi, 2*pi, length=500)
y <- sin(x) + rnorm(500, sd=sqrt(0.075))
I then train the neural net on the first 400 points using
c <- nnet(as.matrix(x[1:400]),as.matrix(y[1:400]), size=3, maxit=10000,
abstol=0.075, decay=0.007)
Inspecting the fit of the training set against the actual values using:
pmat<- plot(y[1:400])
lines(c$fitted.values, col="blue", lwd=2)
It seems as though neural net is not learning the negative values. I
have tried running nnet several times, but each time I ge...
2006 Nov 30
0
Preventing early stopping in neural network (nnet package)
...'m having trouble getting the network to run for the
maximum number of iterations. It always stops early, usually after
100 iterations claiming to have converged at an answer.
Now, for my purposes I want it to run for the entire number of
epochs, and I'm been looking at modifying the abstol parameter.
However, if I set abstol to 0, it still doesn't force the network to
run for the maximum specified epochs. From the description in the
documentation, setting it to 0 should achieve the effect I want. :(
I can't seem to find a way to prevent early stopping. Any help would...
2008 Oct 31
0
R help for invoking nmmin()
...,0)<<endl;
//cout << qnorm(0.7, 0.0, 1.0, 0, 0) << endl;
int n = 5;
double *dpar, *opar;
int fncount, fail;
dpar = new double [n];
opar = new double [n];
dpar[0] = 13.67318;
dpar[1] = 0;
dpar[2] = 17.02707;
dpar[3] = 0;
dpar[4] = 24.08231;
double value;
double abstol = 1e-16;
double intol = 1e-8;
int y = 12;
MM t = (MM)malloc(y*(n+2)*sizeof(TT));
t-> tempX = new double * [y];
for(size_t ii = 0; ii < y; ii++) {
t->tempX[ii] = new double [n];
}
t->tempX[0][1] = -0.03;
t->tempX[1][1] = -0.02;
t->tempX[2][1] = -0.015;
t->tempX[3]...
2012 Oct 10
1
"optim" and "nlminb"
#optim package
estimate<-optim(init.par,Linn,hessian=TRUE, method=c("L-BFGS-B"),control =
list(trace=1,abstol=0.001),lower=c(0,0,0,0,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf),upper=c(1,1,1,1,Inf,Inf,Inf,Inf,Inf,Inf,Inf,Inf,Inf))
#nlminb package
estimate<-nlminb(init.par,Linn,gr=NULL,hessian=TRUE,control =
list(trace=1,factr=1),lower=c(0,0,0,0,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf),upper=c(1,...
2008 Oct 03
1
Memory crash
...e in my C
functions the error might be. I give the output below. Can this be an R
bug? I suspect it has to do with repeated calls to 'vmmin' like this:
for (...){
vmax = vmaxget();
vmmin(*p, b, &Fmin,
bfun, bfun_gr, *maxit, *trace,
mask, abstol, reltol, nREPORT,
ext, &fncount, &grcount, &fail);
vmaxset(vmax);
...
}
but I am only guessing. Any suggestions?
Ubuntu 8.04, R-2.7.2.
G?ran
-------------------------------------------------------------------
> glmmboot(y ~ x, cluster = clu...
2004 Sep 30
1
polr (MASS) and lrm (Design) differences in tests of statistical signifcance
...Core 2 Linux.
I tested a proportional odds logistic regression with MASS's polr and
Design's lrm. Parameter estimates between the 2 are consistent, but the
standard errors are quite different, and the conclusions from the t and
Wald tests are dramatically different. I cranked the "abstol" argument
up quite a bit in the polr method and it did not make the differences go
away.
So
1. Can you help me see why the std. errors in the polr are so much
smaller, and
2. Can I hear more opinions on the question of t vs. Wald in making
these signif tests. So far, I understand the t...
2007 Jan 19
8
kate editor for R
Like kile for LaTeX, Linux/KDE's kate editor is an excellent editor for
R, with easy code submission to a running R process. Syntax
highlighting is good. I have not been able to figure out two things:
- how to automatically reformat a line or region of text using good
indentation rules (Emacs/ESS make this so easy by just hitting Tab while
the cursor is in a line, or highlighting a
2010 Aug 06
2
Stopping precision using 'optim'
Hi all~
I am wondering if it is possible to alter the stopping precision for parameters estimated using the 'optim'?
If it helps, I am minimizing the log-likelihood of a function using constraints (i.e. L-BFG-S).
-Jeremy
2012 Nov 05
1
relative convergence in 'optim'
Dear list,
I have a question related to the correct interpretation of the
relative convergence criterion used by 'optim'.
In the help of the function is it written that:
"reltol:Relative convergence tolerance. The algorithm stops if it is
unable to reduce the value by a factor of reltol * (abs(val) + reltol)
at a step."
and I was wondering if the previous criterion is
2005 Feb 08
1
Toying with neural networks
Hello all,
Ive been playing with nnet (package 'nnet') and Ive come across this
problem. nnet doesnt seems to like to have more than 1000 weights. If I
do:
> data(iris)
> names(iris)[5] <- "species"
> net <- nnet(species ~ ., data=iris, size=124, maxit=10)
# weights: 995
initial value 309.342009
iter 10 value 21.668435
final value 21.668435
stopped after 10
2005 Apr 11
4
R: function code
HI
sorry to be a nuisance to all!!!
how can i see the code of a particular function?
e.g. nnet just as an example