4 ms·
Well I don't think any of the problems you mentioned are difficult to solve, even by a non-seasoned programmer. For your first question, just use Euclidean dis
by dylandrop 13y ago
Well I don't think any of the problems you mentioned are difficult to solve, even by a non-seasoned programmer.
For your first question, just use Euclidean distance. (In other words, sqrt((x1 - y1)^2 + (x2 - y2)^2 + ... + (xn - yn)^2). IMO, anyone who can program can do that.
Also for your second question - probably - but he's using a very simplistic model. To fix that, you simply fix the heuristic. For example, you could instead score groups by how frequently certain important words occur, like "team" and "support".
- m_ke 13y agoYou have binary features, why would you use euclidean distance?
- dylandrop 13y agoWell in this case, you can also do the normal, in other words adding the differences. The poster asked about finding the differences between points in N-dimensional space in general (he didn't specify for the author's example). But the idea is that your means wouldn't be bucketed into just a couple of values, but have a larger distribution. In any case, it doesn't matter much for this problem, but if you scored it by word count rather than a simple 1 or 0, it would matter.
- panarky 13y agoIt's not that it's hard to code, it's that a aimplistic approach will lead to questions that might not be intuitive. If you use Euclidean distance, then you essentially count 1 for each word difference. That means long posts will have longer distances from shorter posts with the same topic. If you fix that by treating "important" words differently, then you have to figure out importance, and then normalize by number of terms, etc. Before you know it you're building a naive Bayes classifier. Again, the challenge isn't in the coding, it's in understanding the limitations of the more simplistic design.