{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/predixsport-com/json-schema/predixsport-com-nbaplayer-projection-schema.json",
  "title": "NBAPlayerProjection",
  "description": "Per-player projections for an NBA match. Sourced from\n``nba_player_predictions``.\n\nSince September 2026 the row set is the projected ROSTER of each team,\naround 19 names a side, not the expected starting five, and twelve\nstats are projected instead of four. Every field added at that point\nis nullable and absent from rows written earlier, so a match predicted\nbefore the rollout still answers with the original four heads.\n\nHOW TO READ THE NUMBERS. All twelve models beat a naive rolling\naverage on the distribution. Five of them (points, rebounds, field\ngoals made, field goals attempted, NBA Salary Cap points) also beat it\non single-number error and can be used as point estimates. For the\nother seven (assists, three-pointers made, steals, blocks, turnovers,\nfree throws made, free throws attempted) use the distribution or a\nquantile band rather than the expectation alone.\n\nWHAT IS NOT HERE, BY DESIGN: no probability that a player features, no\ninjury or availability data of any kind. Availability is represented\nonly by ``started`` and ``projection_mode``, which describe the\npublished lineup of the day and nothing else.",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/predixsport-com-openapi.json#/components/schemas/NBAPlayerProjection",
  "properties": {
    "name": {
      "type": "string",
      "title": "Name"
    },
    "team": {
      "type": "string",
      "title": "Team"
    },
    "is_home": {
      "type": "boolean",
      "title": "Is Home"
    },
    "position": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Position",
      "description": "Rank slot inside the published starting five, 1 to 5, and 0 for a roster player outside it or for a projection made with no published lineup. It is NOT a listed basketball position: read ``listed_position`` and ``court`` for that."
    },
    "expected_points": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Points"
    },
    "expected_rebounds": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Rebounds"
    },
    "expected_assists": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Assists"
    },
    "expected_three_pointers_made": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Three Pointers Made",
      "description": "Expected three-pointers made."
    },
    "points_distribution": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Points Distribution"
    },
    "rebounds_distribution": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rebounds Distribution"
    },
    "assists_distribution": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Assists Distribution"
    },
    "three_pointers_made_distribution": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Three Pointers Made Distribution"
    },
    "expected_steals": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Steals"
    },
    "steals_distribution": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Steals Distribution"
    },
    "expected_blocks": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Blocks"
    },
    "blocks_distribution": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Blocks Distribution"
    },
    "expected_turnovers": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Turnovers"
    },
    "turnovers_distribution": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Turnovers Distribution"
    },
    "expected_field_goals_made": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Field Goals Made"
    },
    "field_goals_made_distribution": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Field Goals Made Distribution"
    },
    "expected_field_goals_attempted": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Field Goals Attempted"
    },
    "field_goals_attempted_distribution": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Field Goals Attempted Distribution"
    },
    "expected_free_throws_made": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Free Throws Made"
    },
    "free_throws_made_distribution": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Free Throws Made Distribution"
    },
    "expected_free_throws_attempted": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Free Throws Attempted"
    },
    "free_throws_attempted_distribution": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Free Throws Attempted Distribution"
    },
    "expected_nba_salary_cap_points": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Nba Salary Cap Points",
      "description": "Expected NBA Salary Cap fantasy score (points + rebounds + 2 x assists + 3 x blocks + 3 x steals) from a model trained on that total directly, not from summing the component models. It is the only projected total with a distribution of its own."
    },
    "nba_salary_cap_points_distribution": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Nba Salary Cap Points Distribution"
    },
    "started": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Started",
      "description": "True when the player is in the team's published starting five for this game, false when a lineup was published and he is not in it, null when no lineup had been published at projection time. Null is a real state here, not a missing value. This is the published lineup and nothing more: it is not a chance of playing and carries no injury information."
    },
    "projection_mode": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Projection Mode",
      "description": "gameday (a lineup was published), gameday_no_lineup (the whole roster projected without one) or calendar (a lineup-free projection for a game later in the week). Null for rows written before the full-roster rollout."
    },
    "row_source": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Row Source",
      "description": "Where the roster row came from: box_score, roster_union or published_lineup."
    },
    "low_confidence": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Low Confidence",
      "description": "True when this row rests on a thin recent record, typically a roster player with no recent appearance. The row is published flagged rather than dropped."
    },
    "listed_position": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Listed Position",
      "description": "Listed basketball position, e.g. PG, SG, SF, PF, C, G-F."
    },
    "court": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Court",
      "description": "BC for backcourt or FC for frontcourt, derived from the first token of listed_position. Fantasy formats that require a backcourt and frontcourt split use it."
    },
    "fantasy": {
      "anyOf": [
        {
          "$ref": "#/$defs/NBAFantasyScore"
        },
        {
          "type": "null"
        }
      ],
      "description": "Projected score for the scoring preset named in the request's ``preset`` parameter. Absent when no preset was requested."
    }
  },
  "type": "object",
  "required": [
    "name",
    "team",
    "is_home"
  ],
  "$defs": {
    "NBAFantasyCategory": {
      "properties": {
        "key": {
          "type": "string",
          "title": "Key"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Value"
        },
        "lower_is_better": {
          "type": "boolean",
          "title": "Lower Is Better",
          "default": false
        },
        "ratio_of_means": {
          "type": "boolean",
          "title": "Ratio Of Means",
          "description": "True for FG% and FT%, which are the ratio of two projected averages rather than a projected percentage. The distinction matters: the expected ratio is not the ratio of expectations.",
          "default": false
        }
      },
      "type": "object",
      "required": [
        "key",
        "label"
      ],
      "title": "NBAFantasyCategory",
      "description": "One Yahoo 9-category value for a player."
    },
    "NBAFantasyScore": {
      "properties": {
        "preset": {
          "type": "string",
          "title": "Preset"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "expectation": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Expectation",
          "description": "The projected score for this preset. For nba_salary_cap it is the model trained on that total itself, which is the number every Predixsport surface prints and ranks by. For every other points preset it is the preset's scoring formula applied to the component projections, exact for the average by linearity whatever the dependence between the individual stats. Null when any stat the formula needs is missing for this player: a partial total would understate him with nothing here to say so. Always null for yahoo_9cat, which is a per-category league with no single score."
        },
        "expectation_source": {
          "type": "string",
          "title": "Expectation Source",
          "description": "Which of the two readings ``expectation`` holds: ``direct_model`` for a preset scored by a model trained on its own total (nba_salary_cap), ``component_formula`` for the linear combination of the component projections, ``none`` when no score could be formed.",
          "default": "none"
        },
        "formula_expectation": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Formula Expectation",
          "description": "The preset formula applied to the component projections, published alongside ``expectation`` for nba_salary_cap so the two readings of the same total can be compared. It is a cross-check, not a second score: the served number is ``expectation``. Null for every other preset, where the two would be the same value."
        },
        "distribution_quantiles": {
          "anyOf": [
            {
              "additionalProperties": {
                "type": "number"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Distribution Quantiles",
          "description": "Quantiles p10/p25/p50/p75/p90 of the score. Present for nba_salary_cap only, because it is the one preset with a model trained on the total itself. No composite distribution is claimed for the others: a sum of dependent counts is not the convolution of the marginals."
        },
        "categories": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/NBAFantasyCategory"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Categories",
          "description": "Per-category values. Present for yahoo_9cat only."
        }
      },
      "type": "object",
      "required": [
        "preset",
        "label"
      ],
      "title": "NBAFantasyScore",
      "description": "Projected fantasy score for the requested scoring preset."
    }
  }
}