2
1

Hi all,

I am new to machine learning stuff. I have some theoretical knowledge like classification, regression etc, neural networks and blah blah. I am plannin to model a multiclass classifier. But, before thinking about implementing, the first question arised, how to represent the features while making computation. I didn't get any idea about it.I want really understand how does classifier classify and how they are implemented. Any example,like taking a syntactically parse tree and taking different features like distance between two parse constituent would be higly appreciated. Any useful resource for making concept clear will also be higly appreciated.

asked Feb 09 '12 at 16:32

Kuri_kuri's gravatar image

Kuri_kuri
293273040


One Answer:

Numbers.

Features are usually represented as numbers, but there are several types. As a very basic introduction:

  • Occurance: 1 if a feature exists, 0 if it doesn't. Example of this type of feature is "email has a signature". If the email has a signature, the value is 1, otherwise it's 0.

  • Frequency: Count of the number of times a feature occurs. Example of this type is "number of times the letter 'e' appears". If a sentence has the letter e 5 times, the value is 5 (and so on). Often this is normalised, so that it is the percentage rather than occurance. So the letter e appearing 5 times in 100 characters would be 0.05. Look up "normalisation" to find out why.

  • Category: Each different category is given a number. An example of this is "Is the color of the ball red, green or blue?". Red might get the value 1, green gets 2 and blue gets three. The important thing here is that the difference between red and blue is the same as the distance between green and blue. If you just subtract the numbers, you don't get the true value, so you just test that two categories are equal.

That was the intro, there is much more information here, which also contains the "correct" names as used in statistics (and hence, machine learning).

Oh, and as for programming-based representation, you usually store them in a two dimensional array X such that X[i][j] is the value of the jth feature for the ith instance. (Some people put those indices around the other way, which makes things faster for some computation and slower for others. I prefer [i][j].)

answered Feb 09 '12 at 17:06

Robert%20Layton's gravatar image

Robert Layton
1625122637

edited Feb 09 '12 at 17:08

@robert, thank you very much for the clear answer. In addition to it, I would like to add some additional question here, In neural network, I have some feeding points. Why there are different feeding point for different features. Why not single feature vector representing all the features?And one more thing is,how do you train the date? do you first get all the features first or you get features for each of the training sample and evaluate it?

(Feb 09 '12 at 17:25) Kuri_kuri

It sounds like you have a non-"basic" neural network. It's not my area though, so you would be better off creating a new question (don't forget to say which neural network you are using!).

(Feb 09 '12 at 22:56) Robert Layton
Your answer
toggle preview

powered by OSQA

User submitted content is under Creative Commons: Attribution - Share Alike; Other things copyright (C) 2010, MetaOptimize LLC.