blog-2018 | Code samples for my 2018 blogposts
kandi X-RAY | blog-2018 Summary
kandi X-RAY | blog-2018 Summary
Code samples for my 2018 blogposts
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of blog-2018
blog-2018 Key Features
blog-2018 Examples and Code Snippets
Community Discussions
Trending Discussions on blog-2018
QUESTION
I'm following Sagemaker's k_nearest_neighbors_covtype
example and had some questions about the way they pass their training data to the model.
For those who have not seen it, they load data from the internet, run some preprocessing, then save it to an S3 bucket in some sort of binary format (protobuf/recordIO). Their code is as follows:
...ANSWER
Answered 2020-Jan-23 at 10:28You can't pass a dataframe directly to the built-in KNN algo. It supports two input training formats: CSV, or RecordIO protobuf: https://docs.aws.amazon.com/sagemaker/latest/dg/kNN-in-formats.html.
The latter is more efficient, so it's the one we recommend.
In your case, you would simply need to convert your dataframe to a numpy array with to_numpy(), and then you can reuse the code in the notebook.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install blog-2018
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page