search for: myweights

Displaying 12 results from an estimated 12 matches for "myweights".

Did you mean: myweight
2007 Jun 15
2
model.frame: how does one use it?
Philipp Benner reported a Debian bug report against r-cran-rpart aka rpart. In short, the issue has to do with how rpart evaluates a formula and supporting arguments, in particular 'weights'. A simple contrived example is ----------------------------------------------------------------------------- library(rpart) ## using data from help(rpart), set up simple example myformula <-
2013 Mar 05
1
Remote database & local database, and adding new weight found vtable error
Hello, guys. Q1. now I have load all the docid and its document data into a dictionary for faster loading data instead of calling Xapian::MSetIterator i; i.get_document().get_data(); but I was happened to discover that the dictionaries got by such two method were different: both methods use DB1, DB2 method 1: Xapian::Database db = Xapian::Database(the path of DB1); Xapian::Database db2 =
2011 Dec 27
0
Using minsplit and unequal weights in rpart
...epeated <- rbind(kyphosis, kyphosis, kyphosis) fitRepeated <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosisRepeated, control=rpart.control(minsplit=45)) plot(fitRepeated) text(fitRepeated, use.n=TRUE) # instead of repeating, use weights kyphosisWeighted <- kyphosis kyphosisWeighted$myWeights <- 3 fitWeighted <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosisWeighted, weights=myWeights, control=rpart.control(minsplit=15)) ## minsplit has to be adjusted for weights... plot(fitWeighted) text(fitWeighted, use.n=TRUE) # uneven weights don't works the same way kyph...
2010 Jun 03
1
mlogit and weights
Hello, I can't figure out why using and not using weights in mlogit yields identical results. My motivation is for the case when an "observation" or "individual" represents a number of individuals. For example, library(mlogit) library(AER) data("TravelMode", package = "AER") TM <- mlogit.data(TravelMode, choice = "choice", shape =
2012 Jul 17
1
weighted mean by week
Hello! I wrote a code that works, but it looks ugly to me - it's full of loops. I am sure there is a much more elegant and shorter way to do it. Thanks a lot for any hints! Dimitri # I have a data frame: x<-data.frame(group=c("group1","group2","group1","group2"), myweight=c(0.4,0.6,0.4,0.6),
2010 Oct 22
1
lm looking for weights outside of the user-defined function
...ar R'ers, I am fighting with a problem that is driving me crazy. I use "lm" in my user-defined function, but it seems to be looking for weights outside of my function's environment: ### Generating example data: x<-data.frame(y=rnorm(100,0,1),a=rnorm(100,1,1),b=rnorm(100,2,1)) myweights<-runif(100) data.for.regression<-x[1:3] ### Creating function "weighted.reg": weighted.reg=function(formula, MyData, filename,WeightsVector) { print(dim(MyData)) print(filename) print(length(WeightsVector)) regr.f<-lm(formula,MyData,weights=WeightsVector,na.action=na.omit)...
2013 Mar 04
2
Need Beginner Guide for Matcher Optimisations Project
Hi, While searching for a project which matches my interest andskill level, I found this project named Matcher Optimization. This project is really challenging and excting from my view point and I would like to be a part of this project. Optimization techniques metioned in the reference links provided will take some time for me to have a good understanding about them. But I am trying to get my
2005 Dec 29
1
Repeating functions
Hi, I have a number of spatial weight files and using Roger Bivand's spdep, I would like to 1. Convert them into neighbor lists using 2. Convert the neighbor lists into spatial weights For a given file, the syntax would be mygal_nb1 <- read.gal("mygalfile1", override.id = TRUE) myweight1 <- nb2listw(mygal_nb1) I have mygalfile[i] with i from 1 through to 6 and would like to
2007 Apr 28
1
bootstrap: macro `AM_CXXFLAGS' not found in library
Folks, I get this when I try to run 'bootstrap' to rebuild Xapian from scratch. This is the current revision from the svn repository today (8400). Any suggestions on what other package may be needed (both gcc and g++ are installed). ken@mercury:~/sandbox/xapian/trunk$ ./bootstrap Bootstrapping `xapian-core' aclocal: configure.ac: 130: macro `AM_CXXFLAGS' not found in library
2008 Oct 07
2
weighted quantiles
I have a set of values and their corresponding weights. I can use the function weighted.mean to calculate the weighted mean, I would like to be able to similarly calculate the weighted median and quantiles? Is there a function in R that can do this? thanks, Spencer [[alternative HTML version deleted]]
2011 Mar 30
0
RWeka - adding weights to a dataset
Hello, I was wondering what would be the easiest way to append weights to a dataset in RWeka. Ideally, I'd like to have something like: m <- LogitBoost(Species ~ ., data=iris, weights = myweights) But that, as far as I understand, it is not implemented and I'd need to use a workaround. I know that when programming Weka in Java it is possible to assign weights to instances using the setWeight, but I don't know exactly what would be the easiest way to do it. I was thinking about i...
2011 Mar 08
1
MSet order
Hello I defined a weighting scheme to simulate a king of "euclidean" distance. To test it, i used a database with 1000 documents. If I run : enquire.set_weighting_scheme(MyWeight()); Xapian::MSet matches = enquire.get_mset(0, 1000); I have a correct list of results. But if I run Xapian::MSet matches = enquire.get_mset(0, 10); I don't have the top-10 results. If I run Xapian::MSet