Click or drag to resize
Accord.NET (logo)

BaseAveragedStochasticGradientDescentTModel, TKernel, TInput, TLoss Class

Base class for Averaged Stochastic Gradient Descent algorithm implementations.
Inheritance Hierarchy
SystemObject
  Accord.MachineLearningBinaryLearningBaseTModel, TInput
    Accord.MachineLearning.VectorMachines.LearningBaseAveragedStochasticGradientDescentTModel, TKernel, TInput, TLoss
      Accord.MachineLearning.VectorMachines.LearningAveragedStochasticGradientDescent
      Accord.MachineLearning.VectorMachines.LearningAveragedStochasticGradientDescentTKernel
      Accord.MachineLearning.VectorMachines.LearningAveragedStochasticGradientDescentTKernel, TInput
      Accord.MachineLearning.VectorMachines.LearningAveragedStochasticGradientDescentTKernel, TInput, TLoss

Namespace:  Accord.MachineLearning.VectorMachines.Learning
Assembly:  Accord.MachineLearning (in Accord.MachineLearning.dll) Version: 3.8.0
Syntax
public abstract class BaseAveragedStochasticGradientDescent<TModel, TKernel, TInput, TLoss> : BinaryLearningBase<TModel, TInput>, 
	ICloneable
where TModel : SupportVectorMachine<TKernel, TInput>
where TKernel : struct, new(), ILinear<TInput>
where TInput : IList, ICloneable
where TLoss : struct, new(), IDifferentiableLoss<bool, double, double>
Request Example View Source

Type Parameters

TModel
The type of the model being learned.
TKernel
The type of the kernel function to use.
TInput
The type of the input to consider.
TLoss
The type of the loss function to use.

The BaseAveragedStochasticGradientDescentTModel, TKernel, TInput, TLoss type exposes the following members.

Constructors
  NameDescription
Protected methodBaseAveragedStochasticGradientDescentTModel, TKernel, TInput, TLoss
Initializes a new instance of the BaseAveragedStochasticGradientDescentTModel, TKernel, TInput, TLoss class.
Top
Properties
  NameDescription
Public propertyCurrentEpoch
Gets or sets the current epoch counter.
Public propertyIterations Obsolete.
Please use MaxIterations instead.
Public propertyKernel
Gets or sets the kernel function use to create a kernel Support Vector Machine.
Public propertyLambda
Gets or sets the lambda regularization term. Default is 0.5.
Public propertyLearningRate
Gets or sets the learning rate for the SGD algorithm.
Public propertyLoss
Gets or sets the loss function to be used. Default is to use the LogisticLoss.
Public propertyMaxIterations
Public propertyModel
Gets or sets the classifier being learned.
(Inherited from BinaryLearningBaseTModel, TInput.)
Public propertyParallelOptions
Gets or sets the parallelization options for this algorithm.
Public propertyToken
Gets or sets a cancellation token that can be used to cancel the algorithm while it is running.
(Overrides BinaryLearningBaseTModel, TInputToken.)
Public propertyTolerance
Gets or sets the maximum relative change in the watched value after an iteration of the algorithm used to detect convergence. Default is 1e-3. If set to 0, the loss will not be computed during learning and execution will be faster.
Top
Methods
  NameDescription
Public methodClone
Creates a new object that is a copy of the current instance.
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.
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 methodInnerClone
Inheritors should implement this function to produce a new instance with the same characteristics of the current object.
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.
(Overrides BinaryLearningBaseTModel, TInputLearn(TInput, Boolean, Double).)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
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
Remarks
The IKernel and IDifferentiableLossTInput, TScore, TLoss are passed as generic parameters (constrained to be structs) because this is the only way to force the compiler to emit a separate native code for this class whose performance critical sections can be inlined.
See Also