Linear Discriminant Analysis (LDA).
Inheritance Hierarchy Namespace: Accord.Statistics.AnalysisAccord.Statistics (in Accord.Statistics.dll) Version: 3.8.0
Syntax[SerializableAttribute] public class LinearDiscriminantAnalysis : BaseDiscriminantAnalysis, IDiscriminantAnalysis, IMultivariateAnalysis, IAnalysis, IProjectionAnalysis, ISupervisedLearning<LinearDiscriminantAnalysisPipeline, double[], int>
<SerializableAttribute> Public Class LinearDiscriminantAnalysis Inherits BaseDiscriminantAnalysis Implements IDiscriminantAnalysis, IMultivariateAnalysis, IAnalysis, IProjectionAnalysis, ISupervisedLearning(Of LinearDiscriminantAnalysisPipeline, Double(), Integer)Request Example View Source
The LinearDiscriminantAnalysis type exposes the following members.
Constructors Properties Methods Name Description Classify(Double) Obsolete.Transform Classifies a new instance into one of the available classes.
(Overrides BaseDiscriminantAnalysisClassify(Double).) Classify(Double) Obsolete.Classifies new instances into one of the available classes.
(Overrides BaseDiscriminantAnalysisClassify(Double).) Classify(Double, Double) Obsolete.Classifies a new instance into one of the available classes.
(Overrides BaseDiscriminantAnalysisClassify(Double, Double).) Compute Obsolete.Computes the Multi-Class Linear Discriminant Analysis algorithm.
CreateDiscriminantsCreates additional information about principal components.
(Inherited from BaseDiscriminantAnalysis.) DiscriminantFunctionGets the output of the discriminant function for a given class.
(Overrides BaseDiscriminantAnalysisDiscriminantFunction(Double, Int32).) EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object.) FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.) GetHashCodeServes as the default hash function.
(Inherited from Object.) GetNumberOfDimensionsReturns the minimum number of discriminant space dimensions (discriminant factors) required to represent a given percentile of the data.
(Inherited from BaseDiscriminantAnalysis.) GetTypeGets the Type of the current instance.
(Inherited from Object.) init Obsolete.Obsolete.
(Inherited from BaseDiscriminantAnalysis.) InitInitializes common properties.
(Inherited from BaseDiscriminantAnalysis.) LearnLearns a model that can map the given inputs to the given outputs.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object.) ToStringReturns a string that represents the current object.
(Inherited from Object.) Transform(Double) Obsolete.Obsolete.
(Inherited from BaseDiscriminantAnalysis.) Transform(Double)Applies the transformation to an input, producing an associated output.
(Inherited from BaseDiscriminantAnalysis.) Transform(Double)Applies the transformation to an input, producing an associated output.
(Inherited from BaseDiscriminantAnalysis.) Transform(Double, Int32) Obsolete.Obsolete.
(Inherited from BaseDiscriminantAnalysis.) Transform(Double, Int32) Obsolete.Obsolete.
(Inherited from BaseDiscriminantAnalysis.) Transform(Double, Int32) Obsolete.Obsolete.
(Inherited from BaseDiscriminantAnalysis.) Transform(Double, Double)Applies the transformation to an input, producing an associated output.
(Overrides TransformBaseTInput, TOutputTransform(TInput, TOutput).) Top Extension Methods Name Description HasMethodChecks whether an object implements a method with the given name.
(Defined by ExtensionMethods.) IsEqualCompares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.) To(Type) Overloaded.Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) ToT Overloaded.Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) Top RemarksLinear Discriminant Analysis (LDA) is a method of finding such a linear combination of variables which best separates two or more classes.
In itself LDA is not a classification algorithm, although it makes use of class labels. However, the LDA result is mostly used as part of a linear classifier. The other alternative use is making a dimension reduction before using nonlinear classification algorithms.
It should be noted that several similar techniques (differing in requirements to the sample) go together under the general name of Linear Discriminant Analysis. Described below is one of these techniques with only two requirements:
Moreover, LDA requires the following assumptions to be true:
If the latter assumption is violated, it is common to use quadratic discriminant analysis in the same manner as linear discriminant analysis instead.
This class can also be bound to standard controls such as the DataGridView by setting their DataSource property to the analysis' Discriminants property.
References:
double[][] inputs = { new double[] { 4, 1 }, new double[] { 2, 4 }, new double[] { 2, 3 }, new double[] { 3, 6 }, new double[] { 4, 4 }, new double[] { 9, 10 }, new double[] { 6, 8 }, new double[] { 9, 5 }, new double[] { 8, 7 }, new double[] { 10, 8 } }; int[] output = { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 }; var lda = new LinearDiscriminantAnalysis(); var classifier = lda.Learn(inputs, output); double[][] projection = lda.Transform(inputs); int[] results = classifier.Decide(inputs);See Also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4