K q-flats

Last updated

In data mining and machine learning, kq-flats algorithm [1] [2] is an iterative method which aims to partition m observations into k clusters where each cluster is close to a q-flat, where q is a given integer.

Contents

It is a generalization of the k-means algorithm. In k-means algorithm, clusters are formed in the way that each cluster is close to one point, which is a 0-flat. kq-flats algorithm gives better clustering result than k-means algorithm for some data set.

Description

Problem formulation

Given a set A of m observations where each observation is an n-dimensional real vector, kq-flats algorithm aims to partition m observation points by generating kq-flats that minimize the sum of the squares of distances of each observation to a nearest q-flat.

A q-flat is a subset of that is congruent to . For example, a 0-flat is a point; a 1-flat is a line; a 2-flat is a plane; a -flat is a hyperplane. q-flat can be characterized by the solution set of a linear system of equations: , where , .

Denote a partition of as . The problem can be formulated as

where is the projection of onto . Note that is the distance from to .

Algorithm

The algorithm is similar to the k-means algorithm (i.e. Lloyd's algorithm) in that it alternates between cluster assignment and cluster update. In specific, the algorithm starts with an initial set of q-flats , and proceeds by alternating between the following two steps:

Cluster Assignment
(given q-flats, assign each point to closest q-flat): the i-th cluster is updated as
Cluster Update
(given cluster assignment, update the q-flats): For , let with rows corresponding to all assigned to cluster l. Set to be the matrix whose columns are the orthonormal eigenvectors corresponding to the least eigenvalues of and .

Stop whenever the assignments no longer change.

The cluster assignment step uses the following fact: given a q-flat and a vector a, where , the distance from a to the q-flat is

The key part of this algorithm is how to update the cluster, i.e. given m points, how to find a q-flat that minimizes the sum of squares of distances of each point to the q-flat. Mathematically, this problem is: given solve the quadratic optimization problem

where is given, and .

The problem can be solved using Lagrangian multiplier method and the solution is as given in the cluster update step.

It can be shown that the algorithm will terminate in a finite number of iterations (no more than the total number of possible assignments, which is bounded by ). In addition, the algorithm will terminate at a point that the overall objective cannot be decreased either by a different assignment or by defining new cluster planes for these clusters (such point is called "locally optimal" in the references).

This convergence result is a consequence of the fact that problem (P2) can be solved exactly. The same convergence result holds for k-means algorithm because the cluster update problem can be solved exactly.

Relation to other machine learning methods

k-means algorithm

kq-flats algorithm is a generalization of k-means algorithm. In fact, k-means algorithm is k0-flats algorithm since a point is a 0-flat. Despite their connection, they should be used in different scenarios. kq-flats algorithm for the case that data lie in a few low-dimensional spaces. k-means algorithm is desirable for the case the clusters are of the ambient dimension. For example, if all observations lie in two lines, kq-flats algorithm with may be used; if the observations are two Gaussian clouds, k-means algorithm may be used.

Sparse Dictionary Learning

Natural signals lie in a high-dimensional space. For example, the dimension of a 1024-by-1024 image is about 106, which is far too high for most signal processing algorithms. One way to get rid of the high dimensionality is to find a set of basis functions, such that the high-dimensional signal can be represented by only a few basis functions. In other words, the coefficients of the signal representation lies in a low-dimensional space, which is easier to apply signal processing algorithms. In the literature, wavelet transform is usually used in image processing, and fourier transform is usually used in audio processing. The set of basis functions is usually called a dictionary.

However, it is not clear what is the best dictionary to use once given a signal data set. One popular approach is to find a dictionary when given a data set using the idea of Sparse Dictionary Learning. It aims to find a dictionary, such that the signal can be sparsely represented by the dictionary. The optimization problem can be written as follows.

subject to

where

The idea of kq-flats algorithm is similar to sparse dictionary learning in nature. If we restrict the q-flat to q-dimensional subspace, then the kq-flats algorithm is simply finding the closed q-dimensional subspace to a given signal. Sparse dictionary learning is also doing the same thing, except for an additional constraints on the sparsity of the representation. Mathematically, it is possible to show that kq-flats algorithm is of the form of sparse dictionary learning with an additional block structure on R.

Let be a matrix, where columns of are basis of the k-th flat. Then the projection of the signal x to the k-th flat is , where is a q-dimensional coefficient. Let denote concatenation of basis of K flats, it is easy to show that the kq-flat algorithm is the same as the following.

subject to and R has a block structure.

The block structure of R refers the fact that each signal is labeled to only one flat. Comparing the two formulations, kq-flat is the same as sparse dictionary modeling when and with an additional block structure on R. Users may refer to Szlam's paper [3] for more discussion about the relationship between the two concept.

Applications and variations

Classification

Classification is a procedure that classifies an input signal into different classes. One example is to classify an email into spam or non-spam classes. Classification algorithms usually require a supervised learning stage. In the supervised learning stage, training data for each class is used for the algorithm to learn the characteristics of the class. In the classification stage, a new observation is classified into a class by using the characteristics that were already trained.

kq-flat algorithm can be used for classification. Suppose there are total of m classes. For each class, k flats are trained a priori via training data set. When a new data comes, find the flat that is closest to the new data. Then the new data is associate to class of the closest flat.

However, the classification performance can be further improved if we impose some structure on the flats. One possible choice is to require different flats from different class be sufficiently far apart. Some researchers [4] use this idea and develop a discriminative k q-flat algorithm.

K-metrics [3]

In kq-flats algorithm, is used to measure the representation error. denotes the projection of x to the flat F. If data lies in a q-dimension flat, then a single q-flat can represent the data very well. On the contrary, if data lies in a very high dimension space but near a common center, then k-means algorithm is a better way than kq-flat algorithm to represent the data. It is because k-means algorithm use to measure the error, where denotes the center. K-metrics is a generalization that use both the idea of flat and mean. In k-metrics, error is measured by the following Mahalanobis metric.

where A is a positive semi-definite matrix.

If A is the identity matrix, then the Mahalanobis metric is exactly the same as the error measure used in k-means. If A is not the identity matrix, then will favor certain directions as the kq-flat error measure.

Related Research Articles

<span class="mw-page-title-main">Pauli matrices</span> Matrices important in quantum mechanics and the study of spin

In mathematical physics and mathematics, the Pauli matrices are a set of three 2 × 2 complex matrices which are Hermitian, involutory and unitary. Usually indicated by the Greek letter sigma, they are occasionally denoted by tau when used in connection with isospin symmetries.

<span class="mw-page-title-main">Green's theorem</span> Theorem in calculus relating line and double integrals

In vector calculus, Green's theorem relates a line integral around a simple closed curve C to a double integral over the plane region D bounded by C. It is the two-dimensional special case of Stokes' theorem.

In geometry and complex analysis, a Möbius transformation of the complex plane is a rational function of the form

In mathematics, specifically in differential topology, Morse theory enables one to analyze the topology of a manifold by studying differentiable functions on that manifold. According to the basic insights of Marston Morse, a typical differentiable function on a manifold will reflect the topology quite directly. Morse theory allows one to find CW structures and handle decompositions on manifolds and to obtain substantial information about their homology.

In mathematics, a submersion is a differentiable map between differentiable manifolds whose differential is everywhere surjective. This is a basic concept in differential topology. The notion of a submersion is dual to the notion of an immersion.

In mathematics, and especially differential geometry and gauge theory, a connection on a fiber bundle is a device that defines a notion of parallel transport on the bundle; that is, a way to "connect" or identify fibers over nearby points. The most common case is that of a linear connection on a vector bundle, for which the notion of parallel transport must be linear. A linear connection is equivalently specified by a covariant derivative, an operator that differentiates sections of the bundle along tangent directions in the base manifold, in such a way that parallel sections have derivative zero. Linear connections generalize, to arbitrary vector bundles, the Levi-Civita connection on the tangent bundle of a pseudo-Riemannian manifold, which gives a standard way to differentiate vector fields. Nonlinear connections generalize this concept to bundles whose fibers are not necessarily linear.

In linear algebra, a rotation matrix is a transformation matrix that is used to perform a rotation in Euclidean space. For example, using the convention below, the matrix

Multi-task learning (MTL) is a subfield of machine learning in which multiple learning tasks are solved at the same time, while exploiting commonalities and differences across tasks. This can result in improved learning efficiency and prediction accuracy for the task-specific models, when compared to training the models separately. Early versions of MTL were called "hints".

In mathematics, a matrix norm is a vector norm in a vector space whose elements (vectors) are matrices.

<span class="mw-page-title-main">Regularization (mathematics)</span> Technique to make a model more generalizable and transferable

In mathematics, statistics, finance, computer science, particularly in machine learning and inverse problems, regularization is a process that changes the result answer to be "simpler". It is often used to obtain results for ill-posed problems or to prevent overfitting.

In algebraic geometry, a branch of mathematics, a Hilbert scheme is a scheme that is the parameter space for the closed subschemes of some projective space, refining the Chow variety. The Hilbert scheme is a disjoint union of projective subschemes corresponding to Hilbert polynomials. The basic theory of Hilbert schemes was developed by Alexander Grothendieck (1961). Hironaka's example shows that non-projective varieties need not have Hilbert schemes.

In the mathematical field of dynamical systems, a random dynamical system is a dynamical system in which the equations of motion have an element of randomness to them. Random dynamical systems are characterized by a state space S, a set of maps from S into itself that can be thought of as the set of all possible equations of motion, and a probability distribution Q on the set that represents the random choice of map. Motion in a random dynamical system can be informally thought of as a state evolving according to a succession of maps randomly chosen according to the distribution Q.

In computer science, the earth mover's distance (EMD) is a distance-like measure of dissimilarity between two frequency distributions, densities, or measures over a region D. For probability distributions and normalized histograms, it reduces to the Wasserstein metric . Informally, if the distributions are interpreted as two different ways of piling up earth (dirt) over the region D, the EMD captures the minimum cost of building the smaller pile using dirt taken from the larger, where cost is defined as the amount of dirt moved multiplied by the ground distance over which it is moved.

<span class="mw-page-title-main">Online machine learning</span> Method of machine learning

In computer science, online machine learning is a method of machine learning in which data becomes available in a sequential order and is used to update the best predictor for future data at each step, as opposed to batch learning techniques which generate the best predictor by learning on the entire training data set at once. Online learning is a common technique used in areas of machine learning where it is computationally infeasible to train over the entire dataset, requiring the need of out-of-core algorithms. It is also used in situations where it is necessary for the algorithm to dynamically adapt to new patterns in the data, or when the data itself is generated as a function of time, e.g., stock price prediction. Online learning algorithms may be prone to catastrophic interference, a problem that can be addressed by incremental learning approaches.

The iterative proportional fitting procedure is the operation of finding the fitted matrix which is the closest to an initial matrix but with the row and column totals of a target matrix . The fitted matrix being of the form , where and are diagonal matrices such that has the margins of . Some algorithms can be chosen to perform biproportion. We have also the entropy maximization, information loss minimization or RAS which consists of factoring the matrix rows to match the specified row totals, then factoring its columns to match the specified column totals; each step usually disturbs the previous step’s match, so these steps are repeated in cycles, re-adjusting the rows and columns in turn, until all specified marginal totals are satisfactorily approximated. However, all algorithms give the same solution. In three- or more-dimensional cases, adjustment steps are applied for the marginals of each dimension in turn, the steps likewise repeated in cycles.

In cryptography, Learning with errors (LWE) is a mathematical problem that is widely used in cryptography to create secure encryption algorithms. It is based on the idea of representing secret information as a set of equations with errors. In other words, LWE is a way to hide the value of a secret by introducing noise to it. In more technical terms, it refers to the computational problem of inferring a linear -ary function over a finite ring from given samples some of which may be erroneous. The LWE problem is conjectured to be hard to solve, and thus to be useful in cryptography.

Overcompleteness is a concept from linear algebra that is widely used in mathematics, computer science, engineering, and statistics. It was introduced by R. J. Duffin and A. C. Schaeffer in 1952.

Least-squares support-vector machines (LS-SVM) for statistics and in statistical modeling, are least-squares versions of support-vector machines (SVM), which are a set of related supervised learning methods that analyze data and recognize patterns, and which are used for classification and regression analysis. In this version one finds the solution by solving a set of linear equations instead of a convex quadratic programming (QP) problem for classical SVMs. Least-squares SVM classifiers were proposed by Johan Suykens and Joos Vandewalle. LS-SVMs are a class of kernel-based learning methods.

In mathematics, low-rank approximation is a minimization problem, in which the cost function measures the fit between a given matrix and an approximating matrix, subject to a constraint that the approximating matrix has reduced rank. The problem is used for mathematical modeling and data compression. The rank constraint is related to a constraint on the complexity of a model that fits the data. In applications, often there are other constraints on the approximating matrix apart from the rank constraint, e.g., non-negativity and Hankel structure.

In coding theory, folded Reed–Solomon codes are like Reed–Solomon codes, which are obtained by mapping Reed–Solomon codewords over a larger alphabet by careful bundling of codeword symbols.

References

  1. Bradley, P.S.; Mangasarian, O.L. (2000). "k-Plane Clustering". Journal of Global Optimization. 16 (1): 23–32. doi:10.1023/A:1008324625522. S2CID   913034.
  2. Tseng, P. (2000). "Nearest q-Flat to m Points". Journal of Optimization Theory and Applications. 105 (1): 249–252. doi:10.1023/A:1004678431677. ISSN   0022-3239. S2CID   118142932.
  3. 1 2 Szlam, Arthur; Sapiro, Guillermo (2009-06-14). "Discriminative k -metrics". In Bottou, Léon; Littman, Michael (eds.). Proceedings of the 26th Annual International Conference on Machine Learning. ACM. pp. 1009–1016. doi:10.1145/1553374.1553503. hdl:11299/180116. ISBN   978-1-60558-516-1. S2CID   2509292.
  4. Szlam, A.; Sapiro, G. (2008). "Supervised Learning via Discriminative kq-Flats" (PDF).