search for: xnorm

Displaying 9 results from an estimated 9 matches for "xnorm".

Did you mean: xform
2007 Jan 26
2
%*% in Matrix objects
Dear R users, I need to normalize a bunch of row vectors. At a certain point I need to divide a matrix by a vector of norms. I find that the behavior of Matrix objects differs from normal matrix objects. Example the following code examples differ only in xnormed changing from normal to Matrix object: x = matrix(1:12,3,4) x = as(x, "CsparseMatrix") xnorms = sqrt(colSums(x^2)) (xnormed = t(x) * (1/xnorms)) This produces a "warning: coercing sparse to dense matrix for arithmetic in: t(x) * 1/xnorms." but gets the result (a 4 x 3 m...
2011 Jan 16
3
rootogram for normal distributions
Using R-2.12.1 and latticeExtra-0.6-14, I would like to understand why a rootogram displaying samples from the Poisson distribution looks like I expected it, whereas a rootogram using the normal distribution does not: library(latticeExtra) rootogram(~rpois(1000, lambda = 50), dfun = function(x) dpois(x, lambda = 50)) rootogram(~rnorm(1000), dfun = function(x) dnorm(x,mean(x),sd(x))) I
2017 Aug 24
1
Problem in optimization of Gaussian Mixture model
...448 829.902 61.02859 9.149168 74.84682 0.1241933 0.6329082 0.2428986 I have used optima and optimx to find the maxima, but it gives me value near by the highest mean as an output, for example 830 in the above parameters. The code for my optim function is val1=*optim*(par=c(X=1000, *seg=1*),fn=xnorm, opt=c(NA,seg=1), method="BFGS",lower=-Inf,upper=+Inf, control=list(fnscale=-1)) *I am running the optim function in a loop and for different initial value and taking the val1$par[1] as the best value.* *I am taking this parameter since I want to run it on n number of segments latter*...
2017 Aug 10
1
"Help On optim"
...and set f?(x)=0 I thought of using Newton method * *In R the function I selected for my problem is optim.* *Below is my code * *l = 2 # represent the number of mixture component* *i=1# represent the segment 1 if i=2 represent the 2 segment* *parametersDf #which I have posted above* *xnorm= function(x)* *{ * * #observation= append(segment1, segment2)* * mu.vector = parametersDf[1:l] * * var.vector =parametersDf[(l+1):((2*l))]* * coeff.vector=parametersDf[(2*l+1):(3*l)]* * val_df=data.frame()* * sum_prob=0* * for (j in 1:l){* * val=(coeff.vector[i,j]*(dnorm(x,mu.vect...
2017 Aug 11
0
Problem in retrieving list parameters
Hello, I am having some problem in retrieving the list elements Code Mean_of_mc is a list as described below mean_mc_1 mean_mc_2 mean_mc_3 mean_mc 0.9577246 2.000516 2.962521 mean_mc 7.957725 9.000516 9.962521 optim(par=c(lVal=2, mu=Mean_of_mc), fn=xnorm, method = "BFGS", control=list(fnscale=-1)) xnorm= function(par) { print(par) x=par['parl'] l=par['lVal'] val=par['mu'] #some logic } get NA for val, how can i get all the values of Mean_of_mc Thanks Niharika [[alternative HTML version delete...
2019 May 11
1
R problems with lapack with gfortran
..._ (int *n, double *v, double *x, int *isgn, double *est, int *kase, int *isave); void dlaln2_ (int_least32_t *ltrans, int *na, int *nw, double *smin, double *ca, double *a, int *lda, double *d1, double *d2, double *b, int *ldb, double *wr, double *wi, double *x, int *ldx, double *scale, double *xnorm, int *info); void dlabad_ (double *small, double *large); void drscl_ (int *n, double *sa, double *sx, int *incx); void dlatrs_ (char *uplo, char *trans, char *diag, char *normin, int *n, double *a, int *lda, double *x, double *scale, double *cnorm, int *info, size_t uplo_len, size_t trans_len, s...
2010 Mar 24
1
Omega: behavior msize when collapsing results
...number: field=searchnumber boolean=XNUMBER indexnopos productgroup: field=productgroup boolean=XPRODUCTGROUP property: field=property boolean=XPROPERTY colour: field=colour boolean=XCOLOUR size: field=size boolean=XSIZE colourandsize: field=size boolean=XCOLOURANDSIZE norm: field=norm boolean=XNORM picture: field=picture sort: valuenumeric=1 field=sort icon: field=icon boolean=XICON preview: unhtml truncate=200 field=preview My Omega command looks like this: FMT=xml DEFAULTOP=OR HITSPERPAGE=9 MINHITS=900 SORT=1 SORTREVERSE=1 COLLAPSE=0 B=LNL B=XTYPEproduct P='(catalog:2 OR catalog...
2003 Jan 08
3
Errors running R in Batch mode under Win2000
I have made many different attempts to run a R program in Batch mode. I run a DOS command like: C:\Progra~1\R\rw1061\bin\rterm.exe -q --no-restore --no-save myprogram.R out.txt What happens: 1. DOS Shell starts up well 2. R starts 3. I get the messages: "ARGUMENT 'myprogram.R' __ignored__" "ARGUMENT 'out.txt' __ignored__" 4. R Shell is ready to
2019 May 04
4
R problems with lapack with gfortran
On Sat, May 04, 2019 at 06:42:47PM +0200, Thomas K?nig wrote: > > > - figure out Fortran2003 specification for C/Fortran interoperability > > -- this _sounds_ like the right solution, but I don't think many > > understand how to use it and what is implied (in particular, will > > it require making changes to LAPACK itself?) > > That would actually be fairly