Utils

Complementary methods for prediction analysis.

Utilities for prediction.

pathway_forte.prediction.utils.pca_chaining(train, test, n_components)[source]

Chain PCA with logistic regression.

Parameters
  • train (pandas.core.frame.DataFrame) – Training set to apply dimensionality reduction to

  • test (pandas.core.series.Series) – Test set to apply dimensionality reduction to

  • n_components – Amount of variance retained

Return type

Tuple

Returns

array-like, shape (n_samples, n_components)