API Reference

Wrappers

Module: sklearn_xarray

wrap

Wrap an sklearn estimator for xarray objects.

ClassifierWrapper

A wrapper around sklearn classifiers compatible with xarray objects.

RegressorWrapper

A wrapper around sklearn regressors compatible with xarray objects.

TransformerWrapper

A wrapper around sklearn transformers compatible with xarray objects.

Target

Module: sklearn_xarray

Target

A pointer to xarray coordinates or variables to be used as a target.

Pre-processing

Module: sklearn_xarray.preprocessing

Object interface:

Concatenator

Concatenate variables along a dimension.

Featurizer

Stack all dimensions and variables except for sample dimension.

Reducer

Reduce data along some dimension.

Resampler

Resample along some dimension.

Sanitizer

Remove elements containing NaNs.

Segmenter

Split into segments along some dimension.

Selector

Selects a subset of the samples.

Splitter

Split along some dimension.

Transposer

Reorder data dimensions.

Functional interface:

concatenate

Concatenates variables along a dimension.

featurize

Stacks all dimensions and variables except for sample dimension.

preprocess

Wraps preprocessing functions from sklearn for use with xarray types.

reduce

Reduces data along some dimension.

resample

Resamples along some dimension.

sanitize

Removes elements containing NaNs.

segment

Segments X along some dimension.

select

Selects a subset of the samples.

split

Splits X along some dimension.

transpose

Reorders data dimensions.

Model selection

Module: sklearn_xarray.model_selection

CrossValidatorWrapper

Wrap an sklearn cross validator for use with xarray.

Utility functions

Module: sklearn_xarray.utils

convert_to_ndarray

Convert xarray DataArray or Dataset to numpy ndarray.

get_group_indices

Get logical index vectors for each group.

segment_array

Segment an array along some axis.

is_dataarray

Check whether an object is a DataArray.

is_dataset

Check whether an object is a Dataset.

is_target

Check whether an object is a Target.

Datasets

Module: sklearn_xarray.datasets

load_dummy_dataarray

Load a DataArray for demonstration purposes.

load_dummy_dataset

Load a Dataset for demonstration purposes.

load_digits_dataarray

Load a the ‘digits’ dataset from sklearn as a DataArray.

load_wisdm_dataarray

Load the WISDM activity recognition dataset.

List of modules