Skip to content

TST/REF: collection of artificial datasets for testing #4612

Open

Description

@josef-pkt

We should collect somewhere a list of functions to create artificial, simulated datasets for the unit tests.

We have our datasets that are used in many unit tests, and we use random generated datasets in other unit tests. However, we don't have a central location for these artificial datasets.

Related: for nonparametric and semi-parametric (spline, polynomial) fitting we also have nonlinear functions to generate artificial datasets. (I thought there was an open issue for those from many years ago, but don't find it.)

The advantage of artificial datasets in contrast to real datasets is that artificial datasets are "nice" for specific problems because we can control the data generating process. Our real datasets are often good for detecting problems in "not-nice" cases, but are also often not fast to estimate.

The current pattern is often to copy-paste the setup.py of a test class to create the model, which is extra work but could have the advantage of fine tuning the created datase.
Kerby and thequackdaddy used a collection of GLM models in the unit test for testing equivalence across models or model options.

Right now I need something for handling many models for generic_methods, fit_penalized, fit_regularized, fit_colinear, ...
E.g. GLM-Binomial count model has been neglected in many generic tests. Start98 dataset used in the GLM test is not very good for testing penalized, two many exog, all are significant in unpenalized model.

Activity

  1. added this to the 0.10 milestone on May 8, 2018
  2. josef-pkt commented on Dec 12, 2020

    @josef-pkt
    MemberAuthor

    Related:
    artificial dataset saved to csv file for unit tests against R and Stata

    Problem is that most of our datasets that we use e.g. for Poisson and count models, are not very close to Poisson.
    This is not very important for unit tests for parameter estimation and basic inference.

    For diagnostics #7166 I would like to use unit tests that are "nice" and not hugely misspecified and more nobs than the historical "toy" datasets.

    I thought we already saved some simulated datasets for unit tests but I don't find any in the test.results folders.

  3. josef-pkt commented on Dec 12, 2020

    @josef-pkt
    MemberAuthor

    there are some datasets in

    • stats.test.results wspec{i}.csv added for white specification test in ENH: White spec test (clean commit for PR 4721) #5602, continuous endog DV, I guess gaussian
    • genmod.test.results has simulated poisson and binomial/logit for enet generated with genmod/tests/results/elastic_net_generate_tests.py no seed specified
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions