Class ModelParameterGene<T>
Represents a gene that corresponds to a parameter in a machine learning model.
public class ModelParameterGene<T>
Type Parameters
TThe numeric type used for the value.
- Inheritance
-
ModelParameterGene<T>
- Inherited Members
Constructors
ModelParameterGene(int, T)
Initializes a new instance of the ModelParameterGene class.
public ModelParameterGene(int index, T value)
Parameters
indexintThe index of the parameter.
valueTThe value of the parameter.
Properties
Index
Gets the index of the parameter in the model's parameter vector.
public int Index { get; }
Property Value
Value
Gets the parameter value.
public T Value { get; }
Property Value
- T
Methods
Clone()
Creates a clone of this gene.
public ModelParameterGene<T> Clone()
Returns
- ModelParameterGene<T>
A new ModelParameterGene with the same index and value.
Equals(object?)
Determines whether the specified object is equal to the current gene.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current gene.
Returns
- bool
true if the specified object is equal to the current gene; otherwise, false.
GetHashCode()
Returns a hash code for this gene.
public override int GetHashCode()
Returns
- int
A hash code for the current gene.