Runs a batch of predictions on Sagemaker model. The input is a csv file on S3, and predictions are saved as a csv on S3.

batch_predict(
  object,
  s3_input,
  s3_output,
  instance_count = 1L,
  instance_type = "ml.c4.xlarge",
  wait = TRUE
)

Arguments

object

The sagemaker model object created by sagemaker_hyperparameter_tuner or sagemaker_attach_tuner.

s3_input

The S3 path to the input object. The object must be a csv, with no column names. The csv must not contain the outcome column. Use s3 to construct the path.

s3_output

The S3 prefix for the output object or objects.

instance_count

The number of instances to run.

instance_type

Type of EC2 instance to run. See here for a list of options and pricing.

wait

Boolean that indicates if function should wait to return until the Sagemaker process is complete.

Value

S3 output path.

The format is s3://[s3_output]/[s3_input_object_name].out