Click or drag to resize
Accord.NET (logo)

BaseSequentialMinimalOptimizationTModel, TKernel, TInput Class

Base class for Sequential Minimal Optimization.
Inheritance Hierarchy
SystemObject
  Accord.MachineLearningBinaryLearningBaseTModel, TInput
    Accord.MachineLearning.VectorMachines.LearningBaseSupportVectorClassificationTModel, TKernel, TInput
      Accord.MachineLearning.VectorMachines.LearningBaseSequentialMinimalOptimizationTModel, TKernel, TInput
        Accord.MachineLearning.VectorMachines.LearningSequentialMinimalOptimization
        Accord.MachineLearning.VectorMachines.LearningSequentialMinimalOptimizationTKernel
        Accord.MachineLearning.VectorMachines.LearningSequentialMinimalOptimizationTKernel, TInput

Namespace:  Accord.MachineLearning.VectorMachines.Learning
Assembly:  Accord.MachineLearning (in Accord.MachineLearning.dll) Version: 3.8.0
Syntax
public abstract class BaseSequentialMinimalOptimization<TModel, TKernel, TInput> : BaseSupportVectorClassification<TModel, TKernel, TInput>, 
	ISupportVectorMachineLearning<TInput>, ISupervisedBinaryLearning<ISupportVectorMachine<TInput>, TInput>, 
	ISupervisedMulticlassLearning<ISupportVectorMachine<TInput>, TInput>, ISupervisedMultilabelLearning<ISupportVectorMachine<TInput>, TInput>, 
	ISupervisedLearning<ISupportVectorMachine<TInput>, TInput, int[]>, ISupervisedLearning<ISupportVectorMachine<TInput>, TInput, bool[]>, 
	ISupervisedLearning<ISupportVectorMachine<TInput>, TInput, int>, ISupervisedLearning<ISupportVectorMachine<TInput>, TInput, bool>, 
	ISupervisedLearning<ISupportVectorMachine<TInput>, TInput, double>
where TModel : Object, ISupportVectorMachine<TInput>
where TKernel : Object, IKernel<TInput>
Request Example View Source

Type Parameters

TModel
TKernel
TInput

