InstanceSpace Python v0.4.1

instancespace.data.model

Defines a comprehensive set of data classes used in the instance space analysis.

These classes are designed to encapsulate various aspects of the data and the results of different analytical processes, facilitating a structured and organized approach to data analysis and model building.

def pointwise_covers( polygon: shapely.geometry.polygon.Polygon | shapely.geometry.multipolygon.MultiPolygon | instancespace.utils.alpha_shape.TetrahedralMesh, points: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], tolerance: float = 0.0) -> numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]]:

Apply the shared MATLAB/Python closed-boundary TRACE membership policy.

@dataclass(frozen=True)
class Data:

Holds initial dataset from metadata and processed data after operations.

Data( inst_labels: pandas.core.series.Series, feat_labels: list[str], algo_labels: list[str], x: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], y: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], x_raw: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], y_raw: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], y_bin: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]], y_best: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], p: numpy.ndarray[typing.Any, numpy.dtype[numpy.int64]], num_good_algos: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], beta: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]], s: pandas.core.series.Series | None)
inst_labels: pandas.core.series.Series
feat_labels: list[str]
algo_labels: list[str]
x: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
y: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
x_raw: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
y_raw: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
y_bin: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]]
y_best: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
p: numpy.ndarray[typing.Any, numpy.dtype[numpy.int64]]
num_good_algos: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
beta: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]]
s: pandas.core.series.Series | None
@classmethod
def from_stage_runner_output(cls: type[~T], stage_runner_output: dict[str, typing.Any]) -> ~T:

Initialize a Data object from the output of an InstanceSpace StageRunner.

Parameters
  • cls (type[T]): The class.
  • stage_runner_output (dict[str, Any]): The output of the StageRunner for an InstanceSpace.
Returns
  • Data: The Data object.
@dataclass(frozen=True)
class DataDense:

Retain full instance data before density-based subsampling.

Stores processed and raw features/performance, derived good/bad labels, winners, and instance metadata so SIFTED can re-filter instances using its selected features.

DataDense( inst_labels: pandas.core.series.Series, x: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], y: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], x_raw: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], y_raw: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], y_bin: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]], y_best: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], p: numpy.ndarray[typing.Any, numpy.dtype[numpy.int64]], num_good_algos: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], beta: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]], s: pandas.core.series.Series | None)
inst_labels: pandas.core.series.Series
x: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
y: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
x_raw: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
y_raw: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
y_bin: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]]
y_best: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
p: numpy.ndarray[typing.Any, numpy.dtype[numpy.int64]]
num_good_algos: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
beta: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]]
s: pandas.core.series.Series | None
@dataclass(frozen=True)
class PrelimOut:

Contains preliminary output metrics calculated from the data.

PrelimOut( med_val: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], iq_range: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], hi_bound: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], lo_bound: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], min_x: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], lambda_x: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], mu_x: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], sigma_x: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], min_y: float, lambda_y: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], sigma_y: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], mu_y: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]])
med_val: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
iq_range: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
hi_bound: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
lo_bound: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
min_x: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
lambda_x: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
mu_x: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
sigma_x: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
min_y: float
lambda_y: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
sigma_y: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
mu_y: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
@classmethod
def from_stage_runner_output(cls: type[~T], stage_runner_output: dict[str, typing.Any]) -> ~T:

Initialize a PrelimOut object from the output of InstanceSpace StageRunner.

Parameters
  • cls (type[T]): The class.
  • stage_runner_output (dict[str, Any]): The output of the StageRunner for an InstanceSpace.
Returns
  • PrelimOut: The PrelimOut object.
@dataclass(frozen=True)
class SiftedOut:

Results of the sifting process in the data analysis pipeline.

SiftedOut( selvars: numpy.ndarray[typing.Any, numpy.dtype[numpy.int32]], rho: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None, pval: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None, silhouette_scores: list[float] | None, clust: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]] | None)
selvars: numpy.ndarray[typing.Any, numpy.dtype[numpy.int32]]
rho: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None
pval: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None
silhouette_scores: list[float] | None
clust: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]] | None
@classmethod
def from_stage_runner_output(cls: type[~T], stage_runner_output: dict[str, typing.Any]) -> ~T:

Initialize a SiftedOut object from the output of InstanceSpace StageRunner.

Parameters
  • cls (type[T]): The class.
  • stage_runner_output (dict[str, Any]): The output of the StageRunner for an InstanceSpace.
Returns
  • SiftedOut: The SiftedOut object.
@dataclass(frozen=True)
class PilotOut:

Results of the Pilot process in the data analysis pipeline.

PilotOut( X0: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None, alpha: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None, eoptim: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None, perf: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None, a: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], z: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], c: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], b: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], error: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], r2: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], summary: pandas.core.frame.DataFrame, viewpoint: instancespace.stages.pilot_viewpoint.PilotViewpointResult | None = None, x_mean: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None = None)
X0: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None
alpha: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None
eoptim: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None
perf: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None
a: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
z: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
c: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
b: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
error: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
r2: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
summary: pandas.core.frame.DataFrame
viewpoint: instancespace.stages.pilot_viewpoint.PilotViewpointResult | None = None
x_mean: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None = None
@classmethod
def from_stage_runner_output(cls: type[~T], stage_runner_output: dict[str, typing.Any]) -> ~T:

Initialize a PilotOut object from the output of an InstanceSpace StageRunner.

Parameters
  • cls (type[T]): The class.
  • stage_runner_output (dict[str, Any]): The output of the StageRunner for an InstanceSpace.
Returns
  • PilotOut: The PilotOut object.
@dataclass(frozen=True)
class CloisterOut:

Results of the Cloister process in the data analysis pipeline.

CloisterOut( z_edge: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], z_ecorr: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]])
z_edge: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
z_ecorr: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
z_edge_faces: numpy.ndarray[typing.Any, numpy.dtype[numpy.int64]]

Zero-based triangles, reconstructed from persisted boundary vertices.

z_ecorr_faces: numpy.ndarray[typing.Any, numpy.dtype[numpy.int64]]

Zero-based triangles for the persisted correlation-constrained boundary.

@classmethod
def from_stage_runner_output(cls: type[~T], stage_runner_output: dict[str, typing.Any]) -> ~T:

Initialize CloisterOut object from the output of InstanceSpace StageRunner.

Parameters
  • cls (type[T]): The class.
  • stage_runner_output (dict[str, Any]): The output of the StageRunner for an InstanceSpace.
Returns
  • CloisterOut: The CloisterOut object.
@dataclass(frozen=True)
class PythiaOut:

Results of the Pythia process in the data analysis pipeline.

PythiaOut( mu: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | list[float], sigma: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | list[float], cp: Any, svm: Any, cvcmat: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], y_sub: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]], y_hat: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]], pr0_sub: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], pr0_hat: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], box_consnt: list[float], k_scale: list[float], precision: list[float], recall: list[float], accuracy: list[float], selection0: numpy.ndarray[typing.Any, numpy.dtype[numpy.int64]], selection1: Any, summary: pandas.core.frame.DataFrame)
mu: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | list[float]
sigma: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | list[float]
cp: Any
svm: Any
cvcmat: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
y_sub: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]]
y_hat: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]]
pr0_sub: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
pr0_hat: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
box_consnt: list[float]
k_scale: list[float]
precision: list[float]
recall: list[float]
accuracy: list[float]
selection0: numpy.ndarray[typing.Any, numpy.dtype[numpy.int64]]
selection1: Any
summary: pandas.core.frame.DataFrame
@classmethod
def from_stage_runner_output(cls: type[~T], stage_runner_output: dict[str, typing.Any]) -> ~T:

Initialize a PythiaOut object from the output of InstanceSpace StageRunner.

Parameters
  • cls (type[T]): The class.
  • stage_runner_output (dict[str, Any]): The output of the StageRunner for an InstanceSpace.
Returns
  • PythiaOut: The PythiaOut object.
@dataclass(frozen=True)
class Footprint:

A class to represent a footprint with geometric and statistical properties.

Attributes
  • polygon (Polygon | MultiPolygon | TetrahedralMesh | None): The geometric shape of the footprint.
  • area (float): The area (2D) or volume (3D), retained under the legacy field name.
  • elements (int): The number of data points within the footprint.
  • good_elements (int): The number of "good" data points within the footprint.
  • density (float): The density of points within the footprint.
  • purity (float): The purity of "good" elements in relation to all elements in the footprint.
  • dimension (int): The geometry coordinate count. Defaults to two for legacy constructors.
