updateMLModel method
Updates the MLModelName
and the ScoreThreshold
of an MLModel
.
You can use the GetMLModel
operation to view the contents of
the updated data element.
May throw InvalidInputException. May throw ResourceNotFoundException. May throw InternalServerException.
Parameter mLModelId
:
The ID assigned to the MLModel
during creation.
Parameter mLModelName
:
A user-supplied name or description of the MLModel
.
Parameter scoreThreshold
:
The ScoreThreshold
used in binary classification
MLModel
that marks the boundary between a positive prediction
and a negative prediction.
Output values greater than or equal to the ScoreThreshold
receive a positive result from the MLModel
, such as
true
. Output values less than the ScoreThreshold
receive a negative response from the MLModel
, such as
false
.
Implementation
Future<UpdateMLModelOutput> updateMLModel({
required String mLModelId,
String? mLModelName,
double? scoreThreshold,
}) async {
ArgumentError.checkNotNull(mLModelId, 'mLModelId');
_s.validateStringLength(
'mLModelId',
mLModelId,
1,
64,
isRequired: true,
);
_s.validateStringLength(
'mLModelName',
mLModelName,
0,
1024,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonML_20141212.UpdateMLModel'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'MLModelId': mLModelId,
if (mLModelName != null) 'MLModelName': mLModelName,
if (scoreThreshold != null) 'ScoreThreshold': scoreThreshold,
},
);
return UpdateMLModelOutput.fromJson(jsonResponse.body);
}