Skip to content
Back to skills

Gaussian Log Likelihood Metric

ASecurity

Evaluate probabilistic forecasts using normalized Gaussian log-likelihood relative to naive and oracle baselines, scoring both mean accuracy and uncertainty calibration

  • 61 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 12, 2026
datapython

Works with

  • cli

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add wenmin-wu/ds-skills --skill gaussian-log-likelihood-metric --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Gaussian Log Likelihood Metric?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Gaussian Log Likelihood Metric
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wenmin-wu-gaussian-log-likelihood-metric/badge)](https://www.skillsdirectory.com/skills/wenmin-wu-gaussian-log-likelihood-metric)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: timeseries-gaussian-log-likelihood-metric
description: Evaluate probabilistic forecasts using normalized Gaussian log-likelihood relative to naive and oracle baselines, scoring both mean accuracy and uncertainty calibration
domain: timeseries
---

# Gaussian Log-Likelihood Metric

## Overview

For regression tasks requiring uncertainty estimates, score predictions using Gaussian log-likelihood normalized between a naive baseline and an oracle. The metric rewards both accurate mean predictions AND well-calibrated uncertainty (sigma). Overconfident predictions (small sigma, wrong mean) are penalized heavily. Score ranges from 0 (= naive) to 1 (= oracle).

## Quick Start

```python
import numpy as np
from scipy.stats import norm

def gaussian_log_likelihood_score(y_true, y_pred, sigma_pred,
                                   naive_mean, naive_sigma, sigma_true):
    """Normalized Gaussian log-likelihood metric.
    
    Args:
        y_true: ground truth values (n_samples, n_targets)
        y_pred: predicted means (n_samples, n_targets)
        sigma_pred: predicted uncertainties (n_samples, n_targets)
        naive_mean: baseline mean prediction (n_targets,)
        naive_sigma: baseline uncertainty (n_targets,)
        sigma_true: oracle uncertainty (n_samples, n_targets)
    Returns:
        score in [0, 1] where 1 is perfect
    """
    sigma_pred = np.clip(sigma_pred, 1e-15, None)
    
    gll_pred = np.sum(norm.logpdf(y_true, loc=y_pred, scale=sigma_pred))
    gll_oracle = np.sum(norm.logpdf(y_true, loc=y_true, scale=sigma_true))
    gll_naive = np.sum(norm.logpdf(y_true, loc=naive_mean, scale=naive_sigma))
    
    score = (gll_pred - gll_naive) / (gll_oracle - gll_naive)
    return float(np.clip(score, 0.0, 1.0))
```

## Key Decisions

- **Normalized**: 0 = naive baseline, 1 = oracle; interpretable across datasets
- **Clip sigma**: floor at 1e-15 to prevent -inf from log(0)
- **Joint scoring**: penalizes overconfidence — can't game it with small sigma
- **Naive baseline**: typically training set mean and std per target

## References

- Source: [neurips-adc-25-intro-training](https://www.kaggle.com/code/ahsuna123/neurips-adc-25-intro-training)
- Competition: NeurIPS - Ariel Data Challenge 2025

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.