@model-match/api 3.79.0 → 3.79.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/RELEASE_NOTES.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Changes to `@model-match/api` that affect how you use it. Each version is generated from the ModelMatch API's OpenAPI spec, so new endpoints and fields appear in the [API reference](https://docs.modelmatch.com/developers) as they ship.
4
4
 
5
+ ## 3.79.1
6
+
7
+ - Regenerated from the latest API spec. No changes to the client itself.
8
+
5
9
  ## 3.79.0
6
10
 
7
11
  - **Studio: a slow question is no longer stopped — it carries on in the background.**
@@ -13863,6 +13863,10 @@ type StudioCatalog = {
13863
13863
  */
13864
13864
  type: string;
13865
13865
  }>;
13866
+ /**
13867
+ * For a market table: the last day (YYYY-MM-DD) its records are treated as fully recorded. Later months are still filling in, so end trends and year-over-year windows here, not at today, and compare the same months of each year.
13868
+ */
13869
+ completeThrough?: string;
13866
13870
  /**
13867
13871
  * What part of the data is available, when not all of it.
13868
13872
  */
@@ -14273,7 +14277,7 @@ type StudioJobSaved = {
14273
14277
  type StudioModel = {
14274
14278
  asOf: string;
14275
14279
  /**
14276
- * The report card (`ready` and `refused`). Read it to the person as it is written; do not round it up. `headline` — one sentence. `learnedFrom` — how many past cases and over what dates, and the later cases it was tested on. `lift.top10` (and `lift.top1` on large tests) — `modelPer100`, `randomPer100`, `bestSimpleRulePer100` and a ready-made `sentence`. `checks` — three, each `passed` true or false: beats the best simple rule, finds nothing when the outcomes are shuffled, holds up across time periods. `dataPoints.ranking` — each data point with its share and a verdict (`strongest`, `helped`, `helped_a_little`, `added_little`), and `dataPoints.summary`. `comparison` — the person's picks against every available data point, which did better, and `worthAdding`. `changeFromPrevious` — what changed since the version it replaced or was based on. `calibration.calibrated` — only when true may `estimatedChance` be called a chance; otherwise scores are a ranking. `caveats` — say them. `refusal` — `reason` and `whatWouldHelp` when refused.
14280
+ * The report card (`ready` and `refused`). Read it to the person as it is written; do not round it up. Show the sentences and the fields named `label`, `…Label`, `sentence`, `detail`, `reason`, `summary` and `note`: they are written in plain words. The fields named `id`, `code`, `verdict`, `better`, `kind`, `table` and `column`, and everything under `technical` and `details`, are for programs: never show them to a person (say `verdictLabel` "helped a little", not `verdict` `helped_a_little`). `headline` — one sentence. `outcome.label` — what it predicts. `learnedFrom` — how many past cases and over what dates, and the later cases it was tested on; for a model on the person's own outcomes, `learnedFrom.funnel` — the rows in their file, then how many had a date and an outcome, matched a home, had history before their date and were used, each with the reason rows were dropped (`funnel.sentence` says it in one line). `lift.top10` (and `lift.top1` on large tests) — `modelPer100`, `randomPer100`, `bestSimpleRulePer100` and a ready-made `sentence`. `checks` — three, each `passed` true or false, with a `label` and a `detail`: beats the best simple rule, finds nothing when the outcomes are shuffled, holds up across time periods. `dataPoints.ranking` — each data point's `label`, its share, a `verdictLabel` and a `sentence`, and `dataPoints.summary`. `comparison` — the person's picks against every available data point (`sentence`, `betterLabel`) and `worthAdding`. `changeFromPrevious.sentence` — what changed since the version it replaced or was based on. `calibration.calibrated` — only when true may a home's estimated chance be called a chance; otherwise scores are a ranking; `calibration.note` says it. `caution` — when present, say it first. `caveats` — say them. `refusal` — `reason` and `whatWouldHelp` when refused.
14277
14281
  */
14278
14282
  card: {
14279
14283
  [key: string]: unknown;
@@ -14285,6 +14289,17 @@ type StudioModel = {
14285
14289
  code: string;
14286
14290
  message: string;
14287
14291
  };
14292
+ /**
14293
+ * While a run is going (training, or a refresh): how long a run like it takes from start to finish, in minutes. It depends on the size of the state: a couple of minutes for a small one, 15 to 25 for the largest. An estimate. Null when nothing is running.
14294
+ */
14295
+ expectedMinutes?: {
14296
+ high: number;
14297
+ low: number;
14298
+ };
14299
+ /**
14300
+ * The data points by their plain labels, in the same order as `features`.
14301
+ */
14302
+ featureLabels?: Array<string>;
14288
14303
  features: Array<StudioModelDataPoint>;
14289
14304
  /**
14290
14305
  * True when the data points were picked; false when the model uses every market data point.
@@ -14294,6 +14309,10 @@ type StudioModel = {
14294
14309
  name: string;
14295
14310
  nextRunAt: string;
14296
14311
  outcome: string;
14312
+ /**
14313
+ * What the model predicts, in plain words. Show a person this, `populationLabel` and `featureLabels`; `outcome`, `population` and `features` are the request's own values, for programs.
14314
+ */
14315
+ outcomeLabel?: string;
14297
14316
  outcomeSource: {
14298
14317
  /**
14299
14318
  * The date of each row: the day you would have wanted the prediction (for example the day the lead came in). It must be a date column. Only what was on record before it is used to learn.
@@ -14315,16 +14334,51 @@ type StudioModel = {
14315
14334
  };
14316
14335
  population: StudioModelPopulation;
14317
14336
  /**
14318
- * What a training run is doing right now.
14337
+ * Who is scored, in plain words.
14338
+ */
14339
+ populationLabel?: string;
14340
+ /**
14341
+ * While the model trains: the step it is on, how long it has been, and how long is left (an estimate). Tell the person the step and the remaining range, as a range.
14319
14342
  */
14320
14343
  progress: {
14344
+ /**
14345
+ * Seconds since the run was started.
14346
+ */
14347
+ elapsedSeconds?: number;
14348
+ /**
14349
+ * A range of minutes, `low` to `high`. An estimate from earlier runs of the same size, not a promise: say it as a range ("about 13 to 23 minutes").
14350
+ */
14351
+ expectedMinutes?: {
14352
+ high: number;
14353
+ low: number;
14354
+ };
14355
+ /**
14356
+ * Says that the times are estimates, or that the run is past its estimate and still going. Pass it on.
14357
+ */
14358
+ note?: string;
14359
+ /**
14360
+ * What is left of the estimate. Null when there is no estimate for this run.
14361
+ */
14362
+ remainingMinutes?: {
14363
+ high: number;
14364
+ low: number;
14365
+ };
14366
+ /**
14367
+ * The step the run is on, numbered: "step 3 of 6: building past cases to learn from". Steps only ever go up.
14368
+ */
14321
14369
  stage: string;
14322
14370
  startedAt: string;
14371
+ step?: number;
14372
+ steps?: number;
14323
14373
  };
14324
14374
  /**
14325
14375
  * A refresh in progress, or why the last one produced nothing (the earlier scores stay).
14326
14376
  */
14327
14377
  refresh: {
14378
+ /**
14379
+ * While it runs: seconds since it started. `expectedMinutes` on the model says how long a refresh takes.
14380
+ */
14381
+ elapsedSeconds?: number;
14328
14382
  error?: {
14329
14383
  code: string;
14330
14384
  message: string;
@@ -14550,6 +14604,35 @@ type StudioModelOptions = {
14550
14604
  label: string;
14551
14605
  theme: string;
14552
14606
  }>;
14607
+ /**
14608
+ * How long a model takes from start to finish, as a range of minutes: for each state (`states`, when the sizes are known) and by size of state (`sizes`). An estimate from earlier runs (`note` says so; pass it on). Tell the person the range for their state BEFORE starting a model.
14609
+ */
14610
+ trainingTime?: {
14611
+ basis: string;
14612
+ note: string;
14613
+ sizes: Array<{
14614
+ /**
14615
+ * A range of minutes, `low` to `high`. An estimate from earlier runs of the same size, not a promise: say it as a range ("about 13 to 23 minutes").
14616
+ */
14617
+ expectedMinutes: {
14618
+ high: number;
14619
+ low: number;
14620
+ };
14621
+ label: string;
14622
+ size: 'small' | 'medium' | 'large';
14623
+ }>;
14624
+ states: Array<{
14625
+ /**
14626
+ * A range of minutes, `low` to `high`. An estimate from earlier runs of the same size, not a promise: say it as a range ("about 13 to 23 minutes").
14627
+ */
14628
+ expectedMinutes: {
14629
+ high: number;
14630
+ low: number;
14631
+ };
14632
+ size: 'small' | 'medium' | 'large';
14633
+ state: string;
14634
+ }>;
14635
+ };
14553
14636
  uploadedOutcomes: {
14554
14637
  keyKinds: Array<{
14555
14638
  columns: string;
@@ -34978,19 +35061,19 @@ declare class Studio {
34978
35061
  /**
34979
35062
  * Your organization's models
34980
35063
  *
34981
- * Every model your organization has: its status, what it predicts, the data points it uses, its report card and where its scores are. Only your organization's models are listed. Listing is free; a model that has just finished is charged for here if this is the first call to see it (`credits`), exactly as getStudioModel would.
35064
+ * Every model your organization has: its status, what it predicts, the data points it uses (`featureLabels` in plain words), its report card and where its scores are; for one that is training, the step it is on and how long is left (`progress`, `expectedMinutes`: estimates). Only your organization's models are listed. Listing is free; a model that has just finished is charged for here if this is the first call to see it (`credits`), exactly as getStudioModel would.
34982
35065
  */
34983
35066
  static listStudioModels<ThrowOnError extends boolean = false>(options?: Options<ListStudioModelsData, ThrowOnError>): RequestResult<ListStudioModelsResponses, ListStudioModelsErrors, ThrowOnError>;
34984
35067
  /**
34985
35068
  * Create a prediction model and start training it
34986
35069
  *
34987
- * Define a model — what to predict, for whom, in which state, and the data points to use — and start training it. It answers at once with `status: training`; training takes a few minutes, so read the model with getStudioModel until it is `ready` or `refused`. `features` is the heart of it: the data points the person believes matter. Their own knowledge can be data points too — columns of their uploaded outcomes table such as a lead source or a rating their team gives. To learn from their own results instead of a market outcome, pass `outcomeSource` (an uploaded table with a home, a date and what happened on every row); that usually helps most. Everything a model learns from is taken strictly before each case's date, and a data point that could show it the answer is refused with the reason. To try a different list of data points, send the same `name` with `replace: true`, or a new name with `basedOn`: the new report card says what changed. A request that cannot work is refused now with a clear reason (`error`, `code`, and the numbers in `details`). One model trains at a time per organization, up to 10 models. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.
35070
+ * Define a model — what to predict, for whom, in which state, and the data points to use — and start training it. It answers at once with `status: training` and `expectedMinutes`, a range that depends on the size of the state: a couple of minutes for a small state, 15 to 25 for the largest (an estimate; say the range, and say it is an estimate). Read the model with getStudioModel until it is `ready` or `refused`: `progress` gives the numbered step it is on and how long is left. `features` is the heart of it: the data points the person believes matter. Their own knowledge can be data points too — columns of their uploaded outcomes table such as a lead source or a rating their team gives. To learn from their own results instead of a market outcome, pass `outcomeSource` (an uploaded table with a home, a date and what happened on every row); that usually helps most. Everything a model learns from is taken strictly before each case's date, and a data point that could show it the answer is refused with the reason. To try a different list of data points, send the same `name` with `replace: true`, or a new name with `basedOn`: the new report card says what changed. An uploaded file's table is named `upload_<name>` (the upload `my_deals` is the table `upload_my_deals`); a wrong name is refused with the names that exist. A request that cannot work is refused now with a clear reason (`error`, `code`, and the numbers in `details`). One model trains at a time per organization, up to 10 models. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.
34988
35071
  */
34989
35072
  static createStudioModel<ThrowOnError extends boolean = false>(options: Options<CreateStudioModelData, ThrowOnError>): RequestResult<CreateStudioModelResponses, CreateStudioModelErrors, ThrowOnError>;
34990
35073
  /**
34991
35074
  * What a prediction model can be built from
34992
35075
  *
34993
- * Everything needed to define a model: the outcomes that can be predicted, who can be scored (`populations`), the data points a model may use, grouped by theme, each with a line on why someone might believe it matters, the limits, and what a table of your own outcomes must contain. Call this first, show the themes, and ASK which data points the person believes matter: a model is trained on exactly their picks, and its report card tests that belief. Free.
35076
+ * Everything needed to define a model: the outcomes that can be predicted, who can be scored (`populations`), the data points a model may use, grouped by theme, each with a line on why someone might believe it matters, the limits, what a table of your own outcomes must contain, and how long a model takes for each state (`trainingTime`: a range of minutes, an estimate). Call this first, show the themes, and ASK which data points the person believes matter: a model is trained on exactly their picks, and its report card tests that belief. Free.
34994
35077
  */
34995
35078
  static getStudioModelOptions<ThrowOnError extends boolean = false>(options?: Options<GetStudioModelOptionsData, ThrowOnError>): RequestResult<GetStudioModelOptionsResponses, GetStudioModelOptionsErrors, ThrowOnError>;
34996
35079
  /**
@@ -35002,13 +35085,13 @@ declare class Studio {
35002
35085
  /**
35003
35086
  * A model: its status and its report card
35004
35087
  *
35005
- * The model and, once training has finished, its report card (`card`). Read the card as it is written. It says how many past cases the model learned from and was tested on; the lift (`in the top 10% of the list, X of every 100 had the outcome, against Y at random and Z for the best simple rule`); three checks, each passed or not; how much each chosen data point mattered; how the person's picks compare with using every data point; and the caveats. Never promise accuracy, and never call a score a probability unless `card.calibration.calibrated` is true (then `estimatedChance` is an estimate from past cases). `status: refused` means the model is not dependable enough to publish: `card.refusal.reason` says why and `card.refusal.whatWouldHelp` what to try; a refused model has no scores. When `scores` is not null, query `scores.table` with runStudioQuery: one row per home with `rank`, `percentile`, `score`, `topReason`, and `propertyId` to join to `loans` and `sales`. Reading is free. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free. 10 credits for refreshed scores, charged once, the same way (a scheduled refresh too). The charge is reported in `credits`.
35088
+ * The model and, once training has finished, its report card (`card`). While it trains, `progress` says which numbered step it is on, how long it has been and how long is left (an estimate, as a range). Read the card as it is written, using its sentences and labels: fields named `id`, `code`, `verdict`, `better`, and everything under `technical`, are for programs and are never shown to a person. It says how many past cases the model learned from and was tested on; the lift (`in the top 10% of the list, X of every 100 had the outcome, against Y at random and Z for the best simple rule`); three checks, each passed or not; how much each chosen data point mattered; how the person's picks compare with using every data point; and the caveats. Never promise accuracy, and never call a score a probability unless `card.calibration.calibrated` is true (then each home's estimated chance is an estimate from past cases). `status: refused` means the model is not dependable enough to publish: `card.refusal.reason` says why and `card.refusal.whatWouldHelp` what to try; a refused model has no scores. When `scores` is not null, query `scores.table` with runStudioQuery: one row per home with `rank`, `percentile`, `score`, `topReason`, the home's `city` and `zipCode` (select those and leave `streetAddress` out to show the list without street addresses), and `propertyId` to join to `loans` and `sales`. Reading is free. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free. 10 credits for refreshed scores, charged once, the same way (a scheduled refresh too). The charge is reported in `credits`.
35006
35089
  */
35007
35090
  static getStudioModel<ThrowOnError extends boolean = false>(options: Options<GetStudioModelData, ThrowOnError>): RequestResult<GetStudioModelResponses, GetStudioModelErrors, ThrowOnError>;
35008
35091
  /**
35009
35092
  * Refresh a model's scores with the latest data
35010
35093
  *
35011
- * Score the model's population again as of today, with the trained model as it is. The current scores stay queryable until the new ones are ready; read the model with getStudioModel to see when (`refresh` goes back to null and `scores.asOf` moves). Pass `retrain: true` to also train it again on the latest data (the same data points, a fresh report card; if it no longer passes its checks it becomes `refused` and its scores are taken down). A model with a `weekly` or `monthly` schedule is refreshed on its own. 10 credits for refreshed scores, charged once, the same way (a scheduled refresh too). 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.
35094
+ * Score the model's population again as of today, with the trained model as it is. The current scores stay queryable until the new ones are ready; read the model with getStudioModel to see when (`refresh` goes back to null and `scores.asOf` moves); `expectedMinutes` says how long it is expected to take. Pass `retrain: true` to also train it again on the latest data (the same data points, a fresh report card; if it no longer passes its checks it becomes `refused` and its scores are taken down). A model with a `weekly` or `monthly` schedule is refreshed on its own. 10 credits for refreshed scores, charged once, the same way (a scheduled refresh too). 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.
35012
35095
  */
35013
35096
  static refreshStudioModel<ThrowOnError extends boolean = false>(options: Options<RefreshStudioModelData, ThrowOnError>): RequestResult<RefreshStudioModelResponses, RefreshStudioModelErrors, ThrowOnError>;
35014
35097
  /**