Hacker News new | past | comments | ask | show | jobs | submit login

OP here, I used "adding to class" because I had assumed people would only use a single probability space at a time, and it would shorten the syntax since you didn't need to instantiate the space.

However, it's possible to make an instance of Ps and use the same interface. But I'd need to change a method or two around to support it. It wouldn't be a hard change. Do you envision using more than one separate probability spaces at once?

As for the docs, lemme know in an issue or PR what's too hard to follow. I tried to make it clear, but I welcome other eyes on it.

As for mathematics, perhaps Naive Bayes is a good place to start? http://suanpalm3.kmutnb.ac.th/teacher/FileDL/choochart822554...

Naive Bayes Classifier is an example of something expressed all in probabilities. I only implemented a decision tree learner using Prolly, but am planning to implement more things using it in the near future.




I would definitely rather instantiate and build that way. I can dream up some examples where I might want to work with more than one type of probability. It would be good design to facilitate that, for sure.

I'm not up on the actual functionality - any reason you couldn't just work with an arbitrary collection of objects? Would be nice to make an AR query and wrap it in a Prolly object and work that way.

So, I'm pondering. When/where would I want to rely on probabilities instead of raw data? Everything I come up with seems like it would just work better with actual data values than deriving probabilities. But, that might just be my mathematical ignorance at play.

Cool gem, thanks for creating!


Sure, I'll change it around to have the option to use instantiated PSpace.

As for relying on probabilities, check out Naive Bayes. Hidden Markov Models also rely on probabilities, rather than raw counts.

Thanks for the feedback!


You could do what I’ve done with MIME::Types, which is make the class-level methods work against an instance. Most people use MIME::Types as the class-level methods, but it is possible to instantiate and use it otherwise.


By "work against an instance", do you mean that you instantiate the instance in the class-level methods? So at most, the class-level methods are just wrappers around the instance methods, emulating a singleton?


Yes. Sorry I didn’t see this earlier, but that’s exactly it.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: