Skip to main content

Model Findings

TODO:

  • scatter plot
  • heatmap
  • numbered list
  • grouped bar chart

model_findings.json is the configuration file that defines the structure and content of insights generated by your machine learning model. It specifies visualization types, sections, subsections, and items to be displayed in the Chanterelle platform.

Table of Contents

Overview

The model_findings.json file describes:

  • Visualization types supported by the platform
  • Sections and their configurations
  • Subsections for dropdown functionality
  • Insight items with detailed specifications

Basic Structure

A model_findings.json file follows this JSON schema:

{
"model_id": "example-model",
"version": "1.0.0",
"content": [
{
"type": "section",
"id": "section1",
"title": "Example Section",
"items": [
{
"type": "bar_chart",
"id": "chart1",
"title": "Example Bar Chart",
"data": {
"bars": [
{ "label": "A", "value": 10 },
{ "label": "B", "value": 20 }
],
"axis": {
"x": { "label": "Categories" },
"y": { "label": "Values" }
}
}
}
]
}
]
}

Visualization Types

Supported visualization types include:

  • bar_chart
  • line_chart
  • scatter
  • histogram
  • heatmap
  • table
  • text
  • bullet_list
  • numbered_list
  • text_section
  • insight_cards
  • grouped_bar_chart
  • image

Each type has specific fields and configurations. Below are examples for each type:

Bar Chart

{
"type": "bar_chart",
"id": "chart1",
"title": "Example Bar Chart",
"data": {
"bars": [
{ "label": "A", "value": 10 },
{ "label": "B", "value": 20 }
],
"axis": {
"x": { "label": "Categories" },
"y": { "label": "Values" }
}
}
}

Line Chart

{
"type": "line_chart",
"id": "line1",
"title": "Example Line Chart",
"data": {
"lines": [
{
"id": "lineA",
"points": [
{ "x": 1, "y": 10 },
{ "x": 2, "y": 20 }
]
}
],
"axis": {
"x": { "label": "Time" },
"y": { "label": "Values" }
}
}
}

Scatter

{
"type": "scatter",
"id": "scatter1",
"title": "Example Scatter Plot",
"data": {
"points": [
{ "x": 1, "y": 10 },
{ "x": 2, "y": 20 }
],
"axis": {
"x": { "label": "X-axis" },
"y": { "label": "Y-axis" }
}
}
}

Histogram

{
"type": "histogram",
"id": "histogram1",
"title": "Example Histogram",
"data": {
"bins": [
{ "label": "Bin 1", "value": 10 },
{ "label": "Bin 2", "value": 20 }
],
"axis": {
"x": { "label": "Bins" },
"y": { "label": "Frequency" }
}
}
}

Heatmap

{
"type": "heatmap",
"id": "heatmap1",
"title": "Example Heatmap",
"data": {
"matrix": [
[1, 2],
[3, 4]
],
"axis": {
"x": { "label": "X-axis" },
"y": { "label": "Y-axis" }
}
}
}

Table

{
"type": "table",
"id": "table1",
"title": "Example Table",
"data": {
"columns": [
{ "header": "Column 1", "field": "col1" },
{ "header": "Column 2", "field": "col2" }
],
"rows": [
{ "col1": "Row 1", "col2": 10 },
{ "col1": "Row 2", "col2": 20 }
]
}
}

Text

{
"type": "text",
"id": "text1",
"title": "Example Text",
"text": "This is a sample text insight."
}

Bullet List

{
"type": "bullet_list",
"id": "bullet1",
"title": "Example Bullet List",
"data": {
"bullets": [
{ "text": "Bullet 1" },
{ "text": "Bullet 2" }
]
}
}

Numbered List

{
"type": "numbered_list",
"id": "numbered1",
"title": "Example Numbered List",
"data": {
"items": [
{ "text": "Item 1" },
{ "text": "Item 2" }
]
}
}

Text Section

{
"type": "text_section",
"id": "textsection1",
"title": "Example Text Section",
"text": "This is a detailed text section."
}

Insight Cards

{
"type": "insight_cards",
"id": "cards1",
"title": "Example Insight Cards",
"data": {
"cards": [
{ "title": "Card 1", "description": "Description 1" },
{ "title": "Card 2", "description": "Description 2" }
]
}
}

Grouped Bar Chart

{
"type": "grouped_bar_chart",
"id": "grouped1",
"title": "Example Grouped Bar Chart",
"data": {
"groups": [
{
"label": "Group 1",
"bars": [
{ "label": "A", "value": 10 },
{ "label": "B", "value": 20 }
]
}
],
"axis": {
"x": { "label": "Groups" },
"y": { "label": "Values" }
}
}
}

Image

{
"type": "image",
"id": "image1",
"title": "Example Image",
"url_filename": "example.png",
"caption": "This is an example image."
}

Sections

Sections group related insights and can include:

  • id: Unique identifier
  • title: Display name
  • description: Optional help text
  • items: Array of insight items
  • dropdown: Configuration for dropdown menus
  • subsections: Nested subsections

Example Section

{
"type": "section",
"id": "section1",
"title": "Example Section",
"description": "This is an example section.",
"items": [
{
"type": "text",
"id": "text1",
"title": "Example Text",
"text": "This is a sample text insight."
}
]
}

Subsections

Subsections allow dropdown functionality within sections. Each subsection includes:

  • items: Array of insight items
  • items_per_row: Optional layout configuration

Example Subsection

{
"subsections": {
"subsection1": {
"items": [
{
"type": "image",
"id": "image1",
"title": "Example Image",
"url_filename": "example.png"
}
],
"items_per_row": 2
}
}
}

Insight Items

Insight items represent individual visualizations or data points. Supported types include:

  • bar_chart
  • line_chart
  • table
  • bullet_list
  • image
  • text
  • error

Example Insight Item

{
"type": "table",
"id": "table1",
"title": "Example Table",
"data": {
"columns": [
{ "header": "Column 1", "field": "col1" },
{ "header": "Column 2", "field": "col2" }
],
"rows": [
{ "col1": "Row 1", "col2": 10 },
{ "col1": "Row 2", "col2": 20 }
]
}
}

Complete Examples

Full Configuration

{
"model_id": "example-model",
"version": "1.0.0",
"content": [
{
"type": "section",
"id": "section1",
"title": "Example Section",
"items": [
{
"type": "bar_chart",
"id": "chart1",
"title": "Example Bar Chart",
"data": {
"bars": [
{ "label": "A", "value": 10 },
{ "label": "B", "value": 20 }
],
"axis": {
"x": { "label": "Categories" },
"y": { "label": "Values" }
}
}
}
]
}
]
}