
























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

























Ikhlaq Sidhu Chief Scientist & Founding Director, Sutardja Center for Entrepreneurship & Technology IEOR Emerging Area Professor Award, UC Berkeley About Me:
X Course Overview
X
12/19/2016 How to choose machine learning algorithms | Microsoft Docs https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-choice 9/ Logistic regression Data with a linear trend Although it confusingly includes 'regression' in the name, logistic regression is actually a powerful tool for two-class and multiclass classification. It's fast and simple. The fact that it uses an 'S'-shaped curve instead of a straight line makes it a natural fit for dividing data into groups. Logistic regression gives linear class boundaries, so when you use it, make sure a linear approximation is something you can live with. https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-choice
Flavors of machine learning Supervised
To download and print a diagram that gives an overview of the capabilities Studio, see Overview diagram of Azure Machine Learning Studio capabilitie
Illustration Source: #Setting Linear Regression in sklearn from sklearn import linear_model model= linear_model.LinearRegression() model.fit(X_train, Y_train) Y_pred_train = model.predict(X_train) Y_pred_test = model.predict(X_test)
error.
X
X train Y train X test Y test X Non Labeled Y? Common Issue: Do you have enough data to train and then test? Small training set - >? All training data - >? How to use the data efficiently?
X X Y
X
X
Passenger List with ticket / cabin information Data in Pandas Table Format Clean Data Format for ML Models Run Many ML Models to predict Survival Passenger List (^) Cleaned and Formatted
X
Model Score Random Forest 86. Decision Tree 86. KNN 84. Support Vector Machines 83. Logistic Regression 80. Linear SVC 79. Perceptron 78. Naive Bayes 72. Stochastic Gradient Decent 72. More Accuracy Generally more training time More risk of overfitting Less Accuracy Generally less computation
X
12/19/2016 How to choose machine learning algorithms | Microsoft Docs Trees, forests, and jungles A logistic regression to two-class data with just one feature - the class boundary is the point at which the logistic curve is just as close to both classes Decision forests (regression, two-class, and multiclass), decision jungles (two-class and multiclass), and boosted decision trees (regression and two-class) are all based on decision trees, a foundational machine learning concept. There are many variants of decision trees, but they all do the same thing—subdivide the feature space into regions with mostly the same label. These can be regions of consistent category or of constant value, depending on whether you are doing classification or regression. https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-choice
Flavors of machine learning Supervised
To download and print a diagram that gives an overview of the capabilities Studio, see Overview diagram of Azure Machine Learning Studio capabilitie
Illustration Source: from sklearn.linear_model import LogisticRegression
logreg = LogisticRegression() logreg.fit(X_train, Y_train) #option for weights Y_pred = logreg.predict(X_test) #no options
acc_log = round(logreg.score(X_train, Y_train) * 100, 2) acc_log
X
12/19/2016 How to choose machine learning algorithms | Microsoft Docs https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-choice 14/ SVMs The two-class averaged perceptron is neural networks' answer to skyrocketing training times. It uses a network structure that gives linear class boundaries. It is almost primitive by today's standards, but it has a long history of working robustly and is small enough to learn quickly. Support vector machines (SVMs) find the boundary that separates classes by as wide a margin as possible. When the two classes can't be clearly separated, the algorithms find the best boundary they can. As written in Azure Machine Learning, the two-class SVM does this with a straight line only. (In SVM-speak, it uses a linear kernel.) Because it makes this linear approximation, it is able to run fairly quickly. Where it really shines is with feature-intense data, like text or genomic. In these cases SVMs are able to separate classes more quickly and with less overfitting than most other algorithms, in addition to requiring only a modest amount of memory. A typical support vector machine class boundary maximizes the margin separating two classes + Options https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-choice
Flavors of machine learning Supervised
To download and print a diagram that gives an overview of the capabili Studio, see Overview diagram of Azure Machine Learning Studio capabi
Illustration Source:
X
12/19/2016 How to choose machine learning algorithms | Microsoft Docs https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-choice 14/ SVMs The two-class averaged perceptron is neural networks' answer to skyrocketing training times. It uses a network structure that gives linear class boundaries. It is almost primitive by today's standards, but it has a long history of working robustly and is small enough to learn quickly. Support vector machines (SVMs) find the boundary that separates classes by as wide a margin as possible. When the two classes can't be clearly separated, the algorithms find the best boundary they can. As written in Azure Machine Learning, the two-class SVM does this with a straight line only. (In SVM-speak, it uses a linear kernel.) Because it makes this linear approximation, it is able to run fairly quickly. Where it really shines is with feature-intense data, like text or genomic. In these cases SVMs are able to separate classes more quickly and with less overfitting than most other algorithms, in addition to requiring only a modest amount of memory. A typical support vector machine class boundary maximizes the margin separating two classes + Options https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-choice
Flavors of machine learning Supervised
To download and print a diagram that gives an overview of the capabili Studio, see Overview diagram of Azure Machine Learning Studio capabi
Illustration Source:
X
12/19/2016 How to choose machine learning algorithms | Microsoft Docs https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-choice 14/ SVMs The two-class averaged perceptron is neural networks' answer to skyrocketing training times. It uses a network structure that gives linear class boundaries. It is almost primitive by today's standards, but it has a long history of working robustly and is small enough to learn quickly. Support vector machines (SVMs) find the boundary that separates classes by as wide a margin as possible. When the two classes can't be clearly separated, the algorithms find the best boundary they can. As written in Azure Machine Learning, the two-class SVM does this with a straight line only. (In SVM-speak, it uses a linear kernel.) Because it makes this linear approximation, it is able to run fairly quickly. Where it really shines is with feature-intense data, like text or genomic. In these cases SVMs are able to separate classes more quickly and with less overfitting than most other algorithms, in addition to requiring only a modest amount of memory. A typical support vector machine class boundary maximizes the margin separating two classes + Options https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-choice
Flavors of machine learning Supervised
To download and print a diagram that gives an overview of the capabilities Studio, see Overview diagram of Azure Machine Learning Studio capabilitie
Illustration Source: from sklearn.svm import SVC, LinearSVC svc = SVC() svc.fit(X_train, Y_train) Y_pred = svc.predict(X_test)
acc_svc = round(svc.score(X_train, Y_train) * 100, 2) acc_svc
X
images and have them vote on the label (i.e. take the mode) ?
X
https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-choice
Flavors of machine learning Supervised
To download and print a diagram that gives an overview of th Studio, see Overview diagram of Azure Machine Learning Stu
KNN Method: Find the k nearest images and have them vote on the label (i.e. take the mode) Example of k - NN classification. The test sample (green circle) should be classified either to the first class of blue squares or to the second class of red triangles. If k = 3 (solid line circle) it is assigned to the second class because there are 2 triangles and only 1 square inside the inner circle. If k = 5 (dashed line circle) it is assigned to the first class (3 squares vs. 2 triangles inside the outer circle). - Wikipedia ?