toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() {
  return {
    if (decayCurveStoppingSpec != null)
      'decayCurveStoppingSpec': decayCurveStoppingSpec!.toJson(),
    if (medianAutomatedStoppingSpec != null)
      'medianAutomatedStoppingSpec': medianAutomatedStoppingSpec!.toJson(),
    if (convexStopConfig != null)
      'convexStopConfig': convexStopConfig!.toJson(),
    if (convexAutomatedStoppingSpec != null)
      'convexAutomatedStoppingSpec': convexAutomatedStoppingSpec!.toJson(),
    'metrics': encodeList(metrics),
    'parameters': encodeList(parameters),
    if (algorithm.isNotDefault) 'algorithm': algorithm.toJson(),
    if (observationNoise.isNotDefault)
      'observationNoise': observationNoise.toJson(),
    if (measurementSelectionType.isNotDefault)
      'measurementSelectionType': measurementSelectionType.toJson(),
    if (transferLearningConfig != null)
      'transferLearningConfig': transferLearningConfig!.toJson(),
    if (studyStoppingConfig != null)
      'studyStoppingConfig': studyStoppingConfig!.toJson(),
  };
}