Skip to content
English

Switch theme

Math & Machine Learning Foundations

Linear Models, Support Vector Machines and Nearest Neighbours: The Perceptron, Margins, the Kernel Trick and kNN

Intermediate 40 min For: Developers / Researchers

Key takeaways

  • ▸The perceptron updates its weights when a training point is misclassified and, if the training set is linearly separable, reaches a separating hyperplane in a finite number of steps. If the data are not linearly separable, the procedure does not settle on a separator, so implementations impose a limit on the number of iterations. On a linearly separable two-dimensional toy set in this lesson, Perceptron reached training accuracy 1.0 in 11 iterations; on concentric circles the training accuracy was 0.50.
  • ▸Ridge adds an ℓ₂ penalty on the coefficients to squared error, shrinking them and reducing sensitivity to collinearity. Lasso uses an ℓ₁ penalty, which can set some coefficients exactly to zero and thereby select features. The role of regularisation is discussed in the lesson on overfitting and generalisation. On the same handwritten-digit split, L2 logistic regression had 40 zero coefficients (from four constant pixels) and L1 logistic regression had 281.
  • ▸A support vector machine finds a separating hyperplane with the largest margin; the decision function depends only on the support vectors. When the data are not strictly linearly separable, the soft-margin formulation uses slack variables and a penalty C to allow some points to lie inside the margin or to be misclassified. Smaller C means stronger regularisation and a smoother decision surface.
  • ▸The kernel trick evaluates inner products in a feature space through a kernel, without forming the feature map explicitly. The RBF kernel is exp(−γ‖x−x′‖²). If γ is too large, the region of influence of a support vector shrinks to the vector itself, and regularisation through C cannot prevent overfitting. On standardised digits, the default γ='scale' (about 0.01667) had test accuracy 0.9861; at γ=1 the training accuracy was 1.0000 and the test accuracy fell to 0.1222.
  • ▸k-nearest neighbours assigns a query the majority label among its k closest training points. Training mostly stores the data; prediction computes distances. Cover and Hart (1967) proved that, in the large-sample limit, the error of the nearest-neighbour rule is at most twice the Bayes error. On the same split, a linear-kernel SVM, an RBF-kernel SVM and 5-NN had test accuracies 0.9778, 0.9861 and 0.9806; mean prediction times for the 360 test points were 2.425 ms, 10.632 ms and 87.119 ms.

Overview. Linear models score examples with a hyperplane; nearest-neighbour methods query the training set directly. This lesson proceeds from the perceptron and linear separability, through Ridge and Lasso regularisation, maximum-margin and soft-margin support vector machines, the kernel trick, naive Bayes, and k-nearest neighbours and vector search, to a comparison on handwritten digits. Every experimental figure comes from the runnable example at the end of the lesson, run with scikit-learn 1.9.1, NumPy 2.5.4 and Python 3.13.5, with random seed 0.

The lesson belongs to the unit Linear Models, SVM and Nearest Neighbours. Recommended preparation is Overfitting, Generalisation and Data Splits and Linear Algebra for AI, together with the discussion of losses and parameter updates in How Machines Learn: Loss Functions and Gradient Descent. Related algorithm cards: Perceptron, Support Vector Machine, k-Nearest Neighbors, Regularised Regression (Lasso / Ridge) and Naive Bayes.

The perceptron and linear separability

Rosenblatt (1958) published the perceptron in Psychological Review: a weighted sum of features is compared with a threshold to make a binary decision, an early model of an artificial neuron. The error-driven update taught today can be described as follows. If the current parameters misclassify a training point, that point’s feature vector is added to (or subtracted from) the weight vector, moving the decision surface in a direction that corrects the mistake.

If the training data are linearly separable—if some hyperplane places the two classes on opposite sides—this update finds a separating hyperplane in a finite number of steps. If the data are not linearly separable, the updates do not settle on a separator, which is why scikit-learn’s Perceptron imposes a stopping condition such as max_iter. In this lesson, make_classification was used to draw 40 two-dimensional points with a large class separation (random_state=0); Perceptron reached training accuracy 1.0 in 11 iterations. make_circles was then used to draw 200 noisy concentric circles (noise=0.08, factor=0.4, random_state=0). On that training set the perceptron had accuracy 0.50, a linear-kernel SVM had accuracy 0.62, and an RBF-kernel SVM had accuracy 1.00. These last figures are training accuracies on a toy set, with no held-out split; they illustrate that a linear surface cannot cut two nested classes apart, whereas a kernel method can separate them in a feature space.

