Skip to content

variable selection, stepwise regression #1809

Open

Activity

  1. josef-pkt commented on Apr 24, 2015

    @josef-pkt
    MemberAuthor

    Thanks @ajschumacher
    The nice thing about using formulas for this is that it keeps factors/categorical columns together.
    The disadvantage is that this will be slow for larger cases since it doesn't exploit any possible computational shortcuts.

  2. ajschumacher commented on Apr 24, 2015

    @ajschumacher
  3. DanielTParry commented on May 30, 2018

    @DanielTParry

    Thinking about trying this as a project. Are there any specific requirements to this?

  4. josef-pkt commented on May 30, 2018

    @josef-pkt
    MemberAuthor

    I just merged something similar in #4683, but it doesn't handle categorical variables properly.

    I think something like ajschumachers approach using formulas would be a good complement to 4683.
    One requirement would be to make the model class optional, so it works also for other models like GLM and discrete models.
    Another requirement would be to make the evaluation criterion optional, e.g. AIC, BIC or other measures.

    I just started again to work on score_test for variable addition, which could be used together with wald test for dropping variables. This is not available yet (at least not nicely outside of linear models), but it would be good if it's not very difficult to swap in other criteria to add or delete variables.

  5. josef-pkt commented on Oct 27, 2019

    @josef-pkt
    MemberAuthor

    finally found the script for an experiment again
    "\josef\eclipsegworkspace\statsmodels-git\local_scripts\local_scripts\try_tree.py"
    Created on Mon Sep 15 14:29:37 2014

    best subset of exog, when we don't have many exog.
    (e.g. we have 10 exog variables and want to include 4)
    AFAIR, we compute a shortened tree of all subset, this should find the best subset, not depending on the search path as in stepwise regression

    part of docstring:


    All possible subset by dropping leading case

    this is the regression tree for all subset regressions with
    dropping columns in QR.

    References

    Smith and Bremner
    several articles by Gatu and Kontoghiorghes and co-authors
    R has Leaps and Bounds based on Furnival and Wilson 1974

    Sung-Soo Kim for an alternatve LDLinv column deletion
    this was the article I based the tree on, but the tree is older

    Gatu and Kontoghiorghes have a iterative list implementation instead
    of the recursive structure that I have here.
    One practical question is what is the storage requirement to keep copies
    to continue in the branches.

  6. josef-pkt commented on Nov 22, 2019

    @josef-pkt
    MemberAuthor

    #4813 cross link to PR with backwards elimination

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions