Skip to content
This repository has been archived by the owner on Oct 29, 2020. It is now read-only.

Package usage comments #64

Open
j1c opened this issue Nov 13, 2018 · 2 comments
Open

Package usage comments #64

j1c opened this issue Nov 13, 2018 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@j1c
Copy link
Member

j1c commented Nov 13, 2018

Just some thoughts after using the package for a bit now:

  • It would be great to have the actual functions in the docstrings for simulations. For example, Function for generating a linear simulation. for linear_sim isn't really useful. You can have the formulation for w vector so that I don't have to look up the actual paper to see the functions.
    • Also allow for custom seeds for simulations.
  • (suggestion) it would be great if you followed the sklearn model for writing classes.
    • For example, have the instantiation of the class only deal with the parameters. Currently, instantiating MGC requires the input data, which to me doesn't make much sense.
      • consider using None as default parameter for compute_distance_matrix parameter for MGC.
    • Using a fit function to be the default function name for doing the computation. There are test_statstic and p_value function, and I wasn't sure which one to run at first. Having a fit function eliminates ambiguity.
    • it would be great if you stored the results as class attributes. There was a time when I ran MGC for like an hour and forgot to store the results to a variable, and I had to run it again.
  • consider updating __init__.py files for convenience in importing things. For example, i have to type in from mgcpy.independence_tests.mgc.mgc import MGC. It would be nice to do from mgcpy import MGC or something along those lines.
@junhaobearxiong junhaobearxiong self-assigned this Nov 26, 2018
@sampan501 sampan501 self-assigned this Nov 26, 2018
@tpsatish95 tpsatish95 self-assigned this Nov 26, 2018
@junhaobearxiong
Copy link
Collaborator

junhaobearxiong commented Nov 28, 2018

  • more helpful input error checking
  • mgc and dcorr should use the same dist_transform function

@sampan501
Copy link
Member

  • (suggestion) it would be great if you followed the sklearn model for writing classes.

    • For example, have the instantiation of the class only deal with the parameters. Currently, instantiating MGC requires the input data, which to me doesn't make much sense.

      • consider using None as default parameter for compute_distance_matrix parameter for MGC.

Done

  • consider updating __init__.py files for convenience in importing things. For example, i have to type in from mgcpy.independence_tests.mgc.mgc import MGC. It would be nice to do from mgcpy import MGC or something along those lines.

Tried this but had issues with relative imports when using cython

@sampan501 sampan501 added the enhancement New feature or request label May 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants