Table of Contents

Class TrialsTable

Namespace
OptunaSharp
Assembly
OptunaSharp.dll

A plain, dependency-free table of trials — the Core-tier stand-in for pandas in Study.trials_dataframe (plan §2.4: the Microsoft.Data.Analysis adapter is a Tier X package that converts from this).

public sealed class TrialsTable
Inheritance
TrialsTable
Inherited Members

Properties

ColumnCount

The number of attribute/key columns in the table.

public int ColumnCount { get; }

Property Value

int

Columns

Flattened column names (params_x) as produced by Python's flatten_columns; equals the two-level labels joined on with empty parts dropped.

public IReadOnlyList<string> Columns { get; }

Property Value

IReadOnlyList<string>

this[int, string]

Cell accessor by row index and flattened column name.

public object? this[int row, string flatColumn] { get; }

Parameters

row int

The zero-based row index of the trial record.

flatColumn string

The display name of a flattened attribute/key column.

Property Value

object

The cell value at the requested row and column, including null for a missing attribute value.

Exceptions

KeyError

The flattened column name does not exist.

ArgumentOutOfRangeException

The row index is outside the table.

MultiColumns

The two-level column labels, e.g. ("params", "x") or ("number", "").

public IReadOnlyList<(string Column, string Nested)> MultiColumns { get; }

Property Value

IReadOnlyList<(string Column, string Nested)>

MultiIndex

Whether the caller requested MultiIndex-style columns.

public bool MultiIndex { get; }

Property Value

bool

RowCount

The number of trial records in the table.

public int RowCount { get; }

Property Value

int

Rows

Row-major cell values, one array per trial, aligned with MultiColumns.

public IReadOnlyList<object?[]> Rows { get; }

Property Value

IReadOnlyList<object[]>