Code Monkey home page Code Monkey logo

Comments (3)

jmacglashan avatar jmacglashan commented on July 18, 2024

Yeah that makes sense; in the past it's even been an error that's caused me some temporary confusion. I'll add it soon.

from burlap.

brawner avatar brawner commented on July 18, 2024

Is there a reason why values can't be negative, except that it would interfere with your unset feature? Could you just assume that if not set, it's default value is 0?

from burlap.

jmacglashan avatar jmacglashan commented on July 18, 2024

The reason disc values are not negative is because it represents an index into a categorical list which is a list of strings that you can name (e.g., red, blue). I should note that you can have "negative" values in that your categorical values represent negative values, but the actual underling data value would still be non-negative.

I thought about defaulting the discrete value to zero, but in the past I liked it being set to -1 because it would break the code, and I found it's usually a good idea to have the code break if you didn't initialize your values.

That said, I've also considered splitting up the discrete attribute into two different possible types: discrete numeric and discrete categorical. Discrete numeric would allow negatives and discrete categorical would be like it is now. Discrete numeric would have utility in that it can be unbound in values. That said, I haven't gotten around to implementing it yet because I haven't had a strong need to do so.

from burlap.

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.