Skip to content
Testaroo
json264 B

Confusion Matrix: 3-class (JSON)

The same 3-class confusion matrix as JSON: a labels array plus a nested counts matrix. The structured twin of the CSV, for testing evaluation tooling.

Preview, first 26 linesjson
{
  "labels": [
    "person",
    "car",
    "tree"
  ],
  "matrix": [
    [
      48,
      3,
      1
    ],
    [
      4,
      51,
      2
    ],
    [
      2,
      1,
      44
    ]
  ],
  "layout": "rows=actual, cols=predicted"
}

Specifications

Classes
3
Labels
person, car, tree
Layout
rows = actual, columns = predicted

Testing contract

Expected to pass
Scenario
Exercise Confusion Matrix: 3-class (JSON) in its eval workflow. The same 3-class confusion matrix as JSON: a labels array plus a nested counts matrix.
Expected result
top-level keys are labels, matrix, layout; array lengths: labels=3, matrix=3. Declared feature checks: classes=3; labels=person, car, tree; layout=rows = actual, columns = predicted. The declared comparison counterpart is ai-eval-confusion-csv; preserve the stated difference instead of expecting the container bytes to match.

What is a .json file?

JSON (JavaScript Object Notation) is a lightweight, text-based data-interchange format representing objects, arrays, strings, numbers, booleans, and null. It is language-independent, human-readable, and the dominant format for web APIs and configuration. It requires a single well-formed root value.

How to use this file

Use an example JSON file to test parsers and serializers, schema validation, Unicode and number-precision handling, and API request or response processing.

How to use this file for testing

“Confusion Matrix: 3-class (JSON)” is a deterministic Testaroo fixture for Model evaluation, JSON parsing, Conversion testing. Benchmark results, confusion matrices, ROC curves, and classification reports in CSV and JSON, for testing eval dashboards, metric parsers, and leaderboard importers.

Documented properties for this file: JSON · 264 bytes. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such, expect parsers to fail loudly rather than silently accept them.

AI/ML fixtures are fully synthetic with documented schemas, no real people or data. Test data loaders, tokenizers, annotation converters, embedding/vector stores, or eval-metric parsers against the known structure and fixed seeds.

Code examples

import json

with open("confusion-matrix.json") as f:
    data = json.load(f)
print(type(data), len(data))

Generated by generation/ai_datasets.py. Free for any use, no attribution required, license.