Giter Club home page Giter Club logo

Comments (6)

slwu89 avatar slwu89 commented on September 18, 2024 1

Cool =] So it was a good idea to check.

Yeah I mostly wanted it so I can do something like this to get marginal counts, or something more elegant to get the cross tabulation table of counts. I see now how it originally came across as being similar to #47

render_multiple_categorical_variables <- function(renderer, ...) {
  vars <- match.call(expand.dots = FALSE)$`...`
   function(t) {
    for( v in vars) {
       for (c in v$get_categories()) {
          renderer$render(paste0(v,"_",c, '_count'), v$get_size_of(c), t)
       }
    }
  }
}

from individual.

giovannic avatar giovannic commented on September 18, 2024

This feels quite related to #47

Is it a duplicate?

Deffo needed

from individual.

slwu89 avatar slwu89 commented on September 18, 2024

Ah, even more simple, just adding a value to CategoricalVariable that stores the unique categories (passed as argument categories in the constructor).

from individual.

giovannic avatar giovannic commented on September 18, 2024

Ah ok, but then how do we initialise individuals who have more than one category?

from individual.

slwu89 avatar slwu89 commented on September 18, 2024

Oh, this isn't touching issue #47. This one would be as simple as adding a line like:

self$.categories <- categories

to CategoricalVariable$initialize. I just opened an issue for it because I was wanted to make sure this doesn't go against some design philosophy I'm not aware of. It's probably superfluous to have opened an entire issue for such a small change...

from individual.

giovannic avatar giovannic commented on September 18, 2024

Oh I seeeee!

Yes that would be useful.

self$.categories <- categories

would not be DRY.

A bitset_get_categories function that gets the categories from the C++ class is the principled way to do it

from individual.

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.