Analysis results
Sample data loadedDetailed class statistics
| Class | Frequency | Relative | Percent | Cumulative | Cumulative % | Class weight | Target difference | Status |
|---|
Machine learning guidance
Distribution comparison
Formula used
Relative frequency = class frequency ÷ total observations Percentage frequency = relative frequency × 100 Cumulative frequency = running total of sorted class frequencies Imbalance ratio = largest class frequency ÷ smallest nonzero class frequency Balanced class weight = N ÷ (K × class frequency) Normalized entropy = −Σ(p × ln p) ÷ ln(K) Coefficient of variation = frequency standard deviation ÷ mean frequency
How to use
Paste repeated class labels into the data box. Select frequency mode for summarized class counts. Upload CSV or TXT data when convenient.
Choose processing, sorting, and chart controls. Add rename or merge rules when needed. Set resampling options for an instant preview.
Press the calculate button to update everything. Review warnings before training a model. Export the chart and table for reporting.
Example data
| Class | Frequency | Percentage | Interpretation |
|---|---|---|---|
| Approved | 8 | 53.33% | Majority class |
| Rejected | 4 | 26.67% | Moderate class |
| Pending | 3 | 20.00% | Minority class |
Understanding class frequency
Class frequency measures how often each target label appears. It reveals dominant and underrepresented outcomes. Balanced classes usually support more stable evaluation.
Frequency gives a direct count for each class. Percentage standardizes counts across differently sized datasets. Cumulative values show progressive distribution coverage.
Severe imbalance can bias predictions toward majority classes. Accuracy may then hide poor minority recall. Inspect precision, recall, and confusion matrices together.
Frequently asked questions
What is a class frequency chart?
It visualizes observation counts for target classes. Taller bars indicate more frequent labels. It quickly exposes class imbalance.
Why does class imbalance matter?
Imbalance can favor majority-class predictions. Minority errors may become difficult to notice. Suitable metrics and sampling strategies are essential.
What is a good imbalance ratio?
No universal threshold fits every problem. Ratios above two deserve closer inspection. Domain costs should guide the decision.
Should I always oversample minority classes?
No strategy works for every dataset. Oversampling may increase duplicate information. Validate changes through cross-validation and holdout testing.
What does balanced class weight mean?
It assigns larger weights to smaller classes. The model penalizes their errors more strongly. Many classifiers support these weights directly.
When should stratified splitting be used?
Use it when class proportions must remain consistent. It is especially helpful for rare classes. Time-series data may require another approach.
What is normalized entropy?
It measures distribution evenness across classes. Values near one indicate greater balance. Values near zero indicate concentration.
Can zero-frequency classes be included?
Yes, enter their labels in the zero-class field. They appear with a zero count. Weight calculations avoid division by zero.
Can I compare two class distributions?
Yes, upload a comparison file. Grouped and stacked charts reveal differences. This helps inspect splits and prediction drift.