Footprint( polygon: shapely.geometry.polygon.Polygon | shapely.geometry.multipolygon.MultiPolygon | instancespace.utils.alpha_shape.TetrahedralMesh | None, area: float, elements: int, good_elements: int, density: float, purity: float, dimension: int = 2)
polygon: shapely.geometry.polygon.Polygon | shapely.geometry.multipolygon.MultiPolygon | instancespace.utils.alpha_shape.TetrahedralMesh | None
area: float
elements: int
good_elements: int
density: float
purity: float
dimension: int = 2
measure: float

Return area in 2D or volume in 3D through one stable alias.

@classmethod
def from_polygon( cls: type[Footprint], polygon: shapely.geometry.polygon.Polygon | shapely.geometry.multipolygon.MultiPolygon | instancespace.utils.alpha_shape.TetrahedralMesh | None, z: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], y_bin: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]], smoothen: bool = False, boundary_tolerance: float = 0.0) -> Footprint:

Create a Footprint object based on the given polygon.

Parameters
  • polygon (Polygon | MultiPolygon | TetrahedralMesh): The geometry to create the footprint from.
  • z (NDArray[np.double]): The space of instances, represented as an array of data points (features).
  • y_bin (NDArray[np.bool_]): Binary array indicating the points corresponding to the footprint.
  • smoothen (bool, optional): Indicates if the polygon borders need to be smoothened, by default False.
  • boundary_tolerance (float, optional): Inclusive Euclidean boundary distance in projection units; default zero.
Returns
  • Footprint: The created footprint, or an empty one if the polygon is empty.
@dataclass(frozen=True)
class TraceOut:

Results of the Trace process in the data analysis pipeline.

TraceOut( space: Footprint, good: list[Footprint], best: list[Footprint], hard: Footprint, summary: pandas.core.frame.DataFrame, boundary_tolerance: float = 0.0)
space: Footprint
good: list[Footprint]
best: list[Footprint]
hard: Footprint
summary: pandas.core.frame.DataFrame
boundary_tolerance: float = 0.0
@classmethod
def from_stage_runner_output(cls: type[~T], stage_runner_output: dict[str, typing.Any]) -> ~T:

Initialize a TraceOut object from the output of an InstanceSpace StageRunner.

Parameters
  • cls (type[T]): The class.
  • stage_runner_output (dict[str, Any]): The output of the StageRunner for an InstanceSpace.
Returns
  • TraceOut: The TraceOut object.
@dataclass(frozen=True)
class ExploreResult:

Results of applying trained model to test data.

This class encapsulates all outputs from the explore() pipeline, which applies a trained instance space model to new test data.

