Table of Contents

Interface IWeightedSampler<T>

Namespace
AiDotNet.Interfaces
Assembly
AiDotNet.dll

Interface for samplers that use sample weights.

public interface IWeightedSampler<T> : IDataSampler

Type Parameters

T

The numeric type for weights.

Inherited Members

Properties

NumSamples

Gets or sets the number of samples to draw per epoch.

int? NumSamples { get; set; }

Property Value

int?

Remarks

If null, defaults to the dataset size. Can be larger than dataset size when Replacement is true (oversampling).

Replacement

Gets or sets whether to sample with replacement.

bool Replacement { get; set; }

Property Value

bool

Remarks

With replacement: samples can be selected multiple times per epoch. Without replacement: each sample appears at most once per epoch.

Weights

Gets or sets the weights for each sample.

IReadOnlyList<T> Weights { get; set; }

Property Value

IReadOnlyList<T>

Remarks

Higher weights increase the probability of a sample being selected. Weights should be non-negative.