Displaying 20 results from an estimated 24 matches for "fvals".
Did you mean:
vals
2017 Jul 13
2
Help with R script
Using Ulrik?s example data (and assuming I understand what is wanted), here is what I would do:
ex.dat <- c("FName: fname1", "Fval: Fval1.name1", "Fval: ", "FName: fname2", "Fval: Fval2.name2", "FName: fname3")
tst <- data.frame(x = ex.dat, stringsAsFactors=FALSE)
sp <- strsplit(tst$x, ':', fixed=TRUE)
chk <-
2017 Jul 14
0
Help with R script
@Don your solution does not solve Vijayan's scenario 2. I used spread and
gather for that.
An alternative solution to insert mising Fval - picking up with Don's
newtst - is
newtst <- c("FName: fname1", "Fval: Fval1.name1", "FName: fname2", "Fval:
Fval2.name2", "FName: fname3", "FName: fname4", "Fval: fval4.fname4")
2011 Jun 24
4
How to capture console output in a numeric format
...at yields a character vector. I would like to extract the actual numeric values. Here is an example of what I am trying to do.
fr <- function(x) { ## Rosenbrock Banana function
on.exit(print(f))
x1 <- x[1]
x2 <- x[2]
f <- 100 * (x2 - x1 * x1)^2 + (1 - x1)^2
f
}
fvals <- capture.output(ans <- optim(c(-1.2,1), fr))
Now, `fvals' contains character elements, but I would like to obtain the actual numerical values. How can I do this?
Thanks very much for any suggestions.
Best,
Ravi.
-------------------------------------------------------
Ravi Varadhan,...
2010 Jan 20
2
Error meaning
Hi r-users,
I have the following code to solve 4 simultaneous eqns with 4 unknowns using newton iteration method. But I got the error message:
pars <- c(1.15, 40, 50, 0.78)
newton.input2 <- function(pars)
{ ## parameters to estimate
alp <- pars[1]
b1 <- pars[2]
b2 <- pars[3]
rho <- pars[4]
f1 <- pars[1]*pars[2]
f2 <-
2012 Sep 09
1
Solving a system of two equations
Hi,
I am trying to find a simple way to numerically solve a system of two
equations equal to zero with two unknowns (x_loc and y_loc). Here is a mock
data set and below it, the equations I need to solve.
theta<-c(180,135,90)/(2*pi)
x<-c(0,0,15)
y<-c(20,0,0)
0 =
-sum((y_loc-y)*(sin(theta)*(x_loc-x)-cos(theta)*(y_loc-y))/(((x_loc-x)^2+(y_loc-y)^2)^0.5)^3)
0 =
2016 Jun 27
2
xapian-letor: FeatureVector discussion
...s needs some discussion.
Presently, the FeatureVector class is defined as follows, with a fixed
number of feature count (19):
class FeatureVector::Internal : public Xapian::Internal::intrusive_base{
friend class FeatureVector;
double label;
double score;
std::map<int,double> fvals;
int fcount;
Xapian::docid did;
The two approaches that were discussed were:
1. Using enums as IDs for features in fvals.
2. Making fvals into a configurable vector of feature values.
The issues were that the first way would still assume an order in which the
features occur, and the secon...
2017 Jul 13
0
Help with R script
Hi Vijayan,
one way going about it *could* be this:
library(dplyr)
library(tidyr)
library(purrr)
ex_dat <- c("FName: fname1", "Fval: Fval1.name1", "Fval: ", "FName:
fname2", "Fval: Fval2.name2", "FName: fname3")
data.frame(x = ex_dat) %>%
separate(x, c("F1", "F2"), sep = ": ") %>%
filter(F2
2017 Jul 13
2
Help with R script
Dear R-help Group
Scenario 1:
I have a text file running to 1000 of lines...that
is like as follows:
[922] "FieldName: Wk3PackSubMonth"
[923] "FieldValue: Apr"
[924] "FieldName: Wk3PackSubYear"
[925] "FieldValue: 2017"
[926] "FieldName: Wk3Code1"
[927] "FieldValue: "
[928] "FieldValue: K4"
[929] "FieldName:
2016 Jun 29
2
xapian-letor: FeatureVector discussion
...ependently of RankList. Therefore, eliminating the
need of maintaing a global qrel storage (map<string, map<string, int> >
qrel; in FeatureManager::Internal) and thus eliminating the need of
load_relevance(*) and getlabel(*) functions. The score in FeatureVector is
simply the label, and fvals will be returned by FeatureManager (by using
feature values obtained from each of the Feature sub-class).
While ranking, FeatureVector fvals will be computed similarly by
FeatureManager, while the score gets assigned later at the time of ranking.
> * when configuring the letor system either...
2008 Sep 12
2
[LLVMdev] Selection Condition Codes
I am attempting to lower the selectCC instruction to the instruction set
of the backend I'm working on and I cannot seem to find a way to
correctly implement this instruction. I know how this instruction should
get implemented; I just have yet to find a way to do it. I want the
select_cc instruction to be lowered into a comparison followed by a
conditional move. I've attempted to use a
2006 Sep 26
15
RE: Individual passwords for guest VNC servers ?
> Thanks all point about security, I''ll do as follows.
> I thought that the point was the following two.
>
>
> 1. Storage place of encrypted password
> Should I store it in /etc/xen/passwd ?
> Or, should I wait for DB of Xen that will be released in
> the future?
The xend life cycle management patches were posted by Alistair a couple
of months back.
2005 Jun 01
1
Bootstrap direction
Hi all,
I am trying to bootstrap a small data set into 1000 "pseudodatasets" and
then run an ANOVA on each one. Can anyone provide guidance on how I could
do this?
Thank you.
-Dan Janes
************************************************
Dan Janes, Ph.D.
Harvard University/OEB
26 Oxford St.
Cambridge, MA 02138
Office: 617-496-2375
Fax: 617-495-5667
Email: djanes at oeb.harvard.edu
2009 Oct 20
1
Buglet in optim() SANN
I think SANN method in optim() is failing to report that it has not
converged. Here is an example
genrose.f<- function(x, gs=NULL){ # objective function
## One generalization of the Rosenbrock banana valley function (n
parameters)
n <- length(x)
if(is.null(gs)) { gs=100.0 }
fval<-1.0 + sum (gs*(x[1:(n-1)]^2 - x[2:n])^2 + (x[2:n] - 1)^2)
return(fval)
}
2012 May 08
1
Translation of Linear minimization probelm from matlab to r
Hi everyone, i?m a new user of R and i?m trying to translate an linear
optimization problem from Matlab into r.
The matlab code is as follow:
options = optimset('Diagnostics','on');
[x fval exitflag] = linprog(f,A,b,Aeq,beq,lb,ub,[],options);
exitflag
fval
x=round(x);
Where:
f = Linear objective function vector (vector of 45,rows)
A = Matrix for linear inequality
2005 Oct 13
3
Optim with two constraints
Hi R-list,
I am new to optimization in R and would appreciate help on the following
question. I would like to minimize the following function using two
constraints:
######
fn <- function(par,H,F){
fval <- 0.5 * t(par) %*% H %*% par + F%*% par
fval
}
# matrix H is (n by k)
# matrix F is (n by 1)
# par is a (n by 1) set of weights
# I need two constraints:
# 1.
2009 Mar 23
4
newton method
Hi R-users,
Does R has a topic on newton's method?
Thank you for the info.
2005 Jun 13
0
Pseudodataset text file
...eived
code that bootstrapped my dataset and ran an ANOVA on each pseudodataset,
producing a histogram of F-values. Here is the code I received that
produces this F-histogram.
X <- data.frame(b=rnorm(2162),c =factor(rep(1:47,each=46)))
## linear fit with true values
lm0 <- lm(b~c,data=X)
Fvals <- numeric(1000)
for (i in 1:1000) {
X.boot <- X[sample(1:nrow(X),replace=TRUE),]
Fvals[i] <- anova(lm(b~c,data=X.boot))$"F value"[1]
}
hist(Fvals)
I am grateful for the assistance but the code does not provide what I
need. I need the 1000 pseudodatasets produced by th...
2007 Nov 22
3
anova planned comparisons/contrasts
Hi,
I'm trying to figure out how anova works in R by translating the
examples in Sokal And Rohlf's (1995 3rd edition) Biometry. I've hit a
snag with planned comparisons, their box 9.4 and section 9.6. It's a
basic anova design:
treatment <- factor(rep(c("control", "glucose", "fructose",
"gluc+fruct",
2008 Sep 12
0
[LLVMdev] Selection Condition Codes
On Thu, Sep 11, 2008 at 6:14 PM, Villmow, Micah <Micah.Villmow at amd.com> wrote:
> I am attempting to lower the selectCC instruction to the instruction set of
> the backend I'm working on and I cannot seem to find a way to correctly
> implement this instruction. I know how this instruction should get
> implemented; I just have yet to find a way to do it. I want the select_cc
2008 Sep 12
2
[LLVMdev] Selection Condition Codes
Eli, Thanks for the tips.
I've been able to get something working using a custom instruction
inserter, however, I'm still having the problem of linking together the
setcc and the select_cc commands. I want to turn the setcc into a
comparison and use the results in the select_cc register. However, the
comparison information is in the select_cc instruction and the result of
the comparison