Search This Blog

Wednesday, August 30, 2023

Flatland

From Wikipedia, the free encyclopedia

Flatland: A Romance of Many Dimensions
The cover to Flatland, first edition

AuthorEdwin A. Abbott
IllustratorEdwin A. Abbott
CountryEngland
GenreMathematical fiction
PublisherSeeley & Co.
Publication date
1884
Pages96
OCLC2306280
LC ClassQA699

Flatland: A Romance of Many Dimensions is a satirical novella by the English schoolmaster Edwin Abbott Abbott, first published in 1884 by Seeley & Co. of London. Written pseudonymously by "A Square", the book used the fictional two-dimensional world of Flatland to comment on the hierarchy of Victorian culture, but the novella's more enduring contribution is its examination of dimensions.

Several films have been made from the story, including the feature film Flatland (2007). Other efforts have been short or experimental films, including one narrated by Dudley Moore and the short films Flatland: The Movie (2007) and Flatland 2: Sphereland (2012).

Plot

Illustration of a simple house in Flatland.

The story describes a two-dimensional world inhabited by geometric figures; women are line segments, while men are polygons with various numbers of sides. The narrator is a square, a member of the caste of gentlemen and professionals, who guides the readers through some of the implications of life in two dimensions. The first half of the story goes through the practicalities of existing in a two-dimensional universe, as well as a history leading up to the year 1999 on the eve of the 3rd Millennium.

On New Year's Eve, the Square dreams of a visit to a one-dimensional world, "Lineland", inhabited by men, consisting of lines, while the women consisted of "lustrous points". These points and lines are unable to see the Square as anything other than a set of points on a line. Thus, the Square attempts to convince the realm's monarch of a second dimension but cannot do so. In the end, the monarch of Lineland tries to kill the Square rather than tolerate him any further.

Following this vision, the Square is visited by a sphere. Similar to the "points" in Lineland, he is unable to see the three-dimensional object as anything other than a circle (more precisely, a disk). The Sphere then levitates up and down through Flatland, allowing the Square to see the circle expand and contract between great circle and small circles. The Sphere then tries further to convince the Square of the third dimension by dimensional analogies (a point becomes a line, a line becomes a square). The Square is still unable to comprehend the third dimension, so the Sphere resorts to deeds: he gives info about the "insides" of the house, moves a cup through the third dimension, and even goes inside the Square for a bit. Still unable to comprehend 3D, the Sphere takes the Square to the third dimension, Spaceland. This Sphere visits Flatland at the turn of each millennium to introduce a new apostle to the idea of a third dimension in the hope of eventually educating the population of Flatland. From the safety of Spaceland, they can oversee the leaders of Flatland, acknowledging the Sphere's existence and prescribing the silencing. After this proclamation is made, many witnesses are massacred or imprisoned (according to caste), including the Square's brother.

After the Square's mind is opened to new dimensions, he tries to convince the Sphere of the theoretical possibility of the existence of a fourth dimension and higher spatial dimensions. Still, the Sphere returns his student to Flatland in disgrace.

The Square then has a dream in which the Sphere revisits him, this time to introduce him to a zero-dimensional space, Pointland, of whom the Point (sole inhabitant, monarch, and universe in one) perceives any communication as a thought originating in his own mind (cf. Solipsism):

"You see," said my Teacher, "how little your words have done. So far as the Monarch understands them at all, he accepts them as his own – for he cannot conceive of any other except himself – and plumes himself upon the variety of Its Thought as an instance of creative Power. Let us leave this god of Pointland to the ignorant fruition of his omnipresence and omniscience: nothing that you or I can do can rescue him from his self-satisfaction."

— the Sphere
The last sketch in the book.