The perceptron’s separator need not be the one that stays as far as possible from both classes. The next section reviews regularisation in linear models, and the following section turns to support vector machines, which take the maximum margin as their objective.

Linear models, Lasso and Ridge

Linear regression minimises the residual sum of squares. When features are collinear, or when the number of features is comparable to the number of samples, ordinary least-squares coefficients can become large and sensitive to perturbations. The lesson on overfitting, generalisation and data splits treats regularisation as a family of devices that limit a model’s effective complexity and reduce variance.

Ridge regression, introduced by Hoerl and Kennard (1970)—title and authors verified via Crossref on the day this lesson was written, DOI 10.1080/00401706.1970.10488634; the publisher’s page returned HTTP 403 to automated requests, so the formula below follows the scikit-learn user guide—adds an ℓ₂ penalty on the coefficients to squared error:

[\min_{w}\ |Xw-y|_2^2 + \alpha |w|_2^2.]

The complexity parameter (\alpha \ge 0) controls the amount of shrinkage: larger (\alpha) pulls the coefficients towards zero and makes them more robust to collinearity. An ℓ₂ penalty shrinks coefficients but does not, in general, set them exactly to zero.

The Lasso (least absolute shrinkage and selection operator), proposed by Tibshirani (1996), replaces that penalty with the sum of absolute values. The author’s page defines the method as minimising the usual sum of squared errors subject to a bound on the sum of the absolute values of the coefficients. The equivalent objective in scikit-learn is

[\min_{w}\ \frac{1}{2n}|Xw-y|_2^2 + \alpha |w|_1.]

The user guide states that the Lasso can set some coefficients exactly to zero, so that the solution depends on fewer features and performs feature selection. Coordinate descent is one standard algorithm; an official example plots the coefficient path as (\alpha) varies.

The same ℓ₁ and ℓ₂ penalties can be added to linear classifiers such as logistic regression. On the standardised digits split used later in this lesson, LogisticRegression was run as a supplementary comparison (not the required unit project): with an L2 penalty the test accuracy was 0.9667 and 40 of the 640 coefficients were zero, matching the four constant pixels in this training split (indices 0, 24, 32 and 39) times ten classes; with an L1 penalty (solver='saga', C=1.0) the test accuracy was 0.9694 and the number of zero coefficients rose to 281. On the same split, RidgeClassifier had test accuracy 0.9361 and Perceptron had test accuracy 0.9306.

The strength of regularisation is itself a hyperparameter and should be chosen with a validation set or with cross-validation, as discussed in the generalisation lesson. A linear model still produces a single global hyperplane. Choosing the widest such plane, in the sense of the margin, is the subject of support vector machines.

Margins, support vectors and soft-margin SVMs

The scikit-learn user guide describes a support vector machine (SVM) as constructing a hyperplane, or a set of hyperplanes, in a feature space so that the distance to the nearest training points of any class—the margin—is as large as possible. A larger margin is associated with a lower generalisation error. Training points that lie on the margin boundaries are called support vectors; when the problem is not strictly linearly separable, the support vectors also include points that lie inside the margin.

Cortes and Vapnik (1995), in Support-vector networks, formulated the soft-margin SVM that allows training errors, and used kernel functions in that setting. The primal problem solved by SVC in scikit-learn is

[ \min_{w,b,\zeta}\ \frac{1}{2}w^\top w + C\sum_{i=1}^{n}\zeta_i \quad\text{s.t.}\quad y_i\bigl(w^\top\phi(x_i)+b\bigr)\ge 1-\zeta_i,\ \zeta_i\ge 0. ]

The first term minimises (|w|^2) and is equivalent to maximising the margin. The slack variables (\zeta_i) allow a point to lie on the wrong side of its margin boundary, or to be misclassified. The penalty (C) weights that cost and acts as an inverse regularisation parameter: smaller (C) means stronger regularisation and a smoother decision surface; larger (C) pushes the model towards classifying every training point correctly. The guide notes that the default (C=1) is a reasonable starting point, and that (C) should be decreased when the observations are noisy.

In the dual, the decision function is

[ \sum_{i\in\mathrm{SV}} y_i\alpha_i K(x_i,x)+b, ]

a sum only over the support vectors; the remaining dual coefficients are zero. The decision boundary is therefore determined by the support vectors, not by every training point equally.

