Table of Contents

Class BasePruner

Namespace
OptunaSharp.Pruners
Assembly
OptunaSharp.dll

Base class for pruners. Port of optuna/pruners/_base.py: BasePruner.

public abstract class BasePruner
Inheritance
BasePruner
Derived
Inherited Members

Methods

Prune(Study, FrozenTrial)

Judge whether the trial should be pruned based on the reported values.

Note that this method is not supposed to be called by library users. Instead, Report(double, long) and ShouldPrune() provide user interfaces to implement pruning mechanism in an objective function.

public abstract bool Prune(Study study, FrozenTrial trial)

Parameters

study Study

Study object of the target study.

trial FrozenTrial

FrozenTrial object of the target trial. Take a copy before modifying this object.

Returns

bool

A boolean value representing whether the trial should be pruned.