Giter Club home page Giter Club logo

Comments (7)

szcf-weiya avatar szcf-weiya commented on June 11, 2024

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.
PNG image
PNG image

from esl-cn.

szcf-weiya avatar szcf-weiya commented on June 11, 2024

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.

szcf-weiya avatar szcf-weiya commented on June 11, 2024

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.

szcf-weiya avatar szcf-weiya commented on June 11, 2024

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
image
image
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.