Code Monkey home page Code Monkey logo

Comments (7)

SeBecker avatar SeBecker commented on May 29, 2024

The package is now able to work with binary variables. You just have to add 'binary' behind the coefficient value of your choice in the init file (the simulation process will ignore binary statements if you write them behind the intercept coefficients) .
The random init file generating process chooses for each variable except the intercept whether the variable is binary with a certain probability (0.1).
When you generate a random init file the process adds the type of the variable (binary or nonbinary) behind each coefficient value even if it is not necessary for the following simulation process. I thought that it looks less messy, but this is just a matter of taste.
Let me know what you think of it.

from grmpy.

peisenha avatar peisenha commented on May 29, 2024

Thank you for the update, please incorporate the following:

  • Please extend the code so we are able to specify the fraction of ones in the initialization file, so for example binary,0.1 for roughly 10% ones, etc ...
  • Please randomize whether the nonbinary value is printed in the initialization file... We want to capture the fact that the default values are processed correctly as well

I also edited the issue description to include a definition of done. I want to try to do that from now on in every issue ...

from grmpy.

SeBecker avatar SeBecker commented on May 29, 2024

I updated all processes. You can insert the fraction of your choice as a float value behind the binary specification (without a comma). If no fraction value is defined, the simulation process draws a random number from a uniform distribution between 0 and 1. I also added a feature in unit_test test5 that checks if the 'types' in the generated dictionary and the imported dictionary are the same. Furthermore I randomized the printing process of the nonbinary value, such that the process prints it with a probability of 0.5.
Why do we have to update the regression battery? It works fine even with the changes.

from grmpy.

peisenha avatar peisenha commented on May 29, 2024

Thanks, great! Please update the regression test battery because it does not include any test cases with binary covariates or the more involved structure of the initialiuation file. But as you note, as the more flexible version of the grmpy still nests the one when we generated the last regression vault, first check that all the previous ones still pass and then update the vault. No need to update PyPi for now ...

from grmpy.

SeBecker avatar SeBecker commented on May 29, 2024

Ah okay, you want that i generate a new json file. I was confused because I thought that you referred to the draft.py file.

from grmpy.

peisenha avatar peisenha commented on May 29, 2024

from grmpy.

peisenha avatar peisenha commented on May 29, 2024

What remains to be done here?

from grmpy.

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.