Registers a new custom metric which can be used as an evaluation metric for the trained model.
REQUIRED | KEY | TYPE | DESCRIPTION |
---|---|---|---|
Yes | name | str | A unique name for the metric, with a limit of 50 characters. Only underscores, numbers, and uppercase alphabets are allowed. |
Yes | problemType | str | The problem type that this metric would be applicable to, e.g. REGRESSION, FORECASTING, etc. |
No | customMetricFunctionName | str | The name of the function whose full source code is passed in source_code. |
No | sourceCode | str | The full source code of the custom metric function. This is required if custom_metric_function_name is passed. |
KEY | TYPE | DESCRIPTION | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
success | Boolean | true if the call succeeded, false if there was an error | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
result | CustomMetric |
|
TYPE | WHEN |
---|---|
InvalidEnumParameterError | An invalid value is passed for |
InvalidParameterError | If either the custom metric name or type or the passed function is invalid/incompatible. |
AlreadyExistsError | If a custom metric with the given name already exists in the organization. |