Machine Learning
"More it gets, more it learns"
Machine Learning is designing algorithms, on behalf of given data to enhance the probability of getting optimal solutions.
These algorithms are generally selflearning algorithms.
Let's take an example of a child : When a child is taught
during his growth then that teaching part of his life
is machine learning.
Artificial Intelligence
“The only limit to AI is human imagination.”
It is the response of implementing machine learning algorithms, which mimics human brain in intelligence.
Let's take an example of a child: At the various stages of his life when he becomes selfdependent and starts taking his own decisions by his observations that decision making part of his life is AI.
KNearest Neighbors

KNearest Neighbors is an algorithm of Supervised Learning.

In KNearest Neighbors, you need the labeled data that you want to classify.

Here K represents the number of least distances with which you can compare your random point to include it the matching classified clusters.

KNN needs labeled points.
KMeans Clustering

Kmeans clustering is an algorithm of Unsupervised Learning.

This algorithm takes unlabeled points and learns that how can the points be form into different clusters by computing the mean of the distance between different points.

A threshold is also required.

Kmeans clustering needs only a collection of unlabeled points.