Skip to content
Novus Examples
json588 B

Classification Report (JSON)

A per-class classification report in the scikit-learn structure — precision, recall, F1, and support for each class plus accuracy and macro/weighted averages. A fixture for testing metric parsers and report renderers.

Preview — first 34 linesjson
{
  "person": {
    "precision": 0.889,
    "recall": 0.923,
    "f1-score": 0.906,
    "support": 52
  },
  "car": {
    "precision": 0.927,
    "recall": 0.895,
    "f1-score": 0.911,
    "support": 57
  },
  "tree": {
    "precision": 0.936,
    "recall": 0.936,
    "f1-score": 0.936,
    "support": 47
  },
  "accuracy": 0.917,
  "macro avg": {
    "precision": 0.917,
    "recall": 0.918,
    "f1-score": 0.918,
    "support": 156
  },
  "weighted avg": {
    "precision": 0.917,
    "recall": 0.917,
    "f1-score": 0.917,
    "support": 156
  }
}

Specifications

Classes
3
Metrics
precision, recall, f1-score, support
Accuracy
0.917

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.

Code examples

import json

with open("classification-report.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.