in k-fold-cross-validation/fold.py [0:0]
def create_ml_model(self):
"""
Creates ML Model on Amazon ML using the training datasource.
"""
self.ml_id = "ml-" + base64.b32encode(os.urandom(10)).decode("ascii")
self.ml_name = "ML model: " + self.train_ds_name
self._ml.create_ml_model(
ml_model_id=self.ml_id,
ml_model_name=self.ml_name,
training_data_source_id=self.train_ds_id,
ml_model_type=self.data_spec.ml_model_type,
parameters={
"sgd.maxPasses": self.data_spec.sgd_maxPasses,
"sgd.maxMLModelSizeInBytes":
self.data_spec.sgd_maxMLModelSizeInBytes,
"sgd.l2RegularizationAmount":
self.data_spec.sgd_l2RegularizationAmount
},
recipe=self.data_spec.recipe,
)
logger.info("Created ML Model " + self.ml_id)