For a problem with (K) classes, SVC uses a one-versus-one strategy and trains (K(K-1)/2) binary classifiers. Handwritten digits have ten classes, so this produces 45 binary SVMs. The guide also stresses that SVM algorithms are not scale invariant: each feature should be scaled to a comparable range, and the transformation estimated on the training set must be applied to the test set, typically by wrapping StandardScaler and SVC in a Pipeline. scikit-learn’s SVC calls LIBSVM (Chang and Lin) internally.

Boser, Guyon and Vapnik (1992) published A training algorithm for optimal margin classifiers at COLT (title, authors and year verified via Crossref, DOI 10.1145/130385.130401; the ACM page returned HTTP 403 to automated requests on the day this lesson was written). The 1995 soft-margin paper is the primary source cited here.

The kernel trick

If the two classes cannot be separated by a hyperplane in the input space, the points can be mapped into a higher-dimensional feature space and separated linearly there. The kernel trick applies whenever an algorithm depends on the data only through inner products: a kernel (K(x,x')=\langle\phi(x),\phi(x')\rangle) evaluates those inner products without forming (\phi(x)) explicitly. The kernels provided by scikit-learn include:

  • the linear kernel (K(x,x')=\langle x,x'\rangle);
  • the polynomial kernel (K(x,x')=(\gamma\langle x,x'\rangle+r)^d);
  • the radial basis function (RBF) kernel (K(x,x')=\exp(-\gamma|x-x'|^2)), with (\gamma>0);
  • the sigmoid kernel (K(x,x')=\tanh(\gamma\langle x,x'\rangle+r)).

The RBF kernel is the nonlinear kernel most often used in practice. The guide states that (\gamma) controls how far the influence of a single training example reaches: the larger (\gamma), the closer another point must be in order to be affected. (C) and (\gamma) should be chosen together, commonly with a grid of values spaced on a logarithmic scale. The official example RBF SVM parameters adds that if (\gamma) is too large, the radius of the area of influence of the support vectors includes only the support vector itself, and no amount of regularisation with (C) will prevent overfitting; if (\gamma) is very small, the model is too constrained and behaves like a linear model whose hyperplanes separate the high-density centres of each pair of classes.

This lesson fixed (C=1) on the standardised digits and varied (\gamma). The default gamma='scale' equals (1/(n_{\text{features}}\cdot\mathrm{Var}(X))) in scikit-learn; on this standardised training set that value is (0.01666\ldots), because four constant features leave the overall variance at 0.9375 rather than 1.

γ Training accuracy Test accuracy Support vectors
0.001 0.9610 0.9417 1127
0.01 0.9937 0.9806 713
scale (≈0.01667) 0.9951 0.9861 710
0.1 1.0000 0.9389 1194
1.0 1.0000 0.1222 1437
10 1.0000 0.1028 1437

At γ=1 and γ=10 the training accuracy is 1.0000, but the test accuracy falls to 0.1222 and 0.1028, and every one of the 1,437 training points is a support vector: the model is in effect memorising the training set and is close to guessing at random on unseen points (uniform guessing among ten classes has accuracy 0.1). That matches the official example’s account of overfitting when γ is too large. The default gamma='scale' had the highest test accuracy on this split (0.9861).

When naive Bayes is appropriate

Naive Bayes applies Bayes’ theorem to the class posterior, together with the “naive” assumption that the features are conditionally independent given the class. This yields

[ \hat y=\arg\max_y\ P(y)\prod_{i=1}^{n}P(x_i\mid y). ]

The variants differ mainly in the family used for (P(x_i\mid y)): GaussianNB assumes a Gaussian distribution for each continuous feature in each class, MultinomialNB is intended for count features such as term frequencies or TF-IDF, and BernoulliNB is intended for binary features. The scikit-learn user guide notes that, despite the plainly over-simplified assumption, naive Bayes has worked well in many real applications, famously document classification and spam filtering. It needs relatively little data to estimate its parameters, and because each class-conditional distribution can be estimated as a one-dimensional distribution, training and prediction are fast and the method helps to alleviate difficulties that come with high dimension. The same guide warns that naive Bayes is a decent classifier but a poor probability estimator, so predict_proba should not be treated as a calibrated probability.

Domingos and Pazzani (1997) published On the Optimality of the Simple Bayesian Classifier under Zero-One Loss (title, authors and year verified via Crossref; the author PDF and the journal page returned HTTP 200). The paper addresses optimality of the simple Bayesian classifier under zero-one loss; this lesson does not restate intermediate theorems that were not checked line by line in a machine-readable abstract.

Naive Bayes is a good fit when the features can reasonably be modelled separately given the class, especially bag-of-words or n-gram counts. Images whose neighbouring pixels are strongly dependent are not a typical setting for Gaussian naive Bayes. On the same standardised digits split, GaussianNB had training accuracy 0.8135 and test accuracy 0.7750, below the SVMs and kNN reported below. For text, see the official 20 Newsgroups document-classification example.

k-nearest neighbours, distance, dimension and vector search

k-nearest neighbours (kNN) is a non-parametric method: a query (x) is assigned the majority label among the (k) closest training points. Euclidean distance is the default; scikit-learn also allows votes to be weighted by the inverse of the distance. The user guide notes that, despite its simplicity, nearest neighbours has been successful on tasks including handwritten digits and satellite scenes, and is often effective when the decision boundary is highly irregular.

Cover and Hart (1967) analysed the nearest-neighbour rule (the case (k=1)). The abstract of the author PDF states that the rule does not depend on the underlying joint distribution of the points and their labels, so its error (R) cannot be smaller than the Bayes error (R^*); in a large-sample analysis, for any number of classes, the error of the nearest-neighbour rule is bounded above by twice the Bayes probability of error. The paper also points to earlier work by Fix and Hodges on a rule of the (k)-nearest-neighbour type. The bound is a large-sample theoretical result; it should not be read as a claim that the error on the 360 test points in this lesson is already twice the Bayes error.

kNN has almost no training stage apart from storing the data, optionally in a KD-tree or a ball tree. Prediction must compute distances to many training points, or search those trees. As the dimension grows, distances become less discriminative; the guide also mentions the “curse of dimensionality” when discussing radius-neighbour rules in high-dimensional parameter spaces. For moderate sample sizes and moderate dimension, brute force, a KD-tree or a ball tree is usually enough. When the objects are large collections of vectors, such as embeddings, an approximate nearest neighbour (ANN) index is used instead. The Faiss library (Douze et al., arXiv:2401.08281) is a toolkit for vector similarity search: it indexes, clusters, compresses and transforms vectors in the setting of a vector database. That is the same nearest-neighbour idea at a different scale, not a drop-in replacement for scikit-learn’s KNeighborsClassifier.

A reproducible comparison on handwritten digits

The unit project is to classify handwritten digits with a linear-kernel SVM, an RBF-kernel SVM and kNN, and to compare accuracy and prediction speed. This lesson uses scikit-learn’s load_digits: 1,797 greyscale 8×8 images of digits, pixel values from 0 to 16, 64 features and 10 classes. The split is train_test_split(..., test_size=0.2, random_state=0, stratify=y), giving 1,437 training points and 360 test points. A StandardScaler is fitted on the training set (zero mean, unit variance) and the same transformation is applied to the test set. The classifiers and their hyperparameters are:

  • SVC(kernel='linear', C=1.0, random_state=0)
  • SVC(kernel='rbf', C=1.0, gamma='scale', random_state=0)
  • KNeighborsClassifier(n_neighbors=5, algorithm='auto', n_jobs=1)

Prediction time is the mean of 100 calls to predict on all 360 test points, after five warm-up calls. The software is scikit-learn 1.9.1, NumPy 2.5.4 and Python 3.13.5. Wall-clock times depend on the machine; accuracies should be reproducible with the same seed and the same software versions.

Model Training accuracy Test accuracy Mean prediction time Support vectors
Linear-kernel SVM 1.0000 (1,437/1,437) 0.9778 (352/360) 2.425 ms 437
RBF-kernel SVM 0.9951 (1,430/1,437) 0.9861 (355/360) 10.632 ms 710
kNN (k=5) 0.9847 (1,415/1,437) 0.9806 (353/360) 87.119 ms —

On this split the RBF kernel has the highest test accuracy (0.9861), then kNN (0.9806), then the linear kernel (0.9778). For prediction, the linear kernel is the fastest; the RBF kernel takes about 4.4 times as long (10.632/2.425), and kNN about 35.9 times as long (87.119/2.425). The mean of five fits was 0.49 ms for kNN, 15.66 ms for the linear-kernel SVM and 26.77 ms for the RBF-kernel SVM, consistent with nearest-neighbour methods deferring almost all of the computation until prediction. Without standardisation, the test accuracies were 0.9722, 0.9833 and 0.9778, all slightly lower than after scaling, which agrees with the advice that SVMs are sensitive to feature scale and that distance-based methods are affected by the units of each coordinate.

These figures correspond only to the hyperparameters and the split above. They should not be read as “an RBF kernel is always more accurate than a linear kernel” or “kNN is always slower”. A different data set, or a different (C), (\gamma) or (k), can change the ranking. In an application, hyperparameters should be chosen on a validation set, and an independent test set should be used only once.

Runnable example

import time
import numpy as np
from sklearn.datasets import load_digits
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier
from sklearn.preprocessing import StandardScaler
from sklearn.svm import SVC

digits = load_digits()
X_tr, X_te, y_tr, y_te = train_test_split(
    digits.data, digits.target, test_size=0.2, random_state=0, stratify=digits.target
)
scaler = StandardScaler()
X_tr = scaler.fit_transform(X_tr)
X_te = scaler.transform(X_te)

models = {
    "linear": SVC(kernel="linear", C=1.0, random_state=0),
    "rbf": SVC(kernel="rbf", C=1.0, gamma="scale", random_state=0),
    "knn": KNeighborsClassifier(n_neighbors=5, algorithm="auto", n_jobs=1),
}
for name, clf in models.items():
    clf.fit(X_tr, y_tr)
    train_acc = (clf.predict(X_tr) == y_tr).mean()
    test_acc = (clf.predict(X_te) == y_te).mean()
    for _ in range(5):
        clf.predict(X_te)
    times = []
    for _ in range(100):
        t0 = time.perf_counter()
        clf.predict(X_te)
        times.append(time.perf_counter() - t0)
    n_sv = int(clf.n_support_.sum()) if hasattr(clf, "n_support_") else None
    print(name, "train", round(train_acc, 4), "test", round(test_acc, 4),
          "pred_ms", round(np.mean(times) * 1000, 3), "n_sv", n_sv)

for gamma in [0.001, 0.01, "scale", 0.1, 1.0, 10.0]:
    clf = SVC(kernel="rbf", C=1.0, gamma=gamma, random_state=0).fit(X_tr, y_tr)
    print("gamma", gamma, "train", round((clf.predict(X_tr) == y_tr).mean(), 4),
          "test", round((clf.predict(X_te) == y_te).mean(), 4),
          "n_sv", int(clf.n_support_.sum()))

The measured figures of interest are: linear kernel, test accuracy 0.9778, prediction 2.425 ms, 437 support vectors; RBF kernel (gamma='scale'), test accuracy 0.9861, prediction 10.632 ms, 710 support vectors; kNN, test accuracy 0.9806, prediction 87.119 ms. At γ=1 the training accuracy was 1.0000, the test accuracy 0.1222 and the number of support vectors 1,437. Prediction times vary with the machine; the accuracies should be reproducible.

Exercises

  1. Unit project. Classify handwritten digits with SVMs (linear and RBF kernels) and with kNN, and compare accuracy and prediction speed. You may reuse the load_digits split and the standardisation in this lesson, or vary C, gamma or n_neighbors and select them on a validation set. Fix the random seed and record the software versions and every hyperparameter.
  2. Run the official scikit-learn examples on SVM kernels, nearest-neighbours classification and the Lasso coordinate-descent path, from the example gallery. Change the kernel parameters, (k) or (\alpha), and watch how the decision surface or the coefficient path changes. The example on RBF values of C and gamma is also useful.
  3. From the ISLP Python resources page, or directly from the official repository ISLP_labs (stable branch), complete the Python labs in the chapters on linear models, regularisation, support vector machines and nearest neighbours.

Suggested reading order

Start with Ridge and Lasso in the scikit-learn guide to linear models and with the regularisation section of Overfitting, Generalisation and Data Splits. Then read the practical advice, the RBF parameters and the mathematical formulation in the support vector machines guide. For neighbours and retrieval, read the nearest-neighbours guide and the abstract of Cover and Hart (1967); for large-scale vector search continue to the Faiss repository and Douze et al. (arXiv:2401.08281). A statistical-learning narrative is given in the free textbook An Introduction to Statistical Learning and in the CS229 notes. Implementation details are in LIBSVM. From here one can continue to Trees and Ensembles or Unsupervised Learning: Clustering, Dimensionality Reduction and EM in the same stage.

FAQ

Which training points determine an SVM’s decision boundary?

The support vectors: the training points that lie on the margin boundary or inside the margin. Dual coefficients are zero for the remaining points, so the decision function is a sum over support vectors only. On the standardised digits split in this lesson, the linear-kernel SVM had 437 support vectors and the RBF-kernel SVM (γ='scale') had 710.

What are the training and prediction costs of kNN, and how did prediction times compare in this lesson?

Training is little more than storing the samples (the mean of five fits in this lesson was about 0.49 ms). Prediction must compute distances to the training set, or query a KD-tree or ball-tree index. Over 100 repeats on the 360 test points, mean prediction time was 2.425 ms for the linear-kernel SVM, 10.632 ms for the RBF-kernel SVM, and 87.119 ms for 5-NN.

What happens if the RBF kernel’s gamma is too large?

The official scikit-learn example on RBF parameters states that if γ is too large, the radius of influence of each support vector includes only the vector itself, and no amount of regularisation with C will prevent overfitting. In this lesson, γ=1 gave training accuracy 1.0000 and test accuracy 0.1222, with 1437 support vectors (the entire training set); at γ=10 the test accuracy was 0.1028, close to the 0.1 accuracy of uniform guessing among ten classes.

How do the Ridge and Lasso penalties differ, and why can Lasso select features?

Ridge minimises ‖Xw−y‖₂²+α‖w‖₂², shrinking coefficients towards zero but generally not setting them exactly to zero. Lasso replaces the penalty with α‖w‖₁, which can drive some coefficients to zero and yield a sparse solution. On the same split, L2 logistic regression had 40 zero coefficients (four constant pixels times ten classes) and L1 logistic regression had 281.

What is the “naive” assumption in naive Bayes, and when is the method still useful?

Conditional independence of the features given the class. The assumption is rarely true, but naive Bayes remains common for document classification and spam filtering, because each class-conditional distribution can be estimated separately and both training and prediction are fast. On standardised digits in this lesson, GaussianNB had test accuracy 0.7750, below the SVMs and kNN: neighbouring pixels are not independent, and a product of univariate Gaussians is a poor model of an image.

Sources & further reading

  1. scikit-learn user guide: 1.4 Support Vector Machines (margins, support vectors, soft margin, kernels, C and scaling)
  2. scikit-learn example: RBF SVM parameters (C and gamma)
  3. scikit-learn example: SVM kernels and decision boundaries
  4. scikit-learn user guide: 1.1 Linear Models (Ridge, Lasso)
  5. scikit-learn example: Lasso path using coordinate descent
  6. scikit-learn API: Perceptron
  7. scikit-learn user guide: 1.9 Naive Bayes
  8. scikit-learn user guide: 1.6 Nearest Neighbors
  9. scikit-learn example: nearest-neighbours classification
  10. scikit-learn example gallery
  11. scikit-learn API: load_digits
  12. scikit-learn API: StandardScaler
  13. scikit-learn API: SVC
  14. scikit-learn API: KNeighborsClassifier
  15. Cortes and Vapnik (1995), Support-vector networks, Machine Learning (DOI 10.1007/BF00994018)
  16. Cover and Hart (1967), Nearest neighbor pattern classification, IEEE Transactions on Information Theory (author PDF, Stanford ISL)
  17. Rosenblatt (1958), The perceptron: A probabilistic model for information storage and organization in the brain., Psychological Review (DOI 10.1037/h0042519)
  18. Tibshirani, The Lasso Page (author page, citing the 1996 JRSS-B paper)
  19. Domingos and Pazzani (1997), On the Optimality of the Simple Bayesian Classifier under Zero-One Loss, Machine Learning (author PDF)
  20. Domingos and Pazzani (1997), Machine Learning journal page (DOI 10.1023/A:1007413511361)
  21. Douze et al., The Faiss library, arXiv:2401.08281
  22. facebookresearch/faiss (official repository)
  23. LIBSVM home page (Chang and Lin)
  24. cjlin1/libsvm (official LIBSVM GitHub repository)
  25. Stanford CS229 Machine Learning
  26. Stanford CS229 course notes (PDF)
  27. An Introduction to Statistical Learning (ISLP, free textbook)
  28. ISLP official Python resources and labs
  29. intro-stat-learning/ISLP_labs (official Python lab repository, stable branch)

Part of these paths

Data updated: Learn AI curriculum · Lesson news(UTC+8)