Attributes
  • dataset_id (str): Identifier for this test dataset.
  • timestamp (datetime): When the explore operation was performed.
  • x (NDArray[np.double]): Processed features after PRELIM/SIFTED transformations. Shape: (n_instances, n_selected_features).
  • z (NDArray[np.double]): Projected coordinates from PILOT. Shape: (n_instances, n_projection_dimensions), where the projection has two or three coordinates. TRACE3 supports full 3D exploration.
  • y_hat (NDArray[np.bool_] | None): Binary algorithm predictions from PYTHIA SVMs. Shape: (n_instances, n_algorithms). None if PYTHIA not applied. n_algorithms includes a trailing column (always False) per test-set-only algorithm absent from training when ground truth is present - see algo_labels.
  • pr0_hat (NDArray[np.double] | None): Probability predictions from PYTHIA SVMs. Shape: (n_instances, n_algorithms). None if PYTHIA not applied. Same new-algorithm-column convention as y_hat (trailing 0.0).
  • selection0 (NDArray[np.int_] | None): Recommended algorithm index for each instance. Shape: (n_instances,). None if PYTHIA not applied. Never points at a new-algorithm column (see y_hat) - those are given zero selection precision, so they can never be the recommended algorithm.
  • in_good (NDArray[np.bool_] | None): Whether each instance falls in "good" footprint for each algorithm. Shape: (n_instances, n_algorithms). None if TRACE not applied. Same new-algorithm-column convention as y_hat (trailing False - no trained footprint exists to test membership against).
  • in_best (NDArray[np.bool_] | None): Whether each instance falls in "best" footprint for each algorithm. Shape: (n_instances, n_algorithms). None if TRACE not applied. Same new-algorithm-column convention as in_good.
  • inst_labels (pd.Series): Instance labels/identifiers from the test metadata.
  • y_actual (NDArray[np.bool_] | None): Ground-truth binary good/bad label per algorithm, derived from test_metadata's own algo_* performance columns using the trained PerformanceOptions. Shape: (n_instances, n_algorithms). None when the test set carries no algorithm performance columns at all (the feature-only case - existing callers see no change).
  • y_best_actual (NDArray[np.double] | None): Best observed ground-truth performance per instance. Shape: (n_instances,). None under the same condition as y_actual.
  • p_actual (NDArray[np.int_] | None): 1-based index of the best-performing algorithm per instance, ties broken with MATLAB-compatible seeded random selection. Shape: (n_instances,). None under the same condition as y_actual.
  • beta_actual (NDArray[np.bool_] | None): Whether each instance clears the beta threshold's fraction of good algorithms. Shape: (n_instances,). None under the same condition as y_actual.
  • accuracy_actual (NDArray[np.double] | None): Per-algorithm accuracy of PYTHIA's trained classifiers against y_actual. Shape: (n_algorithms,). NaN for an algorithm absent from the test set's ground truth, or a test-set-only algorithm with no trained classifier to score (both "no CV model", matching MATLAB's convention). None under the same condition as y_actual.
  • precision_actual (NDArray[np.double] | None): Per-algorithm precision, same shape/NaN convention as accuracy_actual.
  • recall_actual (NDArray[np.double] | None): Per-algorithm recall, same shape/NaN convention as accuracy_actual.
  • cvcmat_actual (NDArray[np.double] | None): Per-algorithm confusion matrix [tn, fp, fn, tp] against y_actual. Shape: (n_algorithms, 4). NaN row under the same conditions as accuracy_actual. None under the same condition as y_actual.
  • algo_labels (list[str] | None): The full algorithm order (trained algorithms, then any test-set-only algorithm absent from training, in first-encountered order) that y_hat/pr0_hat/in_good/in_best/accuracy_actual/etc.'s per-algorithm columns index into (including new test-set algorithms) - needed to interpret those columns once new algorithms widen them beyond Model.data.algo_labels' own length. None under the same condition as y_actual (when there's no ground truth, column order is implicitly Model.data.algo_labels and never widened).
  • trace_out (TraceOut | None): Trained TRACE geometry rescored against this test set's ground truth. Geometry and area remain unchanged; evidence metrics are updated. It is None for feature-only explore data.
ExploreResult( dataset_id: str, timestamp: datetime.datetime, x: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], z: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], y_hat: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]] | None, pr0_hat: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None, selection0: numpy.ndarray[typing.Any, numpy.dtype[numpy.int64]] | None, in_good: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]] | None, in_best: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]] | None, inst_labels: pandas.core.series.Series, y_actual: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]] | None = None, y_best_actual: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None = None, p_actual: numpy.ndarray[typing.Any, numpy.dtype[numpy.int64]] | None = None, beta_actual: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]] | None = None, accuracy_actual: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None = None, precision_actual: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None = None, recall_actual: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None = None, cvcmat_actual: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None = None, algo_labels: list[str] | None = None, trace_out: TraceOut | None = None)
dataset_id: str
timestamp: datetime.datetime
x: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
z: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]
y_hat: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]] | None
pr0_hat: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None
selection0: numpy.ndarray[typing.Any, numpy.dtype[numpy.int64]] | None
in_good: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]] | None
in_best: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]] | None
inst_labels: pandas.core.series.Series
y_actual: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]] | None = None
y_best_actual: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None = None
p_actual: numpy.ndarray[typing.Any, numpy.dtype[numpy.int64]] | None = None
beta_actual: numpy.ndarray[typing.Any, numpy.dtype[numpy.bool_]] | None = None
accuracy_actual: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None = None
precision_actual: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None = None
recall_actual: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None = None
cvcmat_actual: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None = None
algo_labels: list[str] | None = None
trace_out: TraceOut | None = None
@dataclass(frozen=True)
class FeatSel:

Holds indices for feature selection.

FeatSel(idx: numpy.ndarray[typing.Any, numpy.dtype[numpy.int32]])
idx: numpy.ndarray[typing.Any, numpy.dtype[numpy.int32]]
@classmethod
def from_stage_runner_output(cls: type[~T], stage_runner_output: dict[str, typing.Any]) -> ~T:

Initialize a FeatSel object from the output of an InstanceSpace StageRunner.

Parameters
  • cls (type[T]): The class.
  • stage_runner_output (dict[str, Any]): The output of the StageRunner for an InstanceSpace.
Returns
  • FeatSel: The FeatSel object.