Displaying 20 results from an estimated 7000 matches similar to: "classification"
2012 Feb 09
1
Constraint on one of parameters.
Dear all,
I have a function to optimize for a set of parameters and want to set a
constraint on only one parameter. Here is my function. What I want to do is
estimate the parameters of a bivariate normal distribution where the
correlation has to be between -1 and 1. Would you please advise how to
revise it?
ex=function(s,prob,theta1,theta,xa,xb,xc,xd,t,delta) {
expo1=
2011 Nov 22
5
x, y for point of intersection
Hi everyone,
?
I am trying to get a point of intersection between a
polyline and a straight line ?.. and get the x and y coordinates of this point.
For exemplification consider this:
?
?
set.seed(123)
?
k1 <-rnorm(100, mean=1.77, sd=3.33)
?k1 <- sort(k1)
q1 <- rnorm(100, mean=2.37, sd=0.74)
q1 <- sort(q1, decreasing = TRUE)
plot(k1, q1, xlim <- c((min(k1)-5),
2017 May 30
2
Pseudo-instruction that overwrites its input register
On Tue, 30 May 2017, Nemanja Ivanovic wrote:
> This is typically accomplished with something like PPC's `RegConstraint` and
> `NoEncode`. You can see examples of it that are very similar to what you're after in
> PPC's load/store with update forms (i.e. load a value and update the base register
> with the effective address - these are used for pre-increment loads/stores).
2010 Jul 29
1
[PATCH] Reflow logic to make it easier to follow
The control flow was:
if (!y) {
ppix = ...
}
if (y) {
...
} else if (x) {
use ppix for something
} else {
use ppix for something
}
Merge the if(!y) block with the two else branches. This avoids
a false-positive in the clang static analyzer, it can't know that
!y and x are mutually exclusive.
The result looks something like this:
if (y) {
...
} else {
ppix = ...
if (x) {
2020 Feb 09
2
[RFC PATCH] Add SHA1 support
From: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
This is a huge all-in-one patch and deserves a little cleanup and
splitting. However, I wanted to get it out here for some feedback.
My primar motivation to use SHA1 for checksumming (by default) instead
of MD5 is not the additional security bits but performance. On a decent
x86 box the SHA1 performance is almost the same as
2013 Apr 16
1
avoid losing data.frame attributes on cbind()
Dear all,
How should I add several variables to a data frame without losing the
attributes of the df? Consider the following:
> require(Hmisc)
> Xa <- iris
> label(Xa, self=T) <- "Some df label"
> str(Xa)
'data.frame': 150 obs. of 5 variables:
$ Sepal.Length: num 5.1 4.9 4.7 4.6 5 5.4 4.6 5 4.4 4.9 ...
$ Sepal.Width : num 3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9
2004 Jun 30
1
AS_NUMERIC and as.numeric - Could someone explain?
Dear List,
I stepped into a strange effect which I can't explain to myself
(probably due to lack of knowledge on R internals).
I have four vectors a,b,c and z of size 10000 each. With these vectors I
call
.Call("hyp2f1forrey", a, b, b, z, PACKAGE = "hyp2f1")
to access
SEXP hyp2f1forrey(SEXP a, SEXP b, SEXP c, SEXP x)
{
int i,n;
double *xa, *xb, *xc, *xx,
2017 May 30
1
Pseudo-instruction that overwrites its input register
The reason the ones in PPCInstrInfo.td don't have the patterns to match is
the reason they are more analogous to your problem. Namely, tblgen does not
have a way to produce nodes with more than one result. The load-with-update
instructions do exactly that - one of the inputs is also an output, but the
other output is independent (and necessarily a separate register). The FMA
variants have
2009 Aug 23
2
difficult "for"
Hi,
My english isn't brilliant and my problem is very difficult to describe but
I try ;)
My first question is: May I write loop "for" like this or similar - for (i
in sth : sth[length(sth)], k in sth_else : length(sth_else) ) - I'd like
to have two independent conditions in the same loop "for".
My secound question depend on program below. I'd like to write every
2008 May 21
0
how to write fac.design (S-plus) in R
hi,
Anyone here know well of the fac.design of S-plus? I need to rewrite the
following code in R
code in S-plus
*pt.design = fac.design( c(2,2,3,2),factor.names = list(Hs=c("I","II"),lef =
c("0","1"),lep = c("0","1","2"),Type=c("gt","sy")))
c.design=fac.design(
2008 May 21
0
fac.design in R
hi,
Anyone here know well of the fac.design of S-plus? I need to rewrite the
following code in R
code in S-plus
*pt.design = fac.design( c(2,2,3,2),factor.names = list(Hs=c("I","II"),lef =
c("0","1"),lep = c("0","1","2"),Type=c("gt","sy")))
c.design=fac.design(
2003 Jul 14
2
problem with coding for 'optim' in R
Hi, there
I am a graduate student new to coding in S who is hitting a bit of a wall
at present using an "optim" function. I am running into some troubles, and
was hoping someone might be able to recognize where I am going wrong.
As background: I have constructed a loop that carries out a 365-day
calculation for a mass-balance model. Basically, the model depends on 2
variables (p,
2012 Jun 21
4
convert 'character' vector containing mixed formats to 'Date'
Dear all
I have a 'character' vector containing mixed formats (thanks Excel!)
and I'd like to translate it into a default "%Y-%m-%d" Date vector.
x <- c("1/3/2005", "13/04/2004", "2/5/2005", "2/5/2005", "7/5/2007",
"22/04/2004", "21/04/2005", "20080430", "13/05/2003",
2011 Oct 10
4
correlation matrix
Hello Gurus
I have two correlation matrices 'xa' and 'xb'
set.seed(100)
d=cbind(x=rnorm(20)+1,
x1=rnorm(20)+1,
x2=rnorm(20)+1)
d1=cbind(x=rnorm(20)+2,
x1=rnorm(20)+2,
x2=rnorm(20)+2)
xa=cor(d,use='complete')
xb=cor(d1,use='complete')
I want to combine these two to get a third matrix which should have half
values from 'xa' and half
2006 Aug 22
1
summary(lm ... conrasts=...)
Hi Folks,
I've encountered something I hadn't been consciously
aware of previously, and I'm wondering what the
explanation might be.
In (on another list) using R to demonstrate the difference
between different contrasts in 'lm' I set up an example
where Y is sampled from three different normal distributions
according to the levels ("A","B","C")
2005 Jul 05
1
Kind of 2 dim histogram - levelplot
Dear R-List,
I've written some code to put measurement values at a position x and y
in bins (xb and yb). It works, but I wonder if there isn't a function
that would do what I do by hand in "# fill data in bins"?
Here is the code:
# data
x <- c( 1.1, 1.5, 2.3, 2.5, 2.6, 2.9, 3.3, 3.5 )
y <- c( 6.3, 6.2, 5.9, 5.3, 5.4, 4.2, 4.8, 4.6 )
val <- c( 50, 58, 32, 14, 12,
2010 Jul 27
0
3d topographic map [SEC=UNCLASSIFIED]
Hi Sherri,
There are examples of topographic maps which you have been pointed to, however, I suspect that you want to know where you can obtain topographic data from rather than a canned example.
There are quite a few intricacies to the process so I will go through them for you.
(1)
Topography files can be found in the geomapdata library. You will probably want to use the maps package too (if
2007 Dec 17
0
guidelines for consistency of vector functions
Moving on from the discussion of the fact that length(x)==9 for any
POSIXlt object x (which seems diabolically confusing, given that 'c' and
'[' are defined for POSIXlt and have the vector-like behavior one would
expect), what about having some guidelines for coding and documentation
of vector-like classes?
(1) a vector-like class should implement functions in groups:
2012 Sep 20
1
AIX 5.8p1?
Good Morning,
We just performed some security scanning on one of our AIX systems and these vulnerabilities was returned:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-4755
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-5000
We are currently running: 5.8.0.6101
The latest on IBMs
2009 May 01
0
Copying ncdf dims and vars from one file to the other
Hi, all
I have a large number of NetCDF files that I need to average and then
put the mean in a new NetCDF file.
My problem is that I do this every time for files with different
variables, so I do not want to hard-code the variables in the new NetCDF
file I creat.
does anyone know how I can copy ALL the dimensions and variables from
one NetCDF file to another, and just put the mean I calculated as