The Square recognises the identity of the ignorance of the monarchs of Pointland and Lineland with his own (and the Sphere's) previous ignorance of the existence of higher dimensions. Once returned to Flatland, the Square cannot convince anyone of Spaceland's existence, especially after official decrees are announced that anyone preaching the existence of three dimensions will be imprisoned (or executed, depending on caste). For example, he tries to convince his relative of the third dimension but cannot move a square "upward," as opposed to forward or sideways. Eventually, the Square himself is imprisoned for just this reason, with only occasional contact with his brother, who is imprisoned in the same facility. He cannot convince his brother, even after all they have both seen. Seven years after being imprisoned, A Square writes out the book Flatland as a memoir, hoping to keep it as posterity for a future generation that can see beyond their two-dimensional existence.

Social elements

Men are portrayed as polygons whose social status is determined by their regularity and the number of their sides, with a Circle considered the "perfect" shape. Women are lines, quite fragile but also dangerous, as they can disappear from view and possibly stab someone. To prevent this they are required by law to sound a "peace-cry" while moving about and to use separate doors from men.

In the world of Flatland, classes are distinguished by the "Art of Hearing", the "Art of Feeling", and the "Art of Sight Recognition". Classes can be distinguished by the sound of one's voice, but the lower classes have more developed vocal organs, enabling them to feign the voice of a Polygon or even a Circle. Feeling, practised by the lower classes and women, determines the configuration of a person by feeling one of its angles. The "Art of Sight Recognition", practised by the upper classes, is aided by "Fog", which allows an observer to determine the depth of an object. With this, polygons with sharp angles relative to the observer will fade more rapidly than polygons with more gradual angles. Colour of any kind was banned in Flatland after Isosceles workers painted themselves to impersonate noble Polygons. The Square describes these events, and the ensuing class war at length.

The population of Flatland can "evolve" through the "Law of Nature", which states: "a male child shall have one more side than his father, so that each generation shall rise (as a rule) one step in the scale of development and nobility. Thus the son of a Square is a Pentagon, the son of a Pentagon, a Hexagon; and so on".

This rule is not the case when dealing with Isosceles Triangles (Soldiers and Workmen) with only two congruent sides. The smallest angle of an Isosceles Triangle gains 30 arc minutes (half a degree) each generation. Additionally, the rule does not seem to apply to many-sided Polygons. For example, the sons of several hundred-sided Polygons will often develop 50 or more sides more than their parents. Furthermore, the angle of an Isosceles Triangle or the number of sides of a (regular) Polygon may be altered during life by deeds or surgical adjustments.

An Equilateral Triangle is a member of the craftsman class. Squares and Pentagons are the "gentlemen" class, as doctors, lawyers, and other professions. Hexagons are the lowest rank of nobility, all the way up to (near) Circles, who make up the priest class. The higher-order Polygons have much less of a chance of producing sons, preventing Flatland from being overcrowded with noblemen.

Apart from Isosceles Triangles, only regular Polygons are considered until chapter seven of the book when the issue of irregularity, or physical deformity is brought up. In a two-dimensional world, a regular polygon can be identified by a single angle and/or vertex. To maintain social cohesion, irregularity is to be abhorred, with moral irregularity and criminality cited, "by some" (in the book), as inevitable additional deformities, a sentiment with which the Square concurs. If the error of deviation is above a stated amount, the irregular Polygon faces euthanasia; if below, he becomes the lowest rank of civil servant. An irregular Polygon is not destroyed at birth, but allowed to develop to see if the irregularity can be "cured" or reduced. If the deformity remains, the irregular is "painlessly and mercifully consumed."

As social satire

In Flatland, Abbott describes a society rigidly divided into classes. Social ascent is the main aspiration of its inhabitants, apparently granted to everyone but strictly controlled by the top of the hierarchy. Freedom is despised and the laws are cruel. Innovators are imprisoned or suppressed. Members of lower classes who are intellectually valuable, and potential leaders of riots, are either killed or promoted to the higher classes. Every attempt for change is considered dangerous and harmful. This world is not prepared to receive "revelations from another world". The satirical part is mainly concentrated in the first part of the book, "This World", which describes Flatland. The main points of interest are the Victorian concept of women's roles in the society and in the class-based hierarchy of men. Abbott has been accused of misogyny due to his portrayal of women in Flatland. In his Preface to the Second and Revised Edition, 1884, he answers such critics by emphasizing that the description of women was satirizing the viewpoints held, stating that the Square:

was writing as a Historian, he has identified himself (perhaps too closely) with the views generally adopted by Flatland and (as he has been informed) even by Spaceland, Historians; in whose pages (until very recent times) the destinies of Women and of the masses of mankind have seldom been deemed worthy of mention and never of careful consideration.

Critical reception

Flatland did not have much success when published, although it was not entirely ignored. In the entry on Edwin Abbott in the Dictionary of National Biography for persons who died in the period of 1922 to 1930, Flatland was not even mentioned.

The book was discovered again after Albert Einstein's general theory of relativity was published, which brought to prominence the concept of a fourth dimension. Flatland was mentioned in a letter by William Garnett entitled "Euclid, Newton and Einstein" published in Nature on 12 February 1920. In this letter, Abbott is depicted, in a sense, as a prophet due to his intuition of the importance of time to explain certain phenomena:

Some thirty or more years ago a little jeu d'esprit was written by Dr. Edwin Abbott entitled Flatland. At the time of its publication it did not attract as much attention as it deserved... If there is motion of our three-dimensional space relative to the fourth dimension, all the changes we experience and assign to the flow of time will be due simply to this movement, the whole of the future as well as the past always existing in the fourth dimension.

The Oxford Dictionary of National Biography subsequently revised his biography, and as of 2020 it states that [Abbott] "is most remembered as the author of Flatland: A Romance of Many Dimensions".

Adaptations and parodies

Numerous imitations or sequels to Flatland have been created. Examples include:

Films and TV
Literature

Books and short stories inspired by Flatland include:

In popular culture

  • Physicists and science popularizers Carl Sagan and Stephen Hawking have both commented on and postulated about the effects of Flatland. Sagan recreates the thought experiment as a set-up to discussing the possibilities of higher dimensions of the physical universe in both the book and television series Cosmos, whereas Hawking notes the peculiarity of life in two-dimensional space, as any inhabitants would necessarily be unable to digest their own food. (This concept is parodied in the below-described episode of Futurama. The protagonists attempt to eat Flatland food but it falls out immediately. The native organisms in Flatland absorb food somewhat like amoeba.)
  • The League of Extraordinary Gentlemen, Volume 2, issue 3, in chapter 3 of the series of writings New Traveller's Almanac, it is mentioned that in an unknown basement of New York, Flatland was discovered by a mathematician.
  • In the "2-D Blacktop" episode of the animated science fiction TV comedy series Futurama (season 7, episode 15, originally broadcast June 19, 2013), two spaceships moving at relativistic speeds crash head on and are compressed together into a flat disk. They meet natives of the realm, who chase after them when the concept of a third dimension is brought up.
  • In David Foster Wallace's novel Infinite Jest (1996), it is briefly mentioned that students from the Enfield Tennis Academy could be seen studying and highlighting copies of Flatland on the bus.
  • Flatland features in The Big Bang Theory episode "The Psychic Vortex", when Sheldon Cooper declares it one of his favourite imaginary places to visit.
  • On the series The Orville, episode "New Dimensions", after entering a region of two-dimensional space Captain Ed Mercer references Flatland and its theme of social hierarchy.
  • In the Sons of Anarchy episode "Straw", Clay Morrow is lounging on a cot in a private cell in county jail when he first meets retired U.S. Marshal Lee Toric. Morrow half-ignores Toric while keeping his eyes on a copy of Flatland.
  • In Gravity Falls it is implied by the main antagonist Bill Cipher that he originates from a dimension very similar to Flatland.

Support vector machine

From Wikipedia, the free encyclopedia

In machine learning, support vector machines (SVMs, also support vector networks) are supervised learning models with associated learning algorithms that analyze data for classification and regression analysis. Developed at AT&T Bell Laboratories by Vladimir Vapnik with colleagues (Boser et al., 1992, Guyon et al., 1993, Cortes and Vapnik, 1995, Vapnik et al., 1997[citation needed]) SVMs are one of the most robust prediction methods, being based on statistical learning frameworks or VC theory proposed by Vapnik (1982, 1995) and Chervonenkis (1974). Given a set of training examples, each marked as belonging to one of two categories, an SVM training algorithm builds a model that assigns new examples to one category or the other, making it a non-probabilistic binary linear classifier (although methods such as Platt scaling exist to use SVM in a probabilistic classification setting). SVM maps training examples to points in space so as to maximise the width of the gap between the two categories. New examples are then mapped into that same space and predicted to belong to a category based on which side of the gap they fall.

In addition to performing linear classification, SVMs can efficiently perform a non-linear classification using what is called the kernel trick, implicitly mapping their inputs into high-dimensional feature spaces.

The support vector clustering algorithm, created by Hava Siegelmann and Vladimir Vapnik, applies the statistics of support vectors, developed in the support vector machines algorithm, to categorize unlabeled data. These data sets require unsupervised learning approaches, which attempt to find natural clustering of the data to groups and, then, to map new data according to these clusters.

Motivation

H1 does not separate the classes. H2 does, but only with a small margin. H3 separates them with the maximal margin.

Classifying data is a common task in machine learning. Suppose some given data points each belong to one of two classes, and the goal is to decide which class a new data point will be in. In the case of support vector machines, a data point is viewed as a -dimensional vector (a list of numbers), and we want to know whether we can separate such points with a -dimensional hyperplane. This is called a linear classifier. There are many hyperplanes that might classify the data. One reasonable choice as the best hyperplane is the one that represents the largest separation, or margin, between the two classes. So we choose the hyperplane so that the distance from it to the nearest data point on each side is maximized. If such a hyperplane exists, it is known as the maximum-margin hyperplane and the linear classifier it defines is known as a maximum-margin classifier; or equivalently, the perceptron of optimal stability.

More formally, a support vector machine constructs a hyperplane or set of hyperplanes in a high or infinite-dimensional space, which can be used for classification, regression, or other tasks like outliers detection. Intuitively, a good separation is achieved by the hyperplane that has the largest distance to the nearest training-data point of any class (so-called functional margin), since in general the larger the margin, the lower the generalization error of the classifier. A lower generalization error means that the implementer is less likely to experience overfitting.

Kernel machine

Whereas the original problem may be stated in a finite-dimensional space, it often happens that the sets to discriminate are not linearly separable in that space. For this reason, it was proposed that the original finite-dimensional space be mapped into a much higher-dimensional space, presumably making the separation easier in that space. To keep the computational load reasonable, the mappings used by SVM schemes are designed to ensure that dot products of pairs of input data vectors may be computed easily in terms of the variables in the original space, by defining them in terms of a kernel function selected to suit the problem. The hyperplanes in the higher-dimensional space are defined as the set of points whose dot product with a vector in that space is constant, where such a set of vectors is an orthogonal (and thus minimal) set of vectors that defines a hyperplane. The vectors defining the hyperplanes can be chosen to be linear combinations with parameters of images of feature vectors that occur in the data base. With this choice of a hyperplane, the points in the feature space that are mapped into the hyperplane are defined by the relation Note that if becomes small as grows further away from , each term in the sum measures the degree of closeness of the test point to the corresponding data base point . In this way, the sum of kernels above can be used to measure the relative nearness of each test point to the data points originating in one or the other of the sets to be discriminated. Note the fact that the set of points mapped into any hyperplane can be quite convoluted as a result, allowing much more complex discrimination between sets that are not convex at all in the original space.

Applications

SVMs can be used to solve various real-world problems:

  • SVMs are helpful in text and hypertext categorization, as their application can significantly reduce the need for labeled training instances in both the standard inductive and transductive settings. Some methods for shallow semantic parsing are based on support vector machines.
  • Classification of images can also be performed using SVMs. Experimental results show that SVMs achieve significantly higher search accuracy than traditional query refinement schemes after just three to four rounds of relevance feedback. This is also true for image segmentation systems, including those using a modified version SVM that uses the privileged approach as suggested by Vapnik.
  • Classification of satellite data like SAR data using supervised SVM.
  • Hand-written characters can be recognized using SVM.
  • The SVM algorithm has been widely applied in the biological and other sciences. They have been used to classify proteins with up to 90% of the compounds classified correctly. Permutation tests based on SVM weights have been suggested as a mechanism for interpretation of SVM models. Support vector machine weights have also been used to interpret SVM models in the past. Posthoc interpretation of support vector machine models in order to identify features used by the model to make predictions is a relatively new area of research with special significance in the biological sciences.

History

The original SVM algorithm was invented by Vladimir N. Vapnik and Alexey Ya. Chervonenkis in 1964. In 1992, Bernhard Boser, Isabelle Guyon and Vladimir Vapnik suggested a way to create nonlinear classifiers by applying the kernel trick to maximum-margin hyperplanes. The "soft margin" incarnation, as is commonly used in software packages, was proposed by Corinna Cortes and Vapnik in 1993 and published in 1995.

Linear SVM

Maximum-margin hyperplane and margins for an SVM trained with samples from two classes. Samples on the margin are called the support vectors.

We are given a training dataset of points of the form

where the are either 1 or −1, each indicating the class to which the point belongs. Each is a -dimensional real vector. We want to find the "maximum-margin hyperplane" that divides the group of points for which from the group of points for which , which is defined so that the distance between the hyperplane and the nearest point from either group is maximized.

Any hyperplane can be written as the set of points satisfying

where is the (not necessarily normalized) normal vector to the hyperplane. This is much like Hesse normal form, except that is not necessarily a unit vector. The parameter determines the offset of the hyperplane from the origin along the normal vector .

Hard-margin

If the training data is linearly separable, we can select two parallel hyperplanes that separate the two classes of data, so that the distance between them is as large as possible. The region bounded by these two hyperplanes is called the "margin", and the maximum-margin hyperplane is the hyperplane that lies halfway between them. With a normalized or standardized dataset, these hyperplanes can be described by the equations

(anything on or above this boundary is of one class, with label 1)

and

(anything on or below this boundary is of the other class, with label −1).

Geometrically, the distance between these two hyperplanes is , so to maximize the distance between the planes we want to minimize . The distance is computed using the distance from a point to a plane equation. We also have to prevent data points from falling into the margin, we add the following constraint: for each either

or
These constraints state that each data point must lie on the correct side of the margin.

This can be rewritten as

 

 

 

 

(1)

We can put this together to get the optimization problem:

The and that solve this problem determine our classifier, where is the sign function.

An important consequence of this geometric description is that the max-margin hyperplane is completely determined by those that lie nearest to it. These are called support vectors.

Soft-margin

To extend SVM to cases in which the data are not linearly separable, the hinge loss function is helpful

Note that is the i-th target (i.e., in this case, 1 or −1), and is the i-th output.

This function is zero if the constraint in (1) is satisfied, in other words, if lies on the correct side of the margin. For data on the wrong side of the margin, the function's value is proportional to the distance from the margin.

The goal of the optimization then is to minimize

where the parameter determines the trade-off between increasing the margin size and ensuring that the lie on the correct side of the margin. By deconstructing the hinge loss, this optimization problem can be massaged into the following:

Thus, for large values of , it will behave similar to the hard-margin SVM, if the input data are linearly classifiable, but will still learn if a classification rule is viable or not. ( is inversely related to , e.g. in LIBSVM.)

Nonlinear Kernels

Kernel machine

The original maximum-margin hyperplane algorithm proposed by Vapnik in 1963 constructed a linear classifier. However, in 1992, Bernhard Boser, Isabelle Guyon and Vladimir Vapnik suggested a way to create nonlinear classifiers by applying the kernel trick (originally proposed by Aizerman et al.) to maximum-margin hyperplanes. The resulting algorithm is formally similar, except that every dot product is replaced by a nonlinear kernel function. This allows the algorithm to fit the maximum-margin hyperplane in a transformed feature space. The transformation may be nonlinear and the transformed space high-dimensional; although the classifier is a hyperplane in the transformed feature space, it may be nonlinear in the original input space.

It is noteworthy that working in a higher-dimensional feature space increases the generalization error of support vector machines, although given enough samples the algorithm still performs well.

Some common kernels include:

  • Polynomial (homogeneous): . Particularly, when , this becomes the linear kernel.
  • Polynomial (inhomogeneous): .
  • Gaussian radial basis function: for . Sometimes parametrized using .
  • Sigmoid function (Hyperbolic tangent): for some (not every) and .

The kernel is related to the transform by the equation . The value w is also in the transformed space, with . Dot products with w for classification can again be computed by the kernel trick, i.e. .

Computing the SVM classifier

Computing the (soft-margin) SVM classifier amounts to minimizing an expression of the form

 

 

 

 

(2)

We focus on the soft-margin classifier since, as noted above, choosing a sufficiently small value for yields the hard-margin classifier for linearly classifiable input data. The classical approach, which involves reducing (2) to a quadratic programming problem, is detailed below. Then, more recent approaches such as sub-gradient descent and coordinate descent will be discussed.

Primal

Minimizing (2) can be rewritten as a constrained optimization problem with a differentiable objective function in the following way.

For each we introduce a variable . Note that is the smallest nonnegative number satisfying

Thus we can rewrite the optimization problem as follows

This is called the primal problem.

Dual

By solving for the Lagrangian dual of the above problem, one obtains the simplified problem

This is called the dual problem. Since the dual maximization problem is a quadratic function of the subject to linear constraints, it is efficiently solvable by quadratic programming algorithms.

Here, the variables are defined such that

Moreover, exactly when lies on the correct side of the margin, and when lies on the margin's boundary. It follows that can be written as a linear combination of the support vectors.

The offset, , can be recovered by finding an on the margin's boundary and solving

(Note that since .)

Kernel trick

A training example of SVM with kernel given by φ((a, b)) = (a, b, a2 + b2)

Suppose now that we would like to learn a nonlinear classification rule which corresponds to a linear classification rule for the transformed data points Moreover, we are given a kernel function which satisfies .

We know the classification vector in the transformed space satisfies

where, the are obtained by solving the optimization problem

The coefficients can be solved for using quadratic programming, as before. Again, we can find some index such that , so that lies on the boundary of the margin in the transformed space, and then solve

Finally,

Modern methods

Recent algorithms for finding the SVM classifier include sub-gradient descent and coordinate descent. Both techniques have proven to offer significant advantages over the traditional approach when dealing with large, sparse datasets—sub-gradient methods are especially efficient when there are many training examples, and coordinate descent when the dimension of the feature space is high.

Sub-gradient descent

Sub-gradient descent algorithms for the SVM work directly with the expression

Note that is a convex function of and . As such, traditional gradient descent (or SGD) methods can be adapted, where instead of taking a step in the direction of the function's gradient, a step is taken in the direction of a vector selected from the function's sub-gradient. This approach has the advantage that, for certain implementations, the number of iterations does not scale with , the number of data points.

Coordinate descent

Coordinate descent algorithms for the SVM work from the dual problem

For each , iteratively, the coefficient is adjusted in the direction of . Then, the resulting vector of coefficients is projected onto the nearest vector of coefficients that satisfies the given constraints. (Typically Euclidean distances are used.) The process is then repeated until a near-optimal vector of coefficients is obtained. The resulting algorithm is extremely fast in practice, although few performance guarantees have been proven.

Empirical risk minimization

The soft-margin support vector machine described above is an example of an empirical risk minimization (ERM) algorithm for the hinge loss. Seen this way, support vector machines belong to a natural class of algorithms for statistical inference, and many of its unique features are due to the behavior of the hinge loss. This perspective can provide further insight into how and why SVMs work, and allow us to better analyze their statistical properties.

Risk minimization

In supervised learning, one is given a set of training examples with labels , and wishes to predict given . To do so one forms a hypothesis, , such that is a "good" approximation of . A "good" approximation is usually defined with the help of a loss function, , which characterizes how bad is as a prediction of . We would then like to choose a hypothesis that minimizes the expected risk:

In most cases, we don't know the joint distribution of outright. In these cases, a common strategy is to choose the hypothesis that minimizes the empirical risk:

Under certain assumptions about the sequence of random variables (for example, that they are generated by a finite Markov process), if the set of hypotheses being considered is small enough, the minimizer of the empirical risk will closely approximate the minimizer of the expected risk as grows large. This approach is called empirical risk minimization, or ERM.

Regularization and stability

In order for the minimization problem to have a well-defined solution, we have to place constraints on the set of hypotheses being considered. If is a normed space (as is the case for SVM), a particularly effective technique is to consider only those hypotheses for which . This is equivalent to imposing a regularization penalty , and solving the new optimization problem

This approach is called Tikhonov regularization.

More generally, can be some measure of the complexity of the hypothesis , so that simpler hypotheses are preferred.

SVM and the hinge loss

Recall that the (soft-margin) SVM classifier is chosen to minimize the following expression:

In light of the above discussion, we see that the SVM technique is equivalent to empirical risk minimization with Tikhonov regularization, where in this case the loss function is the hinge loss

From this perspective, SVM is closely related to other fundamental classification algorithms such as regularized least-squares and logistic regression. The difference between the three lies in the choice of loss function: regularized least-squares amounts to empirical risk minimization with the square-loss, ; logistic regression employs the log-loss,

Target functions

The difference between the hinge loss and these other loss functions is best stated in terms of target functions - the function that minimizes expected risk for a given pair of random variables .

In particular, let denote conditional on the event that . In the classification setting, we have:

The optimal classifier is therefore:

For the square-loss, the target function is the conditional expectation function, ; For the logistic loss, it's the logit function, . While both of these target functions yield the correct classifier, as , they give us more information than we need. In fact, they give us enough information to completely describe the distribution of .

On the other hand, one can check that the target function for the hinge loss is exactly . Thus, in a sufficiently rich hypothesis space—or equivalently, for an appropriately chosen kernel—the SVM classifier will converge to the simplest function (in terms of ) that correctly classifies the data. This extends the geometric interpretation of SVM—for linear classification, the empirical risk is minimized by any function whose margins lie between the support vectors, and the simplest of these is the max-margin classifier.

Properties

SVMs belong to a family of generalized linear classifiers and can be interpreted as an extension of the perceptron. They can also be considered a special case of Tikhonov regularization. A special property is that they simultaneously minimize the empirical classification error and maximize the geometric margin; hence they are also known as maximum margin classifiers.

A comparison of the SVM to other classifiers has been made by Meyer, Leisch and Hornik.

Parameter selection

The effectiveness of SVM depends on the selection of kernel, the kernel's parameters, and soft margin parameter . A common choice is a Gaussian kernel, which has a single parameter . The best combination of and is often selected by a grid search with exponentially growing sequences of and , for example, ; . Typically, each combination of parameter choices is checked using cross validation, and the parameters with best cross-validation accuracy are picked. Alternatively, recent work in Bayesian optimization can be used to select and , often requiring the evaluation of far fewer parameter combinations than grid search. The final model, which is used for testing and for classifying new data, is then trained on the whole training set using the selected parameters.

Issues

Potential drawbacks of the SVM include the following aspects:

  • Requires full labeling of input data
  • Uncalibrated class membership probabilities—SVM stems from Vapnik's theory which avoids estimating probabilities on finite data
  • The SVM is only directly applicable for two-class tasks. Therefore, algorithms that reduce the multi-class task to several binary problems have to be applied; see the multi-class SVM section.
  • Parameters of a solved model are difficult to interpret.

Extensions

Support vector clustering (SVC)

SVC is a similar method that also builds on kernel functions but is appropriate for unsupervised learning.

Multiclass SVM

Multiclass SVM aims to assign labels to instances by using support vector machines, where the labels are drawn from a finite set of several elements.

The dominant approach for doing so is to reduce the single multiclass problem into multiple binary classification problems. Common methods for such reduction include:

  • Building binary classifiers that distinguish between one of the labels and the rest (one-versus-all) or between every pair of classes (one-versus-one). Classification of new instances for the one-versus-all case is done by a winner-takes-all strategy, in which the classifier with the highest-output function assigns the class (it is important that the output functions be calibrated to produce comparable scores). For the one-versus-one approach, classification is done by a max-wins voting strategy, in which every classifier assigns the instance to one of the two classes, then the vote for the assigned class is increased by one vote, and finally the class with the most votes determines the instance classification.
  • Directed acyclic graph SVM (DAGSVM)
  • Error-correcting output codes

Crammer and Singer proposed a multiclass SVM method which casts the multiclass classification problem into a single optimization problem, rather than decomposing it into multiple binary classification problems. See also Lee, Lin and Wahba and Van den Burg and Groenen.

Transductive support vector machines

Transductive support vector machines extend SVMs in that they could also treat partially labeled data in semi-supervised learning by following the principles of transduction. Here, in addition to the training set , the learner is also given a set

of test examples to be classified. Formally, a transductive support vector machine is defined by the following primal optimization problem:

Minimize (in )

subject to (for any and any )

and

Transductive support vector machines were introduced by Vladimir N. Vapnik in 1998.

Structured SVM

SVMs have been generalized to structured SVMs, where the label space is structured and of possibly infinite size.

Regression

Support vector regression (prediction) with different thresholds ε. As ε increases, the prediction becomes less sensitive to errors.

A version of SVM for regression was proposed in 1996 by Vladimir N. Vapnik, Harris Drucker, Christopher J. C. Burges, Linda Kaufman and Alexander J. Smola. This method is called support vector regression (SVR). The model produced by support vector classification (as described above) depends only on a subset of the training data, because the cost function for building the model does not care about training points that lie beyond the margin. Analogously, the model produced by SVR depends only on a subset of the training data, because the cost function for building the model ignores any training data close to the model prediction. Another SVM version known as least-squares support vector machine (LS-SVM) has been proposed by Suykens and Vandewalle.

Training the original SVR means solving

minimize
subject to

where is a training sample with target value . The inner product plus intercept is the prediction for that sample, and is a free parameter that serves as a threshold: all predictions have to be within an range of the true predictions. Slack variables are usually added into the above to allow for errors and to allow approximation in the case the above problem is infeasible.

Bayesian SVM

In 2011 it was shown by Polson and Scott that the SVM admits a Bayesian interpretation through the technique of data augmentation. In this approach the SVM is viewed as a graphical model (where the parameters are connected via probability distributions). This extended view allows the application of Bayesian techniques to SVMs, such as flexible feature modeling, automatic hyperparameter tuning, and predictive uncertainty quantification. Recently, a scalable version of the Bayesian SVM was developed by Florian Wenzel, enabling the application of Bayesian SVMs to big data. Florian Wenzel developed two different versions, a variational inference (VI) scheme for the Bayesian kernel support vector machine (SVM) and a stochastic version (SVI) for the linear Bayesian SVM.

Implementation

The parameters of the maximum-margin hyperplane are derived by solving the optimization. There exist several specialized algorithms for quickly solving the quadratic programming (QP) problem that arises from SVMs, mostly relying on heuristics for breaking the problem down into smaller, more manageable chunks.

Another approach is to use an interior-point method that uses Newton-like iterations to find a solution of the Karush–Kuhn–Tucker conditions of the primal and dual problems. Instead of solving a sequence of broken-down problems, this approach directly solves the problem altogether. To avoid solving a linear system involving the large kernel matrix, a low-rank approximation to the matrix is often used in the kernel trick.

Another common method is Platt's sequential minimal optimization (SMO) algorithm, which breaks the problem down into 2-dimensional sub-problems that are solved analytically, eliminating the need for a numerical optimization algorithm and matrix storage. This algorithm is conceptually simple, easy to implement, generally faster, and has better scaling properties for difficult SVM problems.

The special case of linear support vector machines can be solved more efficiently by the same kind of algorithms used to optimize its close cousin, logistic regression; this class of algorithms includes sub-gradient descent (e.g., PEGASOS) and coordinate descent (e.g., LIBLINEAR). LIBLINEAR has some attractive training-time properties. Each convergence iteration takes time linear in the time taken to read the train data, and the iterations also have a Q-linear convergence property, making the algorithm extremely fast.

The general kernel SVMs can also be solved more efficiently using sub-gradient descent (e.g. P-packSVM), especially when parallelization is allowed.

Kernel SVMs are available in many machine-learning toolkits, including LIBSVM, MATLAB, SAS, SVMlight, kernlab, scikit-learn, Shogun, Weka, Shark, JKernelMachines, OpenCV and others.

Preprocessing of data (standardization) is highly recommended to enhance accuracy of classification. There are a few methods of standardization, such as min-max, normalization by decimal scaling, Z-score. Subtraction of mean and division by variance of each feature is usually used for SVM.

Delayed-choice quantum eraser

From Wikipedia, the free encyclopedia https://en.wikipedia.org/wiki/Delayed-choice_quantum_eraser A delayed-cho...