The BaseSequentialMinimalOptimizationTModel, TKernel, TInput type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyActiveExamples
Gets the indices of the active examples (examples which have the corresponding Lagrange multiplier different than zero).
Public propertyBoundedExamples
Gets the indices of the examples at the boundary (examples which have the corresponding Lagrange multipliers equal to C).
Protected propertyC
Gets or sets the cost values associated with each input vector.
(Inherited from BaseSupportVectorClassificationTModel, TKernel, TInput.)
Public propertyCacheSize
Gets or sets the cache size to partially store the kernel matrix. Default is the same number of input vectors, meaning the entire kernel matrix will be computed and cached in memory. If set to zero, the cache will be disabled and all operations will be computed as needed.
Public propertyCompact Obsolete.
Gets or sets whether to produce compact models. Compact formulation is currently limited to linear models.
Public propertyComplexity
Complexity (cost) parameter C. Increasing the value of C forces the creation of a more accurate model that may not generalize well. If this value is not set and UseComplexityHeuristic is set to true, the framework will automatically guess a value for C. If this value is manually set to something else, then UseComplexityHeuristic will be automatically disabled and the given value will be used instead.
(Inherited from BaseSupportVectorClassificationTModel, TKernel, TInput.)
Public propertyEpsilon
Epsilon for round-off errors. Default value is 1e-6.
Protected propertyInputs
Gets or sets the input vectors for training.
(Inherited from BaseSupportVectorClassificationTModel, TKernel, TInput.)
Public propertyKernel
Gets or sets the kernel function use to create a kernel Support Vector Machine. If this property is set, UseKernelEstimation will be set to false.
(Inherited from BaseSupportVectorClassificationTModel, TKernel, TInput.)
Public propertyLagrange
Gets the value for the Lagrange multipliers (alpha) for every observation vector.
Public propertyModel
Gets or sets the classifier being learned.
(Inherited from BinaryLearningBaseTModel, TInput.)
Public propertyNegativeWeight
Gets or sets the negative class weight. This should be a value higher than 0 indicating how much of the Complexity parameter C should be applied to instances carrying the negative label.
(Inherited from BaseSupportVectorClassificationTModel, TKernel, TInput.)
Public propertyNonBoundExamples
Gets the indices of the non-bounded examples (examples which have the corresponding Lagrange multipliers between 0 and C).
Protected propertyOutputs
Gets or sets the output labels for each training vector.
(Inherited from BaseSupportVectorClassificationTModel, TKernel, TInput.)
Public propertyPositiveWeight
Gets or sets the positive class weight. This should be a value higher than 0 indicating how much of the Complexity parameter C should be applied to instances carrying the positive label.
(Inherited from BaseSupportVectorClassificationTModel, TKernel, TInput.)
Public propertyShrinking
Gets or sets a value indicating whether shrinking heuristics should be used. Default is false. Note: this property can only be used when Strategy is set to SecondOrder.
Public propertyStrategy
Gets or sets the pair selection strategy to be used during optimization.
Public propertyToken
Gets or sets a cancellation token that can be used to stop the learning algorithm while it is running.
(Inherited from BinaryLearningBaseTModel, TInput.)
Public propertyTolerance
Convergence tolerance. Default value is 1e-2.
Public propertyUseClassProportions
Gets or sets a value indicating whether the weight ratio to be used between Complexity values for negative and positive instances should be computed automatically from the data proportions. Default is false.
(Inherited from BaseSupportVectorClassificationTModel, TKernel, TInput.)
Public propertyUseComplexityHeuristic
Gets or sets a value indicating whether the Complexity parameter C should be computed automatically by employing an heuristic rule. Default is true.
(Inherited from BaseSupportVectorClassificationTModel, TKernel, TInput.)
Public propertyUseKernelEstimation
Gets or sets whether initial values for some kernel parameters should be estimated from the data, if possible. Default is true.
(Inherited from BaseSupportVectorClassificationTModel, TKernel, TInput.)
Public propertyWeightRatio
Gets or sets the weight ratio between positive and negative class weights. This ratio controls how much of the Complexity parameter C should be applied to the positive class.
(Inherited from BaseSupportVectorClassificationTModel, TKernel, TInput.)
Top
Methods
  NameDescription
Public methodComputeError Obsolete.
Computes the error rate for a given set of input and outputs.
(Inherited from BaseSupportVectorClassificationTModel, TKernel, TInput.)
Protected methodCreate
Creates an instance of the model to be learned. Inheritors of this abstract class must define this method so new models can be created from the training data.
(Inherited from BaseSupportVectorClassificationTModel, TKernel, TInput.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodInnerRun
Runs the learning algorithm.
(Overrides BaseSupportVectorClassificationTModel, TKernel, TInputInnerRun.)
Public methodLearn(TInput, Boolean, Double)
Learns a model that can map the given inputs to the given outputs.
(Inherited from BinaryLearningBaseTModel, TInput.)
Public methodLearn(TInput, Double, Double)
Learns a model that can map the given inputs to the given outputs.
(Inherited from BinaryLearningBaseTModel, TInput.)
Public methodLearn(TInput, Int32, Double)
Learns a model that can map the given inputs to the given outputs.
(Inherited from BinaryLearningBaseTModel, TInput.)
Public methodLearn(TInput, Int32, Double)
Learns a model that can map the given inputs to the given outputs.
(Inherited from BinaryLearningBaseTModel, TInput.)
Public methodLearn(TInput, Boolean, Double)
Learns a model that can map the given inputs to the given outputs.
(Inherited from BaseSupportVectorClassificationTModel, TKernel, TInput.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRun Obsolete.
Obsolete.
(Inherited from BaseSupportVectorClassificationTModel, TKernel, TInput.)
Public methodRun(Boolean) Obsolete.
Obsolete.
(Inherited from BaseSupportVectorClassificationTModel, TKernel, TInput.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodTo(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.)
Public Extension MethodToTOverloaded.
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
See Also