Functions of this type do a lookup in a stats table trained with the statsTable.train procedure type and returns
the counts for each of the keys provided as input.
A new function of type statsTable.getCounts named <id> can be created as follows:
mldb.put("/v1/functions/"+<id>, {
"type": "statsTable.getCounts",
"params": {
"statsTableFileUrl": <Url>
}
})with the following key-value definitions for params:
| Field, Type, Default | Description |
|---|---|
statsTableFileUrl | URL of the model file (with extension '.st') to load. This file is created by the |
Functions of this type have a single input value named keys which is a row.
Functions of this type have a single output value named counts which is also a row.
The row will contain two columns for each key, one containing the number of elements
for the key and one containing the number of labels for that key. For example, for
keys in the host and region stats tables, a row of this form would be returned:
| rowName | imp-host | label-host | imp-region | label-region |
|---|---|---|---|---|
| row_1 | 25 | 1 | 50 | 0 |
statsTable.train procedure type trains stats tables.experimental.statsTable.derivedColumnsGenerator procedure type can be used to generate derived columns from stats table counts.