com.rapidminer.operator.learner.bayes
Class LinearDiscriminantAnalysis

java.lang.Object
  extended by com.rapidminer.operator.Operator
      extended by com.rapidminer.operator.learner.AbstractLearner
          extended by com.rapidminer.operator.learner.bayes.LinearDiscriminantAnalysis
All Implemented Interfaces:
ConfigurationListener, PreviewListener, Learner, ParameterHandler, LoggingHandler
Direct Known Subclasses:
QuadraticDiscriminantAnalysis, RegularizedDiscriminantAnalysis

public class LinearDiscriminantAnalysis
extends AbstractLearner

This operator performs a linear discriminant analysis (LDA). This method tries to find the linear combination of features which best separate two or more classes of examples. The resulting combination is then used as a linear classifier. LDA is closely related to ANOVA (analysis of variance) and regression analysis, which also attempt to express one dependent variable as a linear combination of other features or measurements. In the other two methods however, the dependent variable is a numerical quantity, while for LDA it is a categorical variable (i.e. the class label).

LDA is also closely related to principal component analysis (PCA) and factor analysis in that both look for linear combinations of variables which best explain the data. LDA explicitly attempts to model the difference between the classes of data. PCA on the other hand does not take into account any difference in class.

Author:
Sebastian Land

Field Summary
 
Fields inherited from class com.rapidminer.operator.learner.AbstractLearner
PROPERTY_RAPIDMINER_GENERAL_CAPABILITIES_WARN
 
Constructor Summary
LinearDiscriminantAnalysis(OperatorDescription description)
           
 
Method Summary
protected  Jama.Matrix[] getInverseCovarianceMatrices(ExampleSet exampleSet, java.lang.String[] labels)
           
protected  Jama.Matrix[] getMeanVectors(ExampleSet exampleSet, int numberOfAttributes, java.lang.String[] labels)
           
protected  DiscriminantModel getModel(ExampleSet exampleSet, java.lang.String[] labels, Jama.Matrix[] meanVectors, Jama.Matrix[] inverseCovariances, double[] aprioriProbabilities)
           
 Model learn(ExampleSet exampleSet)
          Trains a model.
 boolean supportsCapability(LearnerCapability capability)
          Checks for Learner capabilities.
 
Methods inherited from class com.rapidminer.operator.learner.AbstractLearner
apply, getEstimatedPerformance, getInputClasses, getInputDescription, getOptimizationPerformance, getOutputClasses, getWeights, onlyWarnForNonSufficientCapabilities, shouldCalculateWeights, shouldDeliverOptimizationPerformance, shouldEstimatePerformance
 
Methods inherited from class com.rapidminer.operator.Operator
addError, addValue, addWarning, apply, checkDeprecations, checkForStop, checkIO, checkProperties, clearErrorList, cloneOperator, createExperimentTree, createExperimentTree, createFromXML, createMarkedExperimentTree, createMarkedProcessTree, createProcessTree, createProcessTree, getAddOnlyAdditionalOutput, getApplyCount, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getEncoding, getErrorList, getExperiment, getInnerOperatorsXML, getInput, getInput, getInput, getIOContainerForInApplyLoopBreakpoint, getIODescription, getLog, getName, getOperatorClassName, getOperatorDescription, getParameter, getParameterAsBoolean, getParameterAsColor, getParameterAsDouble, getParameterAsFile, getParameterAsFile, getParameterAsInputStream, getParameterAsInt, getParameterAsMatrix, getParameterAsString, getParameterList, getParameters, getParameterType, getParameterTypes, getParent, getProcess, getStartTime, getStatus, getUserDescription, getValue, getValues, getXML, hasBreakpoint, hasBreakpoint, hasInput, inApplyLoop, isDebugMode, isEnabled, isExpanded, isParallel, isParameterSet, log, logError, logNote, logWarning, performAdditionalChecks, processFinished, processStarts, register, registerOperator, remove, rename, resume, setApplyCount, setBreakpoint, setEnabled, setExpanded, setInput, setListParameter, setOperatorParameters, setParameter, setParameters, setParent, setUserDescription, toString, unregisterOperator, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rapidminer.operator.learner.Learner
getName
 

Constructor Detail

LinearDiscriminantAnalysis

public LinearDiscriminantAnalysis(OperatorDescription description)
Method Detail

learn

public Model learn(ExampleSet exampleSet)
            throws OperatorException
Description copied from interface: Learner
Trains a model. This method should be called by apply() and is implemented by subclasses.

Throws:
OperatorException

getModel

protected DiscriminantModel getModel(ExampleSet exampleSet,
                                     java.lang.String[] labels,
                                     Jama.Matrix[] meanVectors,
                                     Jama.Matrix[] inverseCovariances,
                                     double[] aprioriProbabilities)
                              throws UndefinedParameterError
Throws:
UndefinedParameterError

getMeanVectors

protected Jama.Matrix[] getMeanVectors(ExampleSet exampleSet,
                                       int numberOfAttributes,
                                       java.lang.String[] labels)

getInverseCovarianceMatrices

protected Jama.Matrix[] getInverseCovarianceMatrices(ExampleSet exampleSet,
                                                     java.lang.String[] labels)
                                              throws UndefinedParameterError
Throws:
UndefinedParameterError

supportsCapability

public boolean supportsCapability(LearnerCapability capability)
Description copied from interface: Learner
Checks for Learner capabilities. Should return true if the given capability is supported.



Copyright © 2001-2009 by Rapid-I