riskLabelCoverage method

Future<RiskLabelCoverage?> riskLabelCoverage({
  1. String? from,
  2. String? to,
  3. int? horizon,
})

How much of the window has matured, and how much of that is judged

Reports how much of a window has matured and how much of that is judged, per source. It is the gate on training. A supervised fit over a window whose judged count is near zero produces a number, and the number is meaningless; this op is what lets that be stated before the fit rather than discovered after it. It reads the RECORD plane and folds every assertion at that event's OWN as-of, so the counts obey exactly the leakage rule a materialisation would. It counts only what was ASSERTED: what share of the whole event STREAM carries a label is a question about the feature plane's denominator and is not answerable here.

Parameters:

  • String from: From and To bound the EVENT window, half-open, RFC 3339. Unstated, the window is the 90 days ENDING where maturity begins — to is the horizon ago, not now. A default window running to now under a default horizon could not contain one matured event, so every count below it would be zero however much ground truth the tenant held.

  • String to:

  • int horizon: Horizon is the maturity horizon in days the coverage is measured under. Unstated takes 120. It also moves the default window, which ends where maturity begins.

Implementation

Future<RiskLabelCoverage?> riskLabelCoverage({ String? from, String? to, int? horizon, }) async {
  final response = await riskLabelCoverageWithHttpInfo( from: from, to: to, horizon: horizon, );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'RiskLabelCoverage',) as RiskLabelCoverage;

  }
  return null;
}