Calculator Inputs
Enter your label counts and weighting choices. After submission, the result appears above this form and below the header.
Example Data Table
Use these sample rows to understand how different label distributions change ratio, shares, and net sentiment.
| Dataset | Positive | Negative | Neutral | Simplified Ratio | Positive Share | Net Sentiment Index |
|---|---|---|---|---|---|---|
| Social Comments | 240 | 160 | 100 | 3 : 2 | 60.00% | 0.20 |
| App Reviews | 125 | 75 | 50 | 5 : 3 | 62.50% | 0.25 |
| Support Tickets | 90 | 135 | 45 | 2 : 3 | 40.00% | -0.20 |
| Survey Responses | 360 | 120 | 20 | 3 : 1 | 75.00% | 0.50 |
Formula Used
1) Positive-to-Negative Decimal Ratio
Decimal Ratio = Positive Count ÷ Negative Count
2) Simplified Ratio
Simplified Ratio = Positive : Negative reduced by their greatest common divisor
3) Labeled Class Share
Positive Share = Positive ÷ (Positive + Negative) × 100
Negative Share = Negative ÷ (Positive + Negative) × 100
4) Net Sentiment Index
Net Sentiment Index = (Positive - Negative) ÷ (Positive + Negative)
5) Imbalance Ratio
Imbalance Ratio = Larger Labeled Class ÷ Smaller Labeled Class
6) Weighted Score
Weighted Overall Score = (Positive × Positive Weight + Negative × Negative Weight) ÷ Total Records
When the negative count is zero, direct division becomes undefined. This page still reports counts, shares, and qualitative interpretation so you can recognize an extreme skew immediately.
How to Use This Calculator
- Enter a dataset name so your exports are easier to recognize.
- Add the number of positive, negative, and optional neutral records.
- Set positive and negative weights if your project treats classes differently.
- Choose the ratio normalization base, such as 1, 10, or 100.
- Select how many decimal places you want in the results.
- Click Calculate Ratio to show results above the form.
- Review the summary cards, metric table, and Plotly graph.
- Use the CSV and PDF buttons to export the current analysis.
FAQs
1) What does a positive negative ratio show?
It compares favorable observations to unfavorable ones. In data science, it is often used for sentiment datasets, binary outcomes, review labels, or imbalance checks before training and evaluation.
2) Why include neutral counts if the ratio uses only positive and negative values?
Neutral records do not change the direct positive-to-negative ratio, but they affect total volume, overall class share, and weighted averages. Including them helps you understand the full dataset composition.
3) What is a good ratio for modeling?
There is no universal perfect ratio. Balanced data often helps many models, but the best split depends on the problem, label quality, business cost, and resampling strategy.
4) What happens when the negative count is zero?
The decimal positive-to-negative ratio becomes undefined because division by zero is impossible. The calculator still shows counts, shares, simplified ratio text, and interpretation for quick diagnosis.
5) Should I use weighted scores?
Use weights when positive and negative cases carry different business meaning. Weighted scores are useful when one error type is more costly and you want a compact summary measure.
6) Does a higher positive share always mean better data?
No. A high positive share may reflect real patterns, but it can also signal sampling bias, weak labeling, or missing negative cases. Always inspect quality and downstream model performance.
7) Can this help with sentiment analysis projects?
Yes. It is useful for review datasets, social listening, survey text, support tagging, and moderation pipelines. You can quickly assess whether label balance needs correction before modeling.
8) Why is imbalance ratio important?
Imbalance ratio shows how dominant the larger class is over the smaller one. Higher values often suggest class weighting, threshold tuning, oversampling, or more careful evaluation design.