Comments (7)
The following calculation assumes R_m
is fixed, but I think it should not be fixed (see the following first several sentences). However, I failed to obtain a closed form when treating R_m
depends on y
.
from esl-cn.
binary greedy partition (without pruning)
for simplicity, I wrote a no-pruning version from scratch,
julia> includet("df_regtree.jl")
julia> [rep_calc_df(maxdepth=i) for i=0:4]
5-element Vector{Tuple{Float64, Float64}}:
(1.080629443872466, 0.041187110826985264)
(9.996914473623567, 0.11093327184178654)
(21.34913882167176, 0.14589493792386243)
(34.57260013395476, 0.2469943540268895)
(47.90389232392168, 0.31056757408950914)
the number of terminal nodes M
equal to 2^i
, it can be shown that the empirical df is much larger than M
except for M=1
.
from esl-cn.
call tree::prune.tree
to return a tree with the given number of terminal nodes, I call tree::prune.tree
, which has an argument best
to specify the number of terminal nodes, but note that there might be situations that the specified best
cannot be achieved, as mentioned in ?prune.tree
If there is no tree in the sequence of the requested size, the next largest is returned.
In my experiments, I indeed found such cases.
> source("df_regtree.R")
> mean(replicate(10, calc_df(m=1)))
[1] 1.137945
> mean(replicate(10, calc_df(m=5)))
[1] 32.18979
> mean(replicate(10, calc_df(m=10)))
[1] 50.46288
Again, the estimated dfs are much larger than m
, except for m=1
.
from esl-cn.
similar experiments in Ye (1998)
Ye, J. (1998). On Measuring and Correcting the Effects of Data Mining and Model Selection. Journal of the American Statistical Association, 93(441), 120–131. https://doi.org/10.2307/2669609
It also shows that the estimated (generalized) df are much larger than m
.
And a close result is reported if I set m=19
in my code
> mean(replicate(10, calc_df(m=19)))
[1] 60.31616
from esl-cn.
Related Issues (20)
- Ex. 18.16 HOT 1
- Phoneme Data
- Ex. 6.8 HOT 1
- Ex. derive natural spline bases from B-spline bases HOT 2
- unclickable nav in the header
- Ex. 9.6 HOT 6
- broken gravatar for mainland China HOT 1
- disappeared avatar on the n-th (n>=2) level in phones from mainland China
- workflow for Rmd notes
- ok
- Fig. 18.1 HOT 5
- Ex 8.1 HOT 1
- Ex. 2.2
- Chapter 1.1 - Website URL of ESL is unavailable HOT 1
- Fig. 8.6 and Tab. 8.2: Example for EM HOT 2
- 请问一下,链接是不是失效了呀?那个网址esl.hohoweiya.xyz进不去了 HOT 2
- Ex. 3.7 HOT 1
- Fig. 14.29 HOT 1
- Fig. 14.30 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esl-cn.