qxmt.datasets.transform package#
Submodules#
qxmt.datasets.transform.reduction_by_pca module#
- qxmt.datasets.transform.reduction_by_pca.dimension_reduction_by_pca(X_train, y_train, X_val, y_val, X_test, y_test, n_components, random_seed=None)#
Dimension reduction by PCA
- Parameters:
X_train (np.ndarray) – numpy array of training data
y_train (np.ndarray) – numpy array of training label
X_val (Optional[np.ndarray]) – numpy array of validation data. None if validation set is not used
y_val (Optional[np.ndarray]) – numpy array of validation data. None if validation set is not used
X_test (np.ndarray) – numpy array of testing data
y_test (np.ndarray) – numpy array of testing label
n_components (int) – number of components to keep
random_seed (int | None)
- Returns:
tuple of processed dataset
- Return type:
PROCESSCED_DATASET_TYPE