Table of Contents

Class ModelParameterGene<T>

Namespace
AiDotNet.Genetics
Assembly
AiDotNet.dll

Represents a gene that corresponds to a parameter in a machine learning model.

public class ModelParameterGene<T>

Type Parameters

T

The 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

index int

The index of the parameter.

value T

The value of the parameter.

Properties

Index

Gets the index of the parameter in the model's parameter vector.

public int Index { get; }

Property Value

int

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

obj object

The 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.