HN user

jackbard

7 karma
Posts0
Comments4
View on HN
No posts found.

http://www.codeproject.com/KB/cs/BayesClassifier.aspx

This is a simple one built in C#/.Net. I fixed a significant bug and raised classification accuracy from 74% -> 96% in my noisy dataset (automobile accident claims). I emailed the author with a bunch of improvements (such as histograms) and some other tweaks but never heard back. Anyway, the bugfix is simple: take a look at category.cs. In TeachPhrase(), move m_TotalWords++ inside the test for "if (!m_Phrases.TryGetValue(phrase, out pc))".

What you want here is to count the # of unique words. The original code was counting the total # of times all words appear.This one change reduced classification errors by 3X.

Cheers, --Jack

derefr, Unfortunately, you are either jealous and letting that affect your judgment or you completely fail to understand that there are real-world reasons to own a Mac. I bought a Mac because I wanted a system that is designed rather than evolved, comes with software I actually want to use (iMovie, Garageband, iPhoto), is secure, and not a target for viruses/spyware, and can occasionally play my Windows video games and host my Windows development environment.

The reason I switched my mom, inlaws, brother and sister to Macs is because I got damned sick and tired of being their IT Helpdesk every other weekend -- diagnosing problems, rebuilding machines infected with spyware & viruses, installing patches and fixes, etc. I've got better things to do with my life such as making original content (music & video) with the computer. However, some people just enjoy farting around with settings. That's not me.

Those commercials appeal to me: a 40-year-old guy wearing $17 Wrangler jeans and a t-shirt from Target. You know why? Because they bring out the defensive XP fanboys such as yourself. We laugh at the commercials, then we laugh at you. Now run along. Don't you have some patches to install or something to update?

--Jack

Mac backup: Last day of the month I run Carbon Copy Cloner to backup everything to a 500GB firewire external drive. (firewire, so that I can boot OSX from that image, if need be.)

PC Backup: I dumped my PCs 18 months ago when I bought my Intel-chip Mac. Now both my "PCs" (XP development machine and Win2k3 Web Server) are running as virtual machines on my Mac, so my Windows install is actually just one big file used by Parallels which is backed up as part of the Mac backup.

--Jack