@model-match/api 3.91.0 → 3.93.0
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 +11 -0
- package/dist/{index-CeMTPjeW.d.mts → index-C7FlNQnJ.d.mts} +74 -8
- package/dist/index.d.mts +1 -1
- package/dist/slim/index.d.mts +1 -1
- package/openapi.json +153 -9
- package/package.json +1 -1
package/RELEASE_NOTES.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
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.93.0
|
|
6
|
+
|
|
7
|
+
- **Studio models can rank agents.** `createStudioModel` takes `subject: "agent"` to score agents on who is likely to stop selling, or to lose or gain share of their state's sales. `population: { kind: "agents_of_company", companyNmlsId }` scores the agents whose clients took a mortgage from one company's loan officers. Uploaded outcomes are matched by agent id (`agent_id`).
|
|
8
|
+
- **Studio models can rank agent and loan officer pairs.** `subject: "agent_lo_pair"` predicts another deal together, a pair going quiet, or a new pairing starting. A new pairing is predicted only for the candidate populations (`agent_lo_candidates`, `lo_agent_candidates`); the other outcomes only for pairs with past deals. Uploaded outcomes are matched by both ids (`agent_lo_pair`: the agent id column, then the NMLS id column).
|
|
9
|
+
- **Outcomes can list their horizons and settings.** In `getStudioModelOptions`, an outcome may carry `horizons`, `options` (closed settings with a default) and `populations`. Pick a setting with `outcomeOptions`, for example `{ factor: 0.75 }`; a value off the list answers `400 invalid_model`. Leave it out for the defaults, as before.
|
|
10
|
+
- `getStudioModelOptions` lists only the subjects you can build, and `trainingTime.bySubject` gives the expected minutes for each subject of people.
|
|
11
|
+
|
|
12
|
+
## 3.92.0
|
|
13
|
+
|
|
14
|
+
- **Two more outcomes for home models.** `createStudioModel` accepts `outcome: "home_listed"` (the home is listed for sale, whether or not the listing sells) and `outcome: "refinance"` (a new first mortgage replaces the one on record; home equity loans and purchases do not count). A `home_listed` model leaves out homes already listed in the 6 months before the as-of date. `getStudioModelOptions` lists both. Existing outcomes and models are unchanged.
|
|
15
|
+
|
|
5
16
|
## 3.91.0
|
|
6
17
|
|
|
7
18
|
- **Studio models can rank loan officers.** `createStudioModel` takes `subject: "loan_officer"` to score loan officers on who is likely to move to another company, or to gain or lose share of their state's loans. A loan-officer model uses that subject's own outcomes, data points and populations, and its uploaded outcomes are matched by NMLS id (`nmls_id`). `getStudioModelOptions` lists them under `subjects`, with the scope forms each subject takes under `scopeKinds`. Leave `subject` out to model homes, as before.
|
|
@@ -14632,6 +14632,12 @@ type StudioModel = {
|
|
|
14632
14632
|
* 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.
|
|
14633
14633
|
*/
|
|
14634
14634
|
outcomeLabel?: string;
|
|
14635
|
+
/**
|
|
14636
|
+
* The outcome's settings the request picked; absent when each is at its default.
|
|
14637
|
+
*/
|
|
14638
|
+
outcomeOptions?: {
|
|
14639
|
+
[key: string]: number;
|
|
14640
|
+
};
|
|
14635
14641
|
outcomeSource: {
|
|
14636
14642
|
/**
|
|
14637
14643
|
* Each row's date (a date column): the day you would have wanted the prediction. Only earlier records are used.
|
|
@@ -14934,7 +14940,7 @@ type StudioModel = {
|
|
|
14934
14940
|
*/
|
|
14935
14941
|
status: 'training' | 'ready' | 'refused' | 'failed';
|
|
14936
14942
|
/**
|
|
14937
|
-
* Who or what the model scores: `home`, or `
|
|
14943
|
+
* Who or what the model scores: `home`, `loan_officer`, `agent` or `agent_lo_pair` (a `subjects[].id` from getStudioModelOptions).
|
|
14938
14944
|
*/
|
|
14939
14945
|
subject?: string;
|
|
14940
14946
|
/**
|
|
@@ -14982,7 +14988,7 @@ type StudioModelCreate = {
|
|
|
14982
14988
|
*/
|
|
14983
14989
|
features?: Array<StudioModelDataPoint>;
|
|
14984
14990
|
/**
|
|
14985
|
-
* How far ahead to predict a market outcome, in months. Default 12.
|
|
14991
|
+
* How far ahead to predict a market outcome, in months. Default: the outcome's `defaultHorizonMonths` (12 for most). An outcome with `horizons` in getStudioModelOptions takes only those.
|
|
14986
14992
|
*/
|
|
14987
14993
|
horizonMonths?: number;
|
|
14988
14994
|
/**
|
|
@@ -14993,6 +14999,12 @@ type StudioModelCreate = {
|
|
|
14993
14999
|
* What to predict: an outcome id from getStudioModelOptions. Omit with `outcomeSource`.
|
|
14994
15000
|
*/
|
|
14995
15001
|
outcome?: string;
|
|
15002
|
+
/**
|
|
15003
|
+
* Settings of the outcome, each one of the values its `outcomes[].options` lists, for example `{"factor": 0.75}` for an agent who loses a quarter of their share instead of half. Leave it out for the defaults. Market outcomes only.
|
|
15004
|
+
*/
|
|
15005
|
+
outcomeOptions?: {
|
|
15006
|
+
[key: string]: number;
|
|
15007
|
+
};
|
|
14996
15008
|
outcomeSource?: StudioModelOutcomeSource;
|
|
14997
15009
|
population?: StudioModelPopulation;
|
|
14998
15010
|
/**
|
|
@@ -15033,7 +15045,7 @@ type StudioModelCreate = {
|
|
|
15033
15045
|
zipCodes?: Array<string>;
|
|
15034
15046
|
};
|
|
15035
15047
|
/**
|
|
15036
|
-
* Who or what the model scores: `home` (default)
|
|
15048
|
+
* Who or what the model scores: `home` (default), `loan_officer`, `agent` or `agent_lo_pair` (an agent and a loan officer together), a `subjects[].id` from getStudioModelOptions (which lists only the subjects available). Each subject has its own outcomes, populations, data points and upload keys.
|
|
15037
15049
|
*/
|
|
15038
15050
|
subject?: string;
|
|
15039
15051
|
};
|
|
@@ -15123,7 +15135,7 @@ type StudioModelError = {
|
|
|
15123
15135
|
type StudioModelKey = {
|
|
15124
15136
|
columns: Array<string>;
|
|
15125
15137
|
/**
|
|
15126
|
-
* Homes: `property_address` (`address_key`, ZIP), `property_id` or `loan_id`. Loan officers: `nmls_id` (the NMLS id column).
|
|
15138
|
+
* Homes: `property_address` (`address_key`, ZIP), `property_id` or `loan_id`. Loan officers: `nmls_id` (the NMLS id column). Agents: `agent_id` (the agent id column). Agent and loan officer pairs: `agent_lo_pair` (two columns: the agent id, then the NMLS id). `subjects[].keyKinds` in getStudioModelOptions lists each subject's.
|
|
15127
15139
|
*/
|
|
15128
15140
|
kind: string;
|
|
15129
15141
|
};
|
|
@@ -15149,8 +15161,25 @@ type StudioModelOptions = {
|
|
|
15149
15161
|
outcomes: Array<{
|
|
15150
15162
|
defaultHorizonMonths: number;
|
|
15151
15163
|
description: string;
|
|
15164
|
+
/**
|
|
15165
|
+
* The `horizonMonths` this outcome takes, the default first. Absent: any from `limits.minHorizonMonths` to `limits.maxHorizonMonths`.
|
|
15166
|
+
*/
|
|
15167
|
+
horizons?: Array<number>;
|
|
15152
15168
|
id: string;
|
|
15153
15169
|
label: string;
|
|
15170
|
+
/**
|
|
15171
|
+
* Settings the person may pick (`outcomeOptions`), each a closed list with its default: a threshold or a factor. Absent: none.
|
|
15172
|
+
*/
|
|
15173
|
+
options?: {
|
|
15174
|
+
[key: string]: {
|
|
15175
|
+
default: number;
|
|
15176
|
+
values: Array<number>;
|
|
15177
|
+
};
|
|
15178
|
+
};
|
|
15179
|
+
/**
|
|
15180
|
+
* The population kinds this outcome can be predicted for (a new pair only among pairs that have not dealt). Absent: every population of its subject.
|
|
15181
|
+
*/
|
|
15182
|
+
populations?: Array<string>;
|
|
15154
15183
|
question: string;
|
|
15155
15184
|
}>;
|
|
15156
15185
|
populations: Array<{
|
|
@@ -15183,7 +15212,7 @@ type StudioModelOptions = {
|
|
|
15183
15212
|
}>;
|
|
15184
15213
|
};
|
|
15185
15214
|
/**
|
|
15186
|
-
* What can be scored: `home` (the default; its lists are also the top-level `outcomes`, `populations` and `themes`) and `
|
|
15215
|
+
* What can be scored: `home` (the default; its lists are also the top-level `outcomes`, `populations` and `themes`), `loan_officer`, `agent` and `agent_lo_pair`. Only subjects available to build are listed. Each subject has its own outcomes, populations, data points, upload keys and scope forms; a model uses one subject's.
|
|
15187
15216
|
*/
|
|
15188
15217
|
subjects?: Array<{
|
|
15189
15218
|
boostColumns: Array<{
|
|
@@ -15198,7 +15227,7 @@ type StudioModelOptions = {
|
|
|
15198
15227
|
[key: string]: string;
|
|
15199
15228
|
};
|
|
15200
15229
|
/**
|
|
15201
|
-
* The `subject` to send: `home` or `
|
|
15230
|
+
* The `subject` to send: `home`, `loan_officer`, `agent` or `agent_lo_pair`.
|
|
15202
15231
|
*/
|
|
15203
15232
|
id: string;
|
|
15204
15233
|
keyKinds: Array<{
|
|
@@ -15217,8 +15246,25 @@ type StudioModelOptions = {
|
|
|
15217
15246
|
outcomes: Array<{
|
|
15218
15247
|
defaultHorizonMonths: number;
|
|
15219
15248
|
description: string;
|
|
15249
|
+
/**
|
|
15250
|
+
* The `horizonMonths` this outcome takes, the default first. Absent: any from `limits.minHorizonMonths` to `limits.maxHorizonMonths`.
|
|
15251
|
+
*/
|
|
15252
|
+
horizons?: Array<number>;
|
|
15220
15253
|
id: string;
|
|
15221
15254
|
label: string;
|
|
15255
|
+
/**
|
|
15256
|
+
* Settings the person may pick (`outcomeOptions`), each a closed list with its default: a threshold or a factor. Absent: none.
|
|
15257
|
+
*/
|
|
15258
|
+
options?: {
|
|
15259
|
+
[key: string]: {
|
|
15260
|
+
default: number;
|
|
15261
|
+
values: Array<number>;
|
|
15262
|
+
};
|
|
15263
|
+
};
|
|
15264
|
+
/**
|
|
15265
|
+
* The population kinds this outcome can be predicted for (a new pair only among pairs that have not dealt). Absent: every population of its subject.
|
|
15266
|
+
*/
|
|
15267
|
+
populations?: Array<string>;
|
|
15222
15268
|
question: string;
|
|
15223
15269
|
}>;
|
|
15224
15270
|
populations: Array<{
|
|
@@ -15294,6 +15340,26 @@ type StudioModelOptions = {
|
|
|
15294
15340
|
*/
|
|
15295
15341
|
trainingTime?: {
|
|
15296
15342
|
basis: string;
|
|
15343
|
+
/**
|
|
15344
|
+
* Models of people (loan officers, agents, pairs) take about the same time wherever they look: a range for training and for a refresh, by subject.
|
|
15345
|
+
*/
|
|
15346
|
+
bySubject?: Array<{
|
|
15347
|
+
/**
|
|
15348
|
+
* 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").
|
|
15349
|
+
*/
|
|
15350
|
+
expectedMinutes: {
|
|
15351
|
+
high: number;
|
|
15352
|
+
low: number;
|
|
15353
|
+
};
|
|
15354
|
+
/**
|
|
15355
|
+
* 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").
|
|
15356
|
+
*/
|
|
15357
|
+
refreshMinutes: {
|
|
15358
|
+
high: number;
|
|
15359
|
+
low: number;
|
|
15360
|
+
};
|
|
15361
|
+
subject: string;
|
|
15362
|
+
}>;
|
|
15297
15363
|
note: string;
|
|
15298
15364
|
sizes: Array<{
|
|
15299
15365
|
/**
|
|
@@ -15432,9 +15498,9 @@ type StudioModelPopulation = {
|
|
|
15432
15498
|
companyNmlsId?: string;
|
|
15433
15499
|
key?: StudioModelKey;
|
|
15434
15500
|
/**
|
|
15435
|
-
* Who is scored. Homes: `homes` (recent mortgage, in the scope), `company_book` (`companyNmlsId`) or `uploaded_list` (`table`, `key`). Loan officers: `loan_officers` (active in the scope), `company_loan_officers` (`companyNmlsId`) or `uploaded_list` (key `nmls_id`).
|
|
15501
|
+
* Who is scored. Homes: `homes` (recent mortgage, in the scope), `company_book` (`companyNmlsId`) or `uploaded_list` (`table`, `key`). Loan officers: `loan_officers` (active in the scope), `company_loan_officers` (`companyNmlsId`) or `uploaded_list` (key `nmls_id`). Agents: `agents` (active in the scope), `agents_of_company` (agents whose clients took a mortgage from one company's loan officers: `companyNmlsId`) or `uploaded_list` (key `agent_id`). Agent and loan officer pairs: `agent_lo_pairs` (pairs with past deals), `company_agent_lo_pairs` (one company's pairs: `companyNmlsId`), `agent_lo_candidates` / `lo_agent_candidates` (`companyNmlsId`: pairs that have not dealt yet) or `uploaded_list` (key `agent_lo_pair`). Some outcomes take only some populations (`outcomes[].populations` in getStudioModelOptions).
|
|
15436
15502
|
*/
|
|
15437
|
-
kind: 'homes' | 'company_book' | 'uploaded_list' | 'loan_officers' | 'company_loan_officers';
|
|
15503
|
+
kind: 'homes' | 'company_book' | 'uploaded_list' | 'loan_officers' | 'company_loan_officers' | 'agents' | 'agents_of_company' | 'agent_lo_pairs' | 'company_agent_lo_pairs' | 'agent_lo_candidates' | 'lo_agent_candidates';
|
|
15438
15504
|
table?: string;
|
|
15439
15505
|
};
|
|
15440
15506
|
type StudioModelRefresh = {
|