Classification API
Gainly offers multiple API endpoints that can be used for classification tasks:
Select the Best Endpoint¶
Custom ML Models
Custom ML models refers to machine learning (ML) models that you have trained using your own historical data. You can train a custom ML model from your Gainly Dashboard under Settings > Custom Models.
Data for Training Custom ML Models¶
To train a custom ML model, we recommend at least 1000 samples to train on. These samples must be:
- High quality
- Balanced
- Representative of your domain
- Consistent
Use the following flowchart to help you select the best endpoint for your classification tasks.
flowchart TD
A[Do you have historical data to train a custom ML model?] -->|Yes| B[Do you want to categorize based on text content or attributes?]
B -->|Text| C[Classify]
B -->|Attributes| D[Predict]
A -->|No| E[Do you want to classify into sentiments?]
E -->|Yes| F[Analyze Sentiment]
E -->|No| G[Categorize]
click C "../../api-reference/classify/" "Go to Classify API Reference"
click D "../../api-reference/predict/" "Go to Predict API Reference"
click F "../../api-reference/analyze-sentiment/" "Go to Analyze Sentiment API Reference"
click G "../../api-reference/categorize-documents/" "Go to Categorize API Reference"