Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is vector in terms of machine learning

I want to understand what is a vector in terms of machine learning.

I looked into the below 2 links:

https://en.wikipedia.org/wiki/Support_vector_machine https://en.wikipedia.org/wiki/Feature_vector.

I couldn't understand it fully. Can someone explain this in simple words?

like image 650
subho Avatar asked Jul 14 '16 16:07

subho


People also ask

What is vectors in machine learning?

In machine learning, feature vectors are used to represent numeric or symbolic characteristics, called features, of an object in a mathematical, easily analyzable way. They are important for many different areas of machine learning and pattern processing.

What does vector mean in data science?

In Data Science, vectors are used to represent numeric characteristics, called features, of an object in a mathematical and easily analyzable way. Vectors are essential for many different areas of machine learning and pattern processing.

Which is the definition of a vector?

Definition of vector (Entry 1 of 2) 1a : a quantity that has magnitude and direction and that is commonly represented by a directed line segment whose length represents the magnitude and whose orientation in space represents the direction broadly : an element of a vector space.

What is a vector algorithm?

The Distance vector algorithm is iterative, asynchronous and distributed. Distributed: It is distributed in that each node receives information from one or more of its directly attached neighbors, performs calculation and then distributes the result back to its neighbors.


Video Answer


2 Answers

I would think that much of your problem comes because vector is a general term with many uses. In this case, think of it as a list of values or a row in a table. The data structure is a 1-dimensional array; a vector of N elements is an N-dimensional vector, one dimension for each element.

For instance, the input (3.14159, 2.71828, 1.618) is a vector of 3 elements, and could be represented as a point in 3-dimensional space. Your program would declare a 1x3 array (one-dimensional data structure) to hold the three items.

Does this help you visualize the basic input handling? This is not a difficult problem with a Wronkskian transformation matrix -- it's just a change in format and visualization.


The feature vector is simply one row of input. For instance, in the popular machine learning example of housing price prediction, we might have features (table columns) including a house's year of construction, number of bedrooms, area (m^2), and size of garage (auto capacity). This would give input vectors such as

[1988, 4, 200, 2]
[2001, 3, 220, 1]

etc.

like image 65
Prune Avatar answered Oct 06 '22 23:10

Prune


A scalar value will only have a magnitude but not direction.

For example,

  • Mark of a student in examination
  • Salary of a employee
  • Temperature of a city etc.

A vector value will have both magnitude and direction.

For example,

  • Velocity of a vehicle
  • Current density of an electric flow
  • Magnetic field of a coin etc.

In machine learning when we have multiple independent variables to predict a dependent variable, we usually represent all independent variables in a multidimensional space.

For example,

Let’s consider a ML problem in which we have to predict the mark of a student in final examinations using the following independent variables-

  • Attendance percentage
  • Number of failed subjects in internal examinations
  • Number of assignments completed

Here, we need to project all those data points of students in a multidimensional space where-

Dimension 1- Attendance percentage

Dimension 2 - Number of failed subjects in internal examinations

Dimension 3 - Number of assignments completed

It will somewhat look like this-

enter image description here

Now, each independent variable can be represented as a vector with respect to dependent variable.

Like,

“Attendance” vector will have a magnitude and positive direction with respect to mark in examination (mark in the final examination will increase if attendance also increases and mark will decrease if attendance decreases).

“Number of failed subjects in internal examinations” vector will have a magnitude and negative direction with respect to mark in examination (mark in the final examination will increase if the number of failed subjects in internal examinations decreases and mark will decrease if number of failed subjects in internal examinations increases).

Now, if we have a new student for whom we need to predict his marks then we can represent his data in these 3 vectors and the point in which the 3 vectors having an orthogonal relationship can be considered as his/her predicted mark in the final examination.

Data point representation in 1 dimensional vector space-

enter image description here

Data point representation in 2 dimensional vector space-

enter image description here

Data point representation in 3 dimensional vector space-

enter image description here

Hope you got an idea !!!

like image 30
Sanjay Nandakumar Avatar answered Oct 06 '22 23:10

Sanjay Nandakumar