ndow_size) :
## 'window_size' must be at least 2.
>
*David Katz*, TIBCO Data Science
1.541.324.7417
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/m
e queries are
different.
## Error in fast_avg_sd(data, window_size) :
## 'window_size' must be at least 2.
>
*David Katz*, TIBCO Data Science
1.541.324.7417
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
ing in dist_profile(data, data, nn, window_size = .mp$w, index =
discord_idx) :
## Warning: Result may be inconsistent if the size of the queries are
different.
## Error in fast_avg_sd(data, window_size) :
## 'window_size' must be at least 2.
*David Katz*, TIBCO Data Science
1.541.32
fference: 0.3585409"
#all.equal(gbm.formula,gbm.Fit) no!
(Based on the package examples)
Thanks
*David Katz*| IAG, TIBCO Spotfire
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more,
Pascal,
Oops. Thanks!
*David Katz*| IAG, TIBCO Spotfire
O: 1.541.203.7084 | M: 1.541.324.7417
On Mon, Sep 28, 2015 at 5:47 PM, Pascal Oettli wrote:
> You misspelled the web address. It is "R-project", not "R.project".
> Thus, the command line should be:
>
Is mgcv and particularly its gam available for Splus? I've been using it
happily in R and need to implement something in Splus for which the
automatic smoothing parameter selection is needed.
Thanks for any guidance,
David Katz
da...@davidkatzconsulting.com
--
View this message in co
I believe you can in this sense: use model.matrix to create X for
glmnet(X,y,...).
However, when dropping variables this will drop the indicators individually,
not per factor, which may not be what you are looking for.
Good luck,
David Katz
Axel Urbiz wrote:
>
> Hi,
>
> Is it
ne is not
composed of lists and then concatenates. If the structure of the lists does
not agree, this will fail.
Regards,
David Katz
da...@davidkatzconsulting.com
--
View this message in context:
http://r.789695.n4.nabble.com/list-concatenation-tp3209182p3209324.html
Sent from the R help maili
1) You have redefined the command list which creates lists - not a great
idea.
2) See lapply; for example. Try something like:
list.of.df <- lapply(list.of.filenames,read.csv)
list.of.results <- lapply(list.of.df,your.application.function)
Regards,
David
--
View this message in context:
http:
Often the purpose of first/last in sas is to facilitate grouping of
observations in a sequential algorithm. This purpose is better served in R
by using vectorized methods like those in package plyr.
Also, note that first/last has different meanings in the context of "by x;"
versus "by x notsorted
-222.
Ultimately, I'm going to replace the values in the integer-only rows with
"NAs." But first I need r to recognize the integer-only rows. I assume
whatever function I write will be keyed off of the ".s", but have no
clue how to write that function
ch == s))
}
[1] 1
sch pop
1 1 100
2 1 200
[1] 2
sch pop
3 2 300
4 2 400
Don't confound the 'sch' variable in your data frame with the
index in your loop :)
HTH,
Dennis
On Mon, Feb 1, 2010 at 8:17 PM, David Katz <[hidden email]>wrote:
- Hide quoted
I was surprised to see this unexpected behavior of subset in a for loop. I
looked in subset.data.frame and it seemed to me that both versions should
work, since the subset call should be evaluated in the global environment -
but perhaps I don't understand environments well enough. Can someone
enli
I've been using Rterm with ESS to run R for some time. Recently I've
experienced lockups when displaying graphics; the first display seems to
work, but then refuses to respond and must be killed with dev.off(). Rgui
has no problems. I've tried eliminating all other processes that might cause
confl
I've noticed this website has been down for several days. Does anyone have
any information on whether/when it is coming back? Thanks.
--
View this message in context:
http://www.nabble.com/www.rpad.org-tp24175392p24175392.html
Sent from the R help mailing list archive at Nabble.com.
___
24079278
> 33282839 12751862 26086726 31363494 7118320 21866536 4212929
>
David Katz
www.davidkatzconsulting.com
--
View this message in context:
http://www.nabble.com/how-to-subsample-all-possible-combinations-of-n-species-taken-1%3An-at-a-time--tp22911399p22919597.html
Sent from th
nom(n,1,p)
result <- subset(result,apply(result,1,sum) > 0) #cases which have at least
1 species
result <- unique(result)[1:1000,]
Might be interesting to see the effect of varying p on the rest of your
analysis.
Further memory might be saved by using sparse matrices - see the Matrix
pa
Curiosity and Google lead me to this paper which may be of interest:
Assessing the validity of autologistic regression
Purchase the full-text article
References and further reading may be available for this article. To view
references and further reading you must purchase this article.
Carste
barplot(5000*((1-.26)^(0:49)))
jimdare wrote:
>
> Hi,
>
> I am new to R. I am trying to plot the decay of a population over time
> (0-50yrs). I have the initial population value (5000) and the mortality
> rate (0.26/yr) and I can't figure out how to apply this so I get a
> remaining populati
The example for learning tcl/tk under R at
http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/OKtoplevel.html
suggests running it from batch - but when I do, the window flashes by and
the example ends. I'm under XP pro. Is there a workaround? Should I create a
modal window instead so it persists
See ?cut for creating a factor based on ranges of values.
Regards,
Wade Wall wrote:
>
> Hi all,
>
> I am trying to convert geometric means in a matrix to cover classes. My
> values are as such:
>
> perc<-c(0,0.025136418, 0.316227766, 1.414213562,3.16227766, 7.071067812,
> 15.8113883, 35.3
The verbose option gives a display like:
> rf.500 <-
+ randomForest(new.x,trn.y,do.trace=20,ntree=100,nodesize=500,
+importance=T)
| Out-of-bag |
Tree | MSE %Var(y) |
20 | 0.9279 100.84 |
What is the meaning of %var(y)>100%? I expected that to correspon
Sometimes, for specific models, I get this error from predict.gam in library
mgcv:
Error in complete.cases(object) : negative length vectors are not allowed
Here's an example:
model.calibrate <-
gam(meansalesw ~ s(tscore,bs="cs",k=4),
data=toplot,
weights=weight,
gam.method
Trying to learn Proto. This threw me:
#startup r...
> > library(proto)
> a <- proto(x=10)
> a$x
[1] 10
> x <- proto(x=100)
> x$x
Error in get("x", env = x, inherits = TRUE) : invalid 'envir' argument
>
Do I simply need to be careful to name proto objects and proto components
uniquely? Is this t
In Dr. Wood's book on GAM, he suggests in section 4.1.6 that it might be
useful to shrink a single smooth by adding S=S+epsilon*I to the penalty
matrix S. The context was the need to be able to shrink the term to zero if
appropriate. I'd like to do this in order to shrink the coefficients towards
This is in regards to the suggested use of type="lpmatrix" in the
documentation for mgcv::predict.gam. Could one not get the same result more
simply by using type="terms" and interpolating each term directly? What is
the advantage of the lpmatrix approach for prediction outside R? Thanks.
--
View
The documentation for predict.gam in library mgcv gives an example of using
an "lpmatrix" to do approximate prediction via interpolation. However, the
code is specific to the example wrt the number of smooth terms, df's for
each,etc. (which is entirely appropriate for an example)
Has anyone gene
You need to think through the application of your model. Is it more important
to get more cases classified correctly, or to avoid "bigger" errors versus a
probability prediction? You should optimize your choice of a loss function
so that it is appropriate to the way in which the model will be used
Try:
cs <- with(txns,cumsum(cr - dr))
You could if needed adjust the starting value to zero by concatenating a
zero in front and dropping the last entry.
txns$running.bal <- c(0,cs[seq(length(cs) - 1)])
Good luck.
seanpor wrote:
>
> Good morning, I've searched high and low and I've tried m
I've had the same problem and solved it by removing the cases with the new
levels - they need to be handled some other way, either by building a new
model or reassigning the factor level to one in the training set.
Nagu wrote:
>
> Hi,
>
> I get the following error when I try to predict the pr
I would expect this regression towards the mean behavior on a new or hold out
dataset, not on the training data. In RF terminology, this means that the
model prediction from predict is the in-bag estimate, but the out-of-bag
estimate is what you want for prediction. In Joshua's example,
rf.rf$pred
Also see www.nabble.com for a very nice interface to current and archived
posts.
vince-28 wrote:
>
> I made a google group archive of current and future R-help posts at
> http://groups.google.com/group/r-help-archive
>
> If you are signed-up for the R-help mailing list with a gmail account
>
This sounds useful, but can you give more info on "forward X...". Thanks.
Scionforbai wrote:
>
> Do you need something more than a simple ssh connection to a remote
> host in which you run R (trivial when the server is Linux)?
>
> My advice is to run R in a "screen" session on the remote host
ings of tenths of a second matter? (There is also
> quantreg::kselect, if you work out how to use it, which apparently is
> a bit faster at partial sorting on MacOS X but not elsewhere.)
>
>
> On Sun, 11 Nov 2007, David Katz wrote:
>
>>
>> What is the most efficie
What is the most efficient alternative to x[order(x)][1:n] where
length(x)>>n?
I also need the positions of the mins/maxs perhaps by preserving names.
Thanks for any suggestions.
--
View this message in context:
http://www.nabble.com/Largest-N-Values-Efficiently--tf4788033.html#a13697535
Sent
35 matches
Mail list logo