crim-ca / mlm-extension

Machine Learning Model STAC Extension
https://crim-ca.github.io/mlm-extension/
Apache License 2.0
5 stars 0 forks source link

Add explicit dependency checks for normalization details #10

Open fmigneault opened 2 months ago

fmigneault commented 2 months ago

:rocket: Feature Request

Within a mlm:input definition, when a norm_type is specified, it is expected that the corresponding statistics details are provided for the relevant normalization technique.

For example, a z-score needs the corresponding mean and stddev (minimally), while min-max would require the minimum and maximum statistics.

For the JSON schema, the dependencies property could be used to check that when norm_type is equal to some constant, the subset of corresponding statistics are defined + minItems: 1 or similar. In the stac_model definition, a @model_validator(mode="after") on the ModelInput could be applied.

:sound: Motivation

Ensure that the intended definition is properly specified. If the user forgot to apply some parameters unintentionally, this check would ensure the error is caught early, increasing model reusability. Not all cases can necessarily be covered, but most common normalization techniques could be handled.

:satellite: Alternatives

There are no explicit validation currently.

:paperclip: Additional context

n/a