bioneuralnet.metrics.correlation¶
Functions
|
Builds a new correlation network from an extracted cluster/subnetwork. |
|
Computes the Pearson correlation coefficient between PC1 of a cluster and phenotype. |
|
Retrieves a global logger configured to write to 'bioneuralnet.log'. |
|
Computes the Pearson correlation between the first principal component of omics data and a phenotype. |
|
Pearson correlation coefficient and p-value for testing non-correlation. |
Classes
|
Principal component analysis (PCA). |
|
Standardize features by removing the mean and scaling to unit variance. |
- bioneuralnet.metrics.correlation.cluster_correlation(louvain_cluster: DataFrame) DataFrame[source]¶
Builds a new correlation network from an extracted cluster/subnetwork.
This function is often used as an intermediate step between HybridLouvain and plotting. It allows the subnetwork to reveal its internal topological structure by computing the Pearson correlation of node connectivity profiles.
- Parameters:
louvain_cluster (pd.DataFrame) – Represents an induced subnetwork.
- Returns:
Adjacency matrix.
- Return type:
pd.DataFrame
- bioneuralnet.metrics.correlation.cluster_pca_correlation(cluster_df: DataFrame, pheno: DataFrame) tuple[source]¶
Computes the Pearson correlation coefficient between PC1 of a cluster and phenotype.
- Parameters:
cluster_df (pd.DataFrame) – DataFrame representing a cluster of samples.
pheno (pd.DataFrame) – DataFrame representing the phenotype.
- Returns:
(cluster_size, correlation) or (size, None) if correlation fails.
- Return type: