CompositeCriterion<T>

Models & Types · AiDotNet.ActiveLearning.StoppingCriteria

Composite stopping criterion that combines multiple criteria.

Implements: ICompositeCriterion<T>

For Beginners

Sometimes you want to stop based on multiple conditions. For example, stop if you run out of budget OR if performance plateaus. This composite criterion lets you combine multiple criteria with AND/OR logic.

How It Works

Combination Modes:

Common Combinations:

Example Usage:

Constructors

Constructor Summary
CompositeCriterion() Initializes a new empty CompositeCriterion with Any mode.
CompositeCriterion(CombinationMode mode) Initializes a new empty CompositeCriterion with specified mode.
CompositeCriterion(IEnumerable<IStoppingCriterion<T>> criteria, CombinationMode mode) Initializes a CompositeCriterion with specified criteria and mode.

Properties

Property Summary
CombinationMode Mode { get; } Gets the combination mode for this composite.
IReadOnlyList<IStoppingCriterion<T>> Criteria { get; }
string Description { get; }
string Name { get; }

Methods

Method Summary
CompositeCriterion<T> All(IStoppingCriterion<T>[] criteria) Creates a composite criterion that stops when ALL of the given criteria are met.
CompositeCriterion<T> Any(IStoppingCriterion<T>[] criteria) Creates a composite criterion that stops when ANY of the given criteria is met.
T GetProgress(ActiveLearningContext<T> context)
bool RemoveCriterion(IStoppingCriterion<T> criterion)
bool ShouldStop(ActiveLearningContext<T> context)
void AddCriterion(IStoppingCriterion<T> criterion)
void Reset()