diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-02-08 08:09:20 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-02-08 08:09:20 +0100 |
commit | 6740a377081a15c001cffdaa911d23efe33213ab (patch) | |
tree | 62099dc38d79769c2af6b16d8f577471fd87ff6d /doc | |
parent | 745f57c5226a3203678ee23cc0f293ee8ea45949 (diff) |
Document nodes in exported models
Diffstat (limited to 'doc')
-rw-r--r-- | doc/model-visual.md | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/doc/model-visual.md b/doc/model-visual.md index 55433b5..2fdbd29 100644 --- a/doc/model-visual.md +++ b/doc/model-visual.md @@ -28,3 +28,64 @@ unless `--non-interactive` has been specified. Use `--export-json FILENAME` to export the performance model to FILENAME. The model for NAME ATTRIBUTE is located in .name.NAME.ATTRIBUTE.modelFunction. +If it is a list, it is an XGB forest. Otherwise, it is an CART/LMT/RMT element +described by the `type` key. + +### CART/LMT scalar split node + +``` +{ + "value": 123, + "type": "scalarSplit", + "paramIndex": 0, + "threshold": 24, + "left": …, + "right": … +} +``` + +The model for `param[paramIndex] <= threshold` is located in `left`, the model +for `param[paramIndex] > threshold` is located in `right`. `value` is a +static model that serves as fall-back if `param[paramIndex]` is undefined. + +### RMT categorial split node + +``` +{ + "value": 123, + "type": "split", + "paramIndex": 0, + "child": { + "y": …, + "n": …, + } +} +``` + +Given some (usually not numeric) `value`, the model for `param[paramIndex] == +value` is located in `child[value]`. In this example, the node describes a +boolean Kconfig feature, so there are just two children: `y` (feature enabled) +and `n` (feature disabled). Again, `value` refers to a static fall-back model. + +### ULS (least-squares regresion) node + +``` +{ + "value": 123, + "type": "analytic", + "functionStr": "0 + regression_arg(0) + regression_arg(1) * np.log(parameter(bitrate))", + "regressionModel": [674574496.5381737, -51732985.15977712] +} +``` + +The model function is `674574496.5381737 - 51732985.15977712 * log(bitrate)`. +`value` is a static model that serves as fall-back if `bitrate` is undefined. + +### Static node + +``` +{ + "value": 123, + "type": "static" +} +``` |