deeprvat.metrics
Module Contents
Classes
Calculates the R-squared (coefficient of determination) between predictions and targets. |
|
Calculates the Pearson correlation coefficient between burdens and targets. |
|
Calculates the Pearson correlation coefficient between burdens and targets using PyTorch tensor operations. |
|
Calculates the average precision score between logits and targets. |
Data
API
- deeprvat.metrics.logger = 'getLogger(...)'
- class deeprvat.metrics.RSquared
Calculates the R-squared (coefficient of determination) between predictions and targets.
Initialization
- __call__(preds: torch.tensor, targets: torch.tensor)
Calculate R-squared value between two tensors.
- Parameters:
preds (torch.tensor) – Tensor containing predicted values.
targets (torch.tensor) – Tensor containing target values.
- Returns:
R-squared value.
- Return type:
torch.tensor
- class deeprvat.metrics.PearsonCorr
Calculates the Pearson correlation coefficient between burdens and targets.
Initialization
- __call__(burden, y)
Calculate Pearson correlation coefficient.
- Parameters:
burden (torch.tensor) – Tensor containing burden values.
y (torch.tensor) – Tensor containing target values.
- Returns:
Pearson correlation coefficient.
- Return type:
float
- class deeprvat.metrics.PearsonCorrTorch
Calculates the Pearson correlation coefficient between burdens and targets using PyTorch tensor operations.
Initialization
- __call__(burden, y)
Calculate Pearson correlation coefficient using PyTorch tensor operations.
- Parameters:
burden (torch.tensor) – Tensor containing burden values.
y (torch.tensor) – Tensor containing target values.
- Returns:
Pearson correlation coefficient.
- Return type:
torch.tensor
- calculate_pearsonr(x, y)
- class deeprvat.metrics.AveragePrecisionWithLogits
Calculates the average precision score between logits and targets.
Initialization
- __call__(logits, y)
Calculate average precision score.
- Parameters:
logits (torch.tensor) – Tensor containing logits.
y (torch.tensor) – Tensor containing target values.
- Returns:
Average precision score.
- Return type:
float