KNNPredictor | R Documentation |
The implementation of :meth:'~sagemaker.predictor.Predictor.predict' in this 'Predictor' requires a numpy “ndarray“ as input. The array should contain the same number of columns as the feature-dimension of the data used to fit the model this Predictor performs inference on. :func:'predict' returns a list of :class:'~sagemaker.amazon.record_pb2.Record' objects, one for each row in the input “ndarray“. The prediction is stored in the “"predicted_label"“ key of the “Record.label“ field.
sagemaker.mlcore::PredictorBase
-> sagemaker.mlcore::Predictor
-> KNNPredictor
new()
Initialize KNNPredictor class
KNNPredictor$new(endpoint_name, sagemaker_session = NULL)
endpoint_name
(str): Name of the Amazon SageMaker endpoint to which requests are sent.
sagemaker_session
(sagemaker.session.Session): A SageMaker Session object, used for SageMaker interactions (default: None). If not specified, one is created using the default AWS configuration chain.
clone()
The objects of this class are cloneable with this method.
KNNPredictor$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.