Displaying 20 results from an estimated 2000 matches similar to: "New package "earth""
2011 Mar 14
0
selection of hinge function with restrictions, machine learning, earth package,
On 2011-01-27 14:22, Rasti Matus wrote:
> I have a few questions regarding machine learning packages in R,
> e.g. earth package ...
>
> 1) How could I force the algorithm to generate knots only with
> values < 90 for variable doy?
Not possible in the current implementation. In principle it
would be possible to extend earth so the user-defined "allowed"
function
2024 Jul 16
2
Automatic Knot selection in Piecewise linear splines
>>>>> Anupam Tyagi
>>>>> on Tue, 9 Jul 2024 16:16:43 +0530 writes:
> How can I do automatic knot selection while fitting piecewise linear
> splines to two variables x and y? Which package to use to do it simply? I
> also want to visualize the splines (and the scatter plot) with a graph.
> Anupam
NB: linear splines, i.e. piecewise
2024 Jul 26
1
Automatic Knot selection in Piecewise linear splines
dear all,
I apologize for my delay in replying you. Here my contribution, maybe
just for completeness:
Similar to "earth", "segmented" also fits piecewise linear relationships
with the number of breakpoints being selected by the AIC or BIC
(recommended).
#code (example and code from Martin Maechler previous email)
library(segmented)
o<-selgmented(y, ~x, Kmax=20,
2011 Jan 27
0
selection of hinge function with restrictions, machine learning, earth package,
Hi,
I have a few questions regarding machine learning packages in R, e.g.
earth package
and its forward pass and prunning pass, and hinge functions selection in the
example below.
1) How could I force the algorithm to generate knots in hinge function only
with values < 90 for e.g. variable doy?
2) Is it possible to restrict the algorithm to generate maximum number of
terms per a selected
2011 Jul 21
1
Error: bad index in plotmo functions for MARS model (package earth)
Hello all useRs,
I am tring make a simple surface plot ( 2 by 2 terms of a MARS model
(with earth package)
but I get the follow error message:
> plotmo( mars )
Error: bad index (missing column in x?)
I don't no how to workround this... :-(
I thanks in advanced by some help!
Thanks.
Cleber
###############
>
> ### example code:
> library( earth )
> data( gasoline,
2015 Jun 26
1
[R-pkg-devel] Guidelines for S3 regression models
Stephen,
thanks for your effort. The more appropriate list for this discussion is
probably R-devel (as far as I understand it) so I've moved the discussion
there.
Related topics have already been discussed in the past. Specifically, I
remember contributions by Paul Johnson ("rockchalk" package) and John Fox
("effects" and "car" package) as their packages
2011 Sep 14
1
substitute games with randomForest::partialPlot
I'm having trouble calling randomForest::partialPlot programmatically.
It tries to use name of the (R) variable as the data column name.
Example:
library(randomForest)
iris.rf <- randomForest(Species ~ ., data=iris, importance=TRUE, proximity=TRUE)
partialPlot(iris.rf, iris, Sepal.Width) # works
partialPlot(iris.rf, iris, "Sepal.Width") # works
(function(var.name)
2009 May 16
5
bagged importance estimates in earth problem
I was trying to produced bagged importance estimates of attributes in earth using the caret package with the following commands:
fit2 <- bagEarth(loyalty ~ ., data=model1, B = 10)
bagImpGCV <- varImp(fit2,value="gcv")
My bootstrap estimates are produced however the second command "varImp" produces the following error:
Error in UseMethod("varImp") : no
2024 Jul 09
1
Automatic Knot selection in Piecewise linear splines
How can I do automatic knot selection while fitting piecewise linear
splines to two variables x and y? Which package to use to do it simply? I
also want to visualize the splines (and the scatter plot) with a graph.
Anupam
[[alternative HTML version deleted]]
2008 Oct 25
1
0 ^ NaN == Inf, why?
In R, 0 ^ NaN yields Inf. I would have expected NaN or perhaps 0. Is this
behaviour intended?
>sessionInfo()
R version 2.8.0 (2008-10-20)
i386-pc-mingw32
locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils
2008 Oct 25
1
R echoes integer literals incorrectly, under certain conditions (PR#13204)
Full_Name: Stephen Milborrow
Version: R 2.8.0
OS: Windows XP
Submission from: (NULL) (81.159.65.46)
Under certain conditions, R 2.8.0 incorrectly echoes integer literals without
the "L" suffix. R 2.7.2 is ok.
To reproduce, create two files as follows:
a.R containing: source("b.R", echo=TRUE)
b.R containing: x <- 1L
Now execute: Rterm --vanilla --silent <a.R
This
2008 Jun 12
1
Problems with mars in R in the case of nonlinear functions
Hi,
I'm trying to use mars function in R to interpolate nonlinear
multivariate functions.
However, it seems that mars gives me a fit which uses only very few
basis function and
it underfits very badly.
For example, I have tried the following code to test mars:
require("mda")
f <- function(x,y) { x^2-y^2 };
#f <- function(x,y) { x+2*y };
# Grid
x <-
2011 Apr 14
0
Postscript can be very slow in R 2.13-0
Viewing certain postscript files under R 2.13-0 is very slow, at least using
GSview on my 64 bit Windows 7 system. To see this, compare how long it
takes to display these two files (fast.ps was created by removing the /srgb
stuff in .ps.prolog):
www.milbo.org/postscript/slow.ps
www.milbo.org/postscript/fast.ps
The code to produce the above two files is here:
2011 Jul 29
3
help with plot.rpart
? data=read.table("http://statcourse.com/research/boston.csv", , sep=",",
header = TRUE)
? library(rpart)
? fit=rpart (MV~ CRIM+ZN+INDUS+CHAS+NOX+RM+AGE+DIS+RAD+TAX+ PT+B+LSTAT)
Please: Show me the tree.
Mark
-------- Original Message --------
Subject: Re: [R] help with rpart
From: "Stephen Milborrow" <[1]milbo at sonic.net>
2008 Jan 16
0
Just-in-time compiler for R
Greetings R developers!
I have been working on a just-in-time compiler for R arithmetic expressions.
An example:
jit(1) # turn on just-in-time compilation
for(i in 1:na) # example convolution code
for(j in 1:nb)
ab[i + j] <- ab[i + j] + a[i] * b[j]
The loop will run about 30% faster. That's not much of a speedup, but the
code
2008 Oct 25
0
R echoes integer literals incorrectly, under certain conditions (PR#13205)
On 25/10/2008 10:45 AM, milbo at sonic.net wrote:
> Full_Name: Stephen Milborrow
> Version: R 2.8.0
> OS: Windows XP
> Submission from: (NULL) (81.159.65.46)
>
>
> Under certain conditions, R 2.8.0 incorrectly echoes integer literals without
> the "L" suffix. R 2.7.2 is ok.
>
> To reproduce, create two files as follows:
> a.R containing:
2013 Nov 08
2
Earth (MARS) package with categorical predictors
It appears to be legitimate to include multi-level categorical and continuous variables in defining the model for earth (e.g. y ~ cat + cont1 + cont2) but is it also then possible use categoricals in the predict method using the earth result? I tried but it returns an error which is not very informative.
Thanks
Chris
2010 Jun 29
1
Model validation and penalization with rms package
I?ve been using Frank Harrell?s rms package to do bootstrap model
validation. Is it the case that the optimum penalization may still
give a model which is substantially overfitted?
I calculated corrected R^2, optimism in R^2, and corrected slope for
various penalties for a simple example:
x1 <- rnorm(45)
x2 <- rnorm(45)
x3 <- rnorm(45)
y <- x1 + 2*x2 + rnorm(45,0,3)
ols0 <- ols(y
2006 Feb 19
2
possible rails -> postgresql bug
Hi I have a problem accessing an array field in a Postgresql database.
Here is the table definition.
View "neil.flashing_codes"
Column | Type | Modifiers
-------------+-----------------------+-----------
code | character varying(10) |
description | text |
folds | integer[] |
View definition:
SELECT
2017 Aug 16
1
Bias-corrected percentile confidence intervals
Hi folks,
I'm trying to estimate bias-corrected percentile (BCP) confidence
intervals on a vector from a simple for loop used for resampling. I am
attempting to follow steps in Manly, B. 1998. Randomization, bootstrap
and monte carlo methods in biology. 2nd edition., p. 48. PDF of the
approach/steps should be available here:
https://wyocoopunit.box.com/s/9vm4vgmbx5h7um809bvg6u7wr392v6i9
If