
Overview
This algorithm produces similarity scores for a document or a line of text compared to documents in a corpus. The algorithm includes a tf-idf text featurizer to create n-gram features describing the text. It then uses the library scipy.spatial.distance to compute the cosine distance between the new document and each one in the corpus based on all n-gram features in the texts. The similarity index is then computed as (1 - cosine_distance). You can use this algorithm to look for similar texts and detect plagiarism in documents.
Highlights
- Sklearn, Machine Learning, cosine similarity
Details
Unlock automation with AI agent solutions

Features and programs
Financing for AWS Marketplace purchases
Pricing
Dimension | Description | Cost/host/hour |
|---|---|---|
ml.m4.xlarge Inference (Batch) Recommended | Model inference on the ml.m4.xlarge instance type, batch mode | $0.00 |
ml.m4.xlarge Inference (Real-Time) Recommended | Model inference on the ml.m4.xlarge instance type, real-time mode | $0.00 |
ml.m4.xlarge Training Recommended | Algorithm training on the ml.m4.xlarge instance type | $0.00 |
ml.m4.2xlarge Inference (Batch) | Model inference on the ml.m4.2xlarge instance type, batch mode | $0.00 |
ml.m4.4xlarge Inference (Batch) | Model inference on the ml.m4.4xlarge instance type, batch mode | $0.00 |
ml.m4.10xlarge Inference (Batch) | Model inference on the ml.m4.10xlarge instance type, batch mode | $0.00 |
ml.m4.16xlarge Inference (Batch) | Model inference on the ml.m4.16xlarge instance type, batch mode | $0.00 |
ml.m5.large Inference (Batch) | Model inference on the ml.m5.large instance type, batch mode | $0.00 |
ml.m5.xlarge Inference (Batch) | Model inference on the ml.m5.xlarge instance type, batch mode | $0.00 |
ml.m5.2xlarge Inference (Batch) | Model inference on the ml.m5.2xlarge instance type, batch mode | $0.00 |
Vendor refund policy
NA
How can we make this page better?
Legal
Vendor terms and conditions
Content disclaimer
Delivery details
Amazon SageMaker algorithm
An Amazon SageMaker algorithm is a machine learning model that requires your training data to make predictions. Use the included training algorithm to generate your unique model artifact. Then deploy the model on Amazon SageMaker for real-time inference or batch processing. Amazon SageMaker is a fully managed platform for building, training, and deploying machine learning models at scale.
Version release notes
Beta Release
Additional details
Inputs
- Summary
This algorithm requires a csv with column names, 'review_id' (String) and 'Text_clean' (String). 'Text_clean' contains the lines of text or documents in a corpus. Each line should be denoted by a 'review_id', while the new text, or line that is wanting to be analyzed should contain the keyword, 'NEW_REVIEW' as its 'review_id' See notebook for usage details.
- Input MIME type
- text/csv
Resources
Vendor resources
Support
AWS infrastructure support
AWS Support is a one-on-one, fast-response support channel that is staffed 24x7x365 with experienced and technical support engineers. The service helps customers of all sizes and technical abilities to successfully utilize the products and features provided by Amazon Web Services.
Similar products
