sispca.data

Classes

Supervision

Custom data class for variable used as supervision.

SISPCADataset

Custom dataset for supervised independent subspace PCA (sisPCA).

Module Contents

class sispca.data.Supervision(target_data, target_type, target_name=None, target_kernel=None)

Custom data class for variable used as supervision.

Parameters:
  • target_data (2D tensor or ndarray) – (n_sample, n_dim_target). The target data used as supervision.

  • target_type (str) – One of [‘continuous’, ‘categorical’, ‘custom’]. The type of the target data. If ‘custom’, the target_kernel should be provided.

  • target_name (str) – The name of the target data.

  • target_kernel (2D tensor) – (n_sample, n_sample). Optional. The kernel matrix of the target data. Once provided, the target_data will be ignored.

target_data
target_type
target_name = None
target_kernel = None
n_sample
_sanity_check()
_calc_kernel()

Calculate the kernel matrix of the target data.

class sispca.data.SISPCADataset(data, target_supervision_list: List[Supervision])

Bases: torch.utils.data.Dataset

Custom dataset for supervised independent subspace PCA (sisPCA).

Parameters:
  • data (2D tensor) – (n_sample, n_feature). Data to run sisPCA on.

  • target_supervision_list (list of Supervision) – List of Supervision objects.

x
n_sample
n_feature
target_supervision_list
n_target
target_data_list
target_kernel_list
target_name_list
__len__()
__getitem__(idx)