Talkademy / AI-Internship-1400

مستندات هوش مصنوعی تاکادمی
1 stars 1 forks source link

Phase01-Introduction to machine learning-Z.Dehghani #48

Open ZahraDehghani99 opened 3 years ago

ZahraDehghani99 commented 3 years ago
ZahraDehghani99 commented 3 years ago

Answer this: How Linear Regression learns?

It tries to get a coefficient for each feature. Then forms a line with these coefficients and features so that most of the data is on the line.

Answer this: what is similarity and difference of Logistic and Linear Regression?

Both of them try to find a line with coefficients. In linear regression majority of the data should be on the line but in logistic regression, data should not be on the line because the line separates the data into two classes. The difference between them is that linear regression is used to predict continuous output but logistic regression is used to predict the discrete output.

Answer this: what is the main idea of KNN?

The main idea of KNN is that every data point falling in near to each other is falling in the same class. KNN learns from the past dataset. KNN works by selecting the K closet neighbor around it and then vote for the most frequent label in classification or average of them in regression.

Answer this: is KNN good for large data? why?

No, because for large data, it becomes slower. It uses a high amount of storage because it stores all of the data and classifies or predict based on feature similarity.

Answer this: what is the main idea of SVM?

The main idea of SVM is to find a hyperplane or line to separate the data set with two boundaries for classification and find hyperplane or line for regression so that the majority of the data should be between two boundaries.

Answer this: Compare KNN and SVM

KNN is simple and has not hyperparameter for tuning but SVM has hyperparameters. KNN is slower than SVM in large datasets. SVM separates data with the hyperplane but KNN separates data based on feature similarity.

Answer this: what is the KMeans main idea?

KMeans in an unsupervised learning algorithm and based on the value of K, it makes K clusters in the dataset. At the first, it selects K random centroids then it makes clusters in a way that the distance of points in the same cluster becomes minimum and the distance of points from one cluster to another becomes maximum. In each iteration of clustering centroid of the cluster becomes the average of that cluster.

Answer this: what is similarity and difference of KMeans and KNN?

Difference: KNN is a supervised learning algorithm used for both classification and regression but KMeans is an unsupervised learning algorithm used for clustering. In KNN training points are fixed but in KMeans cluster centroids learn by updating. In KMeans data points are assigned to a single centroid but in KNN, data points are assigned to the k nearest training points.

Similarity: They both have K parameter but K in KNN means K nearest neighbor and in KMeans means the number of clusters. They both work with distance but it's different. In KMeans points with little distance are not training points and they are centroids.