ncaa_eval.evaluation.kaggle_export module

Kaggle March Machine Learning Mania submission CSV export.

Generates a CSV string with ID,Pred columns covering all C(n,2) pairwise matchups for men’s D1 teams in a given season. The ID column uses Kaggle format YYYY_TeamID1_TeamID2 (lower ID first) and Pred is the win probability for TeamID1.

ncaa_eval.evaluation.kaggle_export.format_kaggle_submission(season: int, team_ids: Sequence[int], prob_matrix: ndarray[tuple[Any, ...], dtype[float64]]) str[source]

Format a probability matrix as a Kaggle submission CSV string.

Parameters:
  • season – Tournament season year (e.g. 2025).

  • team_ids – Team IDs corresponding to matrix rows/columns.

  • prob_matrix – n×n pairwise probability matrix where P[i,j] is P(team_ids[i] beats team_ids[j]).

Returns:

CSV string with header ID,Pred and C(n,2) data rows.

Raises:

ValueError – If the matrix shape doesn’t match the team count.