What kind of "vector" is a feature vector in machine learning?

2

1

I'm having trouble understanding the use of Vector in machine learning to represent a group of features.

If one looks up the definition of a Vector, then, according to wikipedia, a Vector is an entity with a magnitude and direction.

This can be understood when applying Vectors to for example physics to represent force, velocity, acceleration, etc...: the components of the Vector represent the components of the physical property along the axes in space. For example, the components of a velocity vector represent the velocity along the x, y and z axes

However, when applying Vectors to machine learning to represent features, then those features can be totally unrelated entities. They can have totally different units: one feature can be the length in meters of a person and another can be the age in years of the person.

But then what is the meaning of the Magnitude of such a Vector, which would then be formed by a summation of meters and years? And the Direction?

I do know about normalization of features to make them have similar ranges, but my question is more fundamental.

Serge Desmedt

Posted 2018-11-14T06:29:52.640

Reputation: 23

Answers

1

I'm having trouble understanding the use of Vector in machine learning to represent a group of features.

In short, I would say that "Features Vector" is just a convenient way to speak about a set of features.


Indeed, for each label 'y' (to be predicted), you need a set of values 'X'. And a very convenient way of representing this is to put the values in a vector, such that when you consider multiple labels, you end up with a matrix, containing one row per label and one column per feature.

In an abstract way, you can definitely think of those vectors belonging to a multiple dimensions space, but (usually) not an Euclidean one. Hence all the math apply, only the interpretation differs !

Hope that helps you.

Atani

Posted 2018-11-14T06:29:52.640

Reputation: 56

That is what sort of confuses me: "not an Euclidean one". If it is not an Euclidean, then what kind is it? Hence the title: "What kind of Vector is ...." Or am I being to specific in interpreting "Euclidean"? – Serge Desmedt – 2018-11-14T15:11:24.950

The vector representation just facilitates the processing and statistical analysis. If you are looking for an interpretation, this is not anymore a technical question and I think you just need to think in a more abstract way, as if you try to represent yourself what an n-dimensional Euclidean space is. (n>3) – Atani – 2018-11-14T15:37:36.180

0

First lets talk about how to organize your data.Lets assume you organize your in a spreadsheet, where columns represent your features and rows your different samples. Imagine you asked 3 people about their sex and age, then you get a spreadsheet with 3 rows (3 people) and 2 columns (sex, age).

Now you can interpret every row as a single feature vector. In our example case the feature vector would have 2 dimensions (sex, age). Instead of physics the (euclid.) magnitude of the feature vector might have no direct usage for us, since the dimensions come from different domains (in contrast compare a velocity vector). Nevertheless we could compute the magnitude (after normalization). On the other hand the direction of the feature vector is important, since it represents the feature values itself.

All in all feature vectors should not directly be interpreted as you do in physics.

Andreas Look

Posted 2018-11-14T06:29:52.640

Reputation: 863

0

Vectors have perspective form the point of view of Mathematics, Physics and Computer science.

I suggest you to go through Grant Sanderson's video on vectors on his channel 3BLUE1BROWN or rather go through his entire series on ESSENCE OF LINEAR ALGEBRA, for a better visual understanding of Linear Algebra.

Talking about feature vectors, they are nothing but a collection of all the features (Individial property or characteristic of a phenomenon being observed) arranged in a specific way. It is an n-dimensional vector of numerical features that represent some object that is required by the machine learning algorithms. Just go through this Wikipedia article from where I have written about feature vectors.

thanatoz

Posted 2018-11-14T06:29:52.640

Reputation: 1 913