Live data from Hacker News

Twss.js

github.com

31–40 of 55 posts

Re: Twss.js

#32
post #17

DanielRapp: in file twss.js/lib/classifier/knn.js , number of NN should be odd to prevent ties [EDIT: also, NN should be large enough to prevent over-fitting; small NN would mean that the difference (decision boundary) between twss and not-twss is highly non-linear; you need to implement cross-validation to find best NN] Note to self: machine learning using node.js; what's the speed of calculations, what's the memory…

Thanks. I did do a simple analysis[1] and changed it[2] to 5 neighbors. Though when I look at the graph now, I see that 4 is actually the optimal value..

Swedish graph (täckning = recall): http://cl.ly/BJRa/pr.png

[1] https://github.com/DanielRapp/twss.js/blob/master/lib/analyz...

[2] https://github.com/DanielRapp/twss.js/commit/3cfcda785583084...

Re: Twss.js

#33
post #17

DanielRapp: in file twss.js/lib/classifier/knn.js , number of NN should be odd to prevent ties [EDIT: also, NN should be large enough to prevent over-fitting; small NN would mean that the difference (decision boundary) between twss and not-twss is highly non-linear; you need to implement cross-validation to find best NN] Note to self: machine learning using node.js; what's the speed of calculations, what's the memory…

Thanks. I did do a simple analysis[1] and changed it[2] to 5 neighbors. Though when I look at the graph now, I see that 4 is actually the optimal value.. Swedish graph (täckning = recall): http://cl.ly/BJRa/pr.png [1] https://github.com/DanielRapp/twss.js/blob/master/lib/analyz... [2] https://github.com/DanielRapp/twss.js/commit/3cfcda785583084...

Why don't you try 10-fold CV (http://en.wikipedia.org/wiki/Cross-validation_%28statistics%...) - the graph might drastically change. Here is example how to do it: https://onlinecourses.science.psu.edu/stat857/book/export/ht...

If precision & recall monotonically go down when increasing NN then it means you don't have enough training data.

Re: Twss.js

#35
post #5

Now I'm just waiting for someone to make a Twitter bot that randomly samples tweets and responds to them with this...

There's this, too.

http://yepthatswhatshesaid.com

It randomly samples tweets for training, but it doesn't write back automatically. If you find one you like on the site, though, you can tweet it.

Re: Twss.js

#36
I think your negative sample set is a little biased. Since all the phrases start with verbs like "was in the car" or "went to the park", these kinds of phrases are given lower probabilities.

For example:

    > twss.prob("was on a stiff pole");
    0.016050826334564946
Only 1.6% chance of that's what she said?!?

EDIT: Counter example:

    > twss.prob("that's one stiff pole");
    0.9767718880285885

Re: Twss.js

#39
post #5

Now I'm just waiting for someone to make a Twitter bot that randomly samples tweets and responds to them with this...

There's this, too. http://yepthatswhatshesaid.com It randomly samples tweets for training, but it doesn't write back automatically. If you find one you like on the site, though, you can tweet it.

Would interest me much more if you open sourced it, are you already decided on not doing so?

edit: I see you do actually have it at https://github.com/mattspitz/yepthatswhatshesaid - is it up to date? Thanks for sharing!

Post reply on HN