P4-6.2 Evaluation Criteria By Problem Type¶
Section ID:
P4-6.2Version:v2026.07.20
P4-6.1 explained that an evaluation metric is not just a scoreboard. It is a criterion that reveals what we choose to treat as important. Now the next question follows. If the problem changes, why do the metrics we inspect also change?
The answer is simple. The model's output changes, and the judgment connected to that output changes as well. Classification is the problem of choosing a category, regression is the problem of predicting a number, and clustering is the problem of grouping similar things together. So the meaning of did well cannot stay the same.
Scope Of This Section¶
This Section is an introductory organization of why evaluation criteria change across classification, regression, and clustering. It connects the questions that should come to mind for each problem type with representative metrics. Introductory explanations of ROC curve, PR curve, log loss, calibration, and silhouette coefficient are collected separately in the P4-6.4 supplementary Section, and clustering-quality interpretation is connected again in P4-17.1 and P4-17.2.
In the core text, the first scope is the following: which kinds of errors hurt more in classification, how far off is the model on average in regression, and how should structure be read in clustering when there may be no answer label. More delicate readings such as calibration curves and Brier score are first collected in P4-6.4, while actual threshold adjustment and the connection to service policy return in P4-15.3.
This Section answers the following questions.
- What differs in evaluation across classification, regression, and clustering?
- Why does classification not end with accuracy alone?
- Why does regression inspect
how far off was itrather than justright or wrong? - Why does it matter in clustering that an answer label may not exist?
- Why does it become easier to read later algorithm chapters once the problem type is separated first?
Goals Of This Section¶
- You can explain that the evaluation question changes by problem type.
- You can explain why representative metrics for classification and regression are different.
- You can explain that clustering often becomes more delicate because there is frequently no answer label.
- You can prepare for what evaluation questions follow later when learning algorithms such as linear regression, logistic regression, k-NN, and decision trees.
Learning Background¶
First Separate The Problem Type¶
The scikit-learn documentation explains evaluation functions by separating them according to the goal of the problem. The fact that classification metrics, regression metrics, and clustering metrics are separate is itself an important hint. It means that different questions are hidden under the same word performance.
flowchart TB
A["problem type"]
B["classification<br/>choose a class"]
C["regression<br/>predict a number"]
D["clustering<br/>group similar samples"]
E["read mistakes by type<br/>accuracy / precision / recall / F1"]
F["read error size<br/>MAE / MSE / RMSE / R2"]
G["read group quality<br/>label agreement or silhouette"]
A --> B
A --> C
A --> D
B --> E
C --> F
D --> G
This diagram shows that once the problem type is chosen first, the evaluation question that should be read next also changes naturally. What should be read first here is not the metric name, but the distinction is the current output a category, a number, or a grouping?
The criterion to fix first in this Section is the following table.
| Problem type | Model output | The first question to ask | Representative metrics often used |
|---|---|---|---|
| classification | class or class probability | Which kind of mistake should be reduced more? | accuracy, precision, recall, F1 |
| regression | continuous number | How far is the prediction from the actual value? | MAE, MSE, RMSE, R² |
| clustering | grouping structure, cluster ID | Were truly similar things grouped together? | comparison metrics such as ARI/FMI, silhouette |
The point readers confuse most often here is that when the shape of the output changes, the meaning of a good result also changes.
The evaluation order by problem type can be fixed briefly like this.
| Problem type | What to inspect first | The next question that follows immediately | Where it connects to the baseline |
|---|---|---|---|
| classification | confusion matrix and representative error cases | Which FP or FN hurts more, and should precision or recall be read first? | In P4-8.2, whether the improvement in this error structure is truly meaningful is compared against a baseline. |
| regression | representative error size and the region with large errors | How far off is it on average, and where are the large failures concentrated? | It is compared against a simple baseline that predicts only the average. |
| clustering | compactness within clusters and separation across clusters | Does this grouping truly show structure, and is there an interpretation a person can attach? | Later Sections check again whether it can be compared with human labels or a simple split. |
| Problem type | Example input | Example output | What did well means |
|---|---|---|---|
| classification | email content, customer information, image pixels | spam/normal, churn/stay, cat/dog | it chose the correct category |
| regression | area, location, past price | 520 million won, 37 minutes, 21.3 degrees | it kept the numeric difference small |
| clustering | purchase records, click patterns, sensor data | cluster 1, cluster 2, cluster 3 | it grouped similar things together |
So classification is closer to a problem of attaching a name label, regression is closer to a problem of matching a numeric scale, and clustering is closer to a problem of finding groups that were not named in advance by people.
Main Learning Content¶
In Classification, Read The Types Of Errors First¶
In classification, it is often not enough to read the prediction result only as correct or wrong. As already seen in P4-6.1, the mistake of missing an actual positive case and the mistake of calling a negative case positive for no good reason can have different costs.
The scikit-learn documentation also separates classification metrics into items such as accuracy, F1, confusion matrix, ROC AUC, and precision-recall curve. That means classification performance does not end in one number.
Classification becomes clearer when read through the following order.
- What counts as positive, and what counts as negative?
- Does it hurt more to miss a case, or to raise a false alarm?
- So should recall be the first metric to inspect, or precision?
- Is there a need to inspect F1 score or another metric together to read the overall balance?
Even within the same classification problem, the questions can differ like this.
| Scene | The first question asked | A metric that is easy to inspect first |
|---|---|---|
| disease screening | Were actual dangerous cases avoided from being missed? | recall |
| spam blocking | Are normal emails being blocked too often? | precision and recall together |
| fraud detection | Which costs more, misses or false alarms? | recall-centered, with precision together |
| recommendation click prediction | How do ranking and post-threshold results look? | accuracy alone may be insufficient |
So in classification, the first thing to read is the kind of error.
Reading Classification More Concretely¶
Classification looks simple on the surface because it only chooses one option among categories. But in practice, two layers are mixed together.
- Which class does the model consider more likely?
- How is that likelihood turned into an actual decision in service?
For example, a mail filter may produce an internal score such as spam probability 0.82. But users do not see a probability. They experience decisions such as move to spam, send to review, or keep in inbox. So classification evaluation goes beyond a simple label table and also ends up reading the error structure created by that decision.
The following distinctions are especially important when reading classification.
| Distinction | Question | Why it matters |
|---|---|---|
| the class itself | What category is being predicted? | The problem definition changes |
| positive versus negative | What is being treated as the target that must be caught? | The interpretation of precision and recall changes |
| threshold | From what score onward should a case be treated as positive? | Even with the same model, the result changes |
| error cost | Which hurts more, FP or FN? | The first metric to inspect changes |
For example, in medical screening, classifying too many cases as positive may be a smaller problem than missing an actual patient. By contrast, in an automatic approval system, letting a risky target pass incorrectly may be the bigger problem. So classification is both the task of choosing a category and the task of managing the kinds of errors.
Social And Work Examples Of Classification¶
Classification is one of the most widely used problem types in reality. The reason is that many institutions and services eventually move through category judgments such as pass/hold, normal/anomaly, allow/block, and approve/reject.
| Scene | Example input | Example output | Why evaluation is sensitive |
|---|---|---|---|
| first-stage welfare screening | income, household information, application history | support priority / lower priority | leaving out a needed person creates social loss |
| automatic resume sorting in hiring | resume, experience, qualifications | proceed to next stage / hold | incorrect rejection creates fairness issues |
| financial anomaly detection | payment time, amount, location | normal / suspicious transaction | misses cause monetary damage, excessive blocking causes user inconvenience |
| content report classification | post text, image | normal / review / deletion candidate | both missed dangerous expression and excessive blocking must be handled carefully |
Classification is also very common in work systems.
| Work scene | Actual judgment | The metric intuition inspected first |
|---|---|---|
| operational alert classification | whether to raise an alert | the balance between false alarms and missed alerts |
| customer-churn prediction | whether to select at-risk customers | if recall is low, the number of misses may grow |
| defective-product inspection | pass / reinspection / discard | comparing the cost of missed defects and excessive reinspection |
| spam and phishing blocking | block / allow / review | precision and recall must be inspected together |
These examples show that classification is more accurately understood not merely as technology for attaching labels, but as technology that changes the next action taken by people and organizations.
In Regression, Read The Size Of Error First¶
Regression is the problem of predicting numbers. It is enough to imagine situations such as house price, delivery time, power usage, sales, or temperature. Here, what matters more is not simply wrong, but how wrong.
The scikit-learn documentation separately explains regression metrics such as mean absolute error, mean squared error, and R² score. That structure itself means that in regression, the size of error and the way error is interpreted are central.
Here the distinction is organized like this.
| Metric | Reader question | Characteristic |
|---|---|---|
| MAE | On average, how far off was it? | Intuitive |
| MSE | Do we want to punish large errors more strongly? | More sensitive to large mistakes |
| RMSE | Do we want to read MSE again in the original unit? | A little easier to interpret |
| R² | How much better does it explain compared with a baseline? | It can be read like explanatory power, but it is easy to misunderstand |
The important point here is that regression metrics are connected to the interpretation of numeric difference.
- In delivery-time prediction, a 1-minute error and a 30-minute error are not the same mistake.
- In power-demand prediction, a large error can shake the whole operating plan.
- In house-price prediction, the average size of the difference may be more intuitive.
So in regression, the key is not whether error exists, but the size and cost of the error.
Reading Regression More Concretely¶
Because regression deals with numbers, many readers easily misunderstand it as a problem of matching one exact correct answer. But in practice, the key is how close a number the model gives.
For example, if the true house price should be 500 million won, then 501 million won and 700 million won are both wrong, but they are not the same kind of wrong. Regression metrics let that difference be read.
The following questions come attached when reading regression.
| Question | Why it is needed | Metric it connects to |
|---|---|---|
| How far off was it on average? | It gives an everyday sense of error | MAE |
| Do we want to punish large errors more strongly? | It reflects scenes where a large failure is critical | MSE, RMSE |
| Is it actually useful compared with a baseline? | It checks whether it is better than simple average prediction | R² |
The sense of baseline is also important here. In regression, a good model is not automatically a model that hit the exact value. At the very least, it should be possible to say it is better than a model that mindlessly says the average. R² helps this comparison perspective, but a high number does not always mean the model is enough in practice.
Regression is also sensitive to the unit.
- MAE of 1 million won in house-price prediction
- MAE of 1 million won in delivery-time prediction
Even if the number looks the same, the meaning is completely different. So in regression, the number itself must be read together with the unit in which that error exists.
Social And Work Examples Of Regression¶
Regression can feel less familiar than classification at first, but it appears extremely often in actual work. The reason is that organizations constantly handle numbers such as how much, until when, how many, and what cost when making decisions.
| Scene | Example input | Example output | Why evaluation is sensitive |
|---|---|---|---|
| housing-price estimation | area, region, transaction history | expected price | a large error can distort transaction judgment |
| delivery-time prediction | origin, logistics volume, traffic condition | expected arrival time | small errors may be tolerated, but large delays break service trust |
| power-demand prediction | temperature, time slot, past usage | next-hour demand | large errors directly affect supply planning and cost |
| hospital waiting-time prediction | number of reservations, number of staff, patient condition | expected waiting time | it affects actual operating experience and resource placement |
Regression also appears often in work analysis.
| Work scene | Number to predict | The evaluation intuition being read |
|---|---|---|
| sales planning | next week's sales | how far off is it on average? |
| ad operations | clicks, conversions, cost | does a large error shake budget execution? |
| manufacturing operations | next-batch production amount | how different are the costs of underprediction and overprediction? |
| infrastructure operations | CPU usage, request count | does missing a sharp peak lead to an operational incident? |
When reading regression examples, it is not enough to think only about predicting a number. You also have to ask how much does the error in that number shake planning and operations? Regression evaluation is both mathematical error and operational error.
In Clustering, There May Be No Answer At All¶
Clustering may feel stranger than classification or regression. The reason is simple. Clustering usually begins from a state where there is no answer label.
The scikit-learn documentation explains clustering performance evaluation by separating the case where answer labels are known from the case where they are not. It explicitly says that this is not as simple as precision and recall in supervised learning.
This difference is extremely important.
flowchart TD
A["clustering result"]
B["ground-truth labels available?"]
C["yes<br/>compare two labelings"]
D["no<br/>inspect cluster structure itself"]
E["ARI / FMI / homogeneity-completeness"]
F["silhouette or other internal criteria"]
A --> B
B --> C
B --> D
C --> E
D --> F
The key point of this diagram is that clustering evaluation splits into two branches from the beginning. If human answer labels exist, the question becomes how similar is this to the human grouping? If no such labels exist, the question becomes how plausible is the grouping itself?
| Situation | The first question to ask | Representative way to read it |
|---|---|---|
| answer labels exist | Was the grouping similar to the division people already knew? | comparison metrics such as ARI and FMI |
| answer labels do not exist | Are points inside the same cluster close, and are different clusters separated? | internal criteria such as silhouette |
So in clustering, the fact that it is evaluation without an answer is itself a core learning point.
Reading Clustering More Concretely¶
Clustering can feel the most abstract. Classification has an answer category, and regression has a number to match. But in clustering, from the beginning, a person must interpret again what kind of grouping counts as a good grouping?
So when reading clustering, what the model did has to be split into two layers.
- What grouping structure did it create inside the data?
- Does that grouping also match distinctions that a human can understand?
For example, when customer data are clustered, the model may output only IDs such as cluster 1, cluster 2, and cluster 3. But those numbers themselves do not automatically mean loyal customers, customers at risk of churn, or occasional visitors. A human has to read and interpret that meaning again.
The following distinctions matter.
| Distinction | Question | Why it matters |
|---|---|---|
| label-free evaluation | Are the inside of clusters compact, and are clusters separated from one another? | The perspective used when people do not know the answer |
| label-based evaluation | Is it similar to a distinction people already knew? | The perspective used when a comparable criterion exists |
| interpretation of the number of clusters | Are there too many clusters or too few? | The interpretability of the result changes |
| assigning meaning to clusters | Can the cluster IDs be connected to real business groups? | The analysis result must be convertible into action |
So clustering evaluation must think about both does the shape look plausible? and is it interpretable? In that sense, clustering brings in more interpretive work of looking at structure, comparing, and naming than simple score reading.
Social And Work Examples Of Clustering¶
Clustering is closer to finding hidden structure than to matching a known answer. That is why it appears often in early analysis, policy planning, and service operation.
| Scene | Example input | Example output | Why evaluation is sensitive |
|---|---|---|---|
| customer segmentation | purchase cycle, average order amount, visit frequency | customer groups A/B/C | even if groups appear, they are of little use if people cannot interpret them |
| regional policy analysis | population, income, transport, medical access | groups of similar regions | clustering may help administrative judgment, but stigma effects must be handled carefully |
| exploring topics in news and posts | word distribution, embeddings | groups of similar documents | a completely different conclusion may arise depending on cluster count and interpretation |
| exploring equipment anomaly patterns | vibration, temperature, pressure changes | groups of similar behaviors | later interpretation as anomaly clusters needs a basis |
In work settings, clustering usually leads to the following questions.
| Work question | What clustering does | What people do afterwards |
|---|---|---|
| Into what types do customers split? | It groups similar purchase patterns | People read the characteristics of each cluster and name them |
| Where are anomaly cases concentrated? | It finds groups unlike the general pattern | People check whether that group is actually risky |
| Is there a hidden pattern in operation logs? | It groups similar sequences | People connect it to incidents, deployments, and user behavior |
| Into what themes does a set of documents divide? | It groups similar documents | People interpret the clusters as topics or business categories |
So clustering should be understood less as a problem where the model gives the final answer and more as a problem where the model reveals structure first so that people can interpret further.
Detailed Learning Content¶
Misunderstanding Appears If The Same Kind Of Number Is Expected Across Problem Types¶
It is easy to think like this.
- classification also has a score
- regression also has a score
- clustering also has a score
- so in the end, doesn't a bigger number always mean better?
This reading misses an important difference.
| Problem type | What the number says | Point that is easy to misunderstand |
|---|---|---|
| classification | how many kinds of prediction mistakes were made | it is easy to think only high accuracy matters |
| regression | how large the numeric error is on average | it is easy to ignore unit and cost differences |
| clustering | how plausible the grouping structure looks | it is easy to assume an answer exists |
So before looking at a metric, the first check should be what is this model predicting?
In evaluation by problem type, the first question is fixed by what is this model predicting right now?
| Current problem type | Evaluation question to ask first | Representative starting metrics |
|---|---|---|
| classification | Which kind of error should be reduced more? | accuracy, precision, recall, F1 |
| regression | How far off is the number on average? | MAE, RMSE |
| clustering | Are the groups compact and separated? | silhouette or label-comparison metrics |
Cases And Examples¶
Case 1. Even With The Same Customer Data, The Evaluation Criterion Changes When The Question Changes¶
A service team is reviewing several tasks on the same customer dataset. People first split the work questions, such as should we find customers likely to churn, should we predict next month's purchase amount, and should we divide customers into similar groups.
The problem begins when the team expects the same kind of performance number simply because the dataset is the same. Churn prediction is a classification problem, so misses and false alarms must be examined. Purchase-amount prediction is a regression problem, so the size of error must be inspected. Customer segmentation is clustering, so the question becomes whether the grouping is interpretable even without answer labels. If everything is bundled under the same word score, the judgment criterion becomes blurry.
Here, separating the problem type becomes the starting point that changes the evaluation criterion. If it is classification, the first questions are around precision, recall, and F1. If it is regression, the size of error is read through metrics such as MAE or RMSE. If it is clustering, silhouette and human interpretability must be read together.
The checkable result is also read differently. Even with the same customer data, classification requires checking the number of missed positive cases, regression requires checking average error size, and clustering requires checking compactness within clusters and separation between clusters. In other words, the first thing that must change is not the data, but the question.
It becomes even clearer when the same customer table is drawn as a diagram that branches into different evaluation questions.
flowchart TD
A["same customer table"]
B["classification question<br/>who may churn?"]
C["regression question<br/>how much will they spend?"]
D["clustering question<br/>which groups appear?"]
E["read FP / FN and F1"]
F["read error size<br/>MAE / RMSE"]
G["read group structure<br/>silhouette / interpretation"]
A --> B
A --> C
A --> D
B --> E
C --> F
D --> G
Cases And Examples¶
Reading It Again Through Very Short Scene Comparisons¶
Even with the same data task, once the problem type changes, the reader's question changes completely.
| Same work scene | When read as classification | When read as regression | When read as clustering |
|---|---|---|---|
| customer data | Can it be divided into churn/stay? | Can next month's purchase amount be predicted? | Can it be grouped into similar customer groups? |
| mail data | Is it separated into spam/normal? | How high is the spam score? | Do similar email types gather together? |
| sensor data | Is it classified into failure/normal? | How accurately are temperature or vibration values predicted? | Do similar behavior patterns gather together? |
This table shows that the problem sentence must be rewritten before the algorithm is discussed. Even with the same dataset, when the question changes, the problem type changes, and then the evaluation criterion changes with it.
Practice And Examples¶
Trying Classification Through A Python Example¶
In classification, precision and recall can change even with a small shift in threshold. The following example shows that even with the same score, the result changes depending on from what score onward should the case be treated as positive.
The example below uses the true labels y_true, predicted scores scores, and several threshold values. In the result, inspect the prediction result by threshold, TP/TN/FP/FN, accuracy, precision, and recall together.
The key to check is that classification evaluation must be read as a final judgment after the threshold, not only as model scores. The balance between precision and recall can change depending on the threshold.
The output is as follows.
This example can be experimented with like this.
- change the threshold to
0.5,0.7, and0.9 - raise or lower one score slightly
- check in which cases recall goes up while precision goes down
So in classification, it is important to read through the flow model score -> threshold -> final judgment.
Trying Regression Through A Python Example¶
In regression, it is important to develop a feel for reading how large the error is in numbers. In particular, you need to see directly how much one large error shakes the metric.
The example below uses actual values y_true and predicted values y_pred to print absolute_errors, squared_errors, MAE, MSE, and RMSE.
The key to check is that regression metrics are criteria for reading how far numbers were off. MAE and MSE/RMSE read the same errors with different emphasis.
The output is as follows.
These numbers can be read like this.
- MAE means it was off by 1.75 on average.
- MSE reflects large errors more strongly.
- RMSE helps the reader return MSE to the feel of the original unit.
So in regression, how much was it wrong sits at the center of the metric.
Now insert one large error.
The example below compares a small-error prediction y_pred_small_error with a prediction that includes a large error, y_pred_big_error. In the result, inspect how absolute error, squared error, MAE, MSE, and RMSE change in the two cases.
The key to check is that MSE and RMSE react more sensitively when you want to penalize large failures more strongly. Even in the same regression problem, you need to choose which type of error to weigh more heavily.
The output is as follows.
This example directly raises the following questions.
- When one large error enters, which metric shakes more?
- Do we want to see average error, or do we want to punish large failures more strongly?
So regression metrics are tools that choose not only how wrong was the number but also which kind of wrong should be treated as heavier.
Trying Clustering Through A Python Example¶
Clustering becomes easier to understand when readers try it by hand. The following example is a very simple experiment that groups one-dimensional values by a distance criterion.
The example below uses a list of one-dimensional values points and several gap values to check how the grouping result changes according to the distance criterion.
The key to check is that the number of clusters and the composition of clusters change depending on the distance criterion. Clustering evaluation must be read together with the later step where people interpret the result again.
The output is as follows.
Now you can change the values a little and check how the clustering criterion changes.
- add
6.1topoints - change
gapto2.0 - check at what moment the number of clusters suddenly shrinks
For example, if 6.1 is added and gap = 1.5, then [4.8, 5.0, 6.1] may be read as one cluster. So clustering is closer not to a calculation that matches a correct answer, but to an experiment that asks where the criterion of similarity should be placed.
Checklist¶
- Can you explain why classification, regression, and clustering cannot help but give different meanings to
a good result? - Can you explain why in regression the first thing to read is
how far off was itrather than simply right-or-wrong? - Can you explain why clustering evaluation must include interpretability and structure reading together with a score?
- Can you explain that when the problem type changes, the meaning of
good performancechanges as well? - Can you explain why classification should read the kind of error first, regression the size and cost of error first, and clustering structure interpretation first?
- Can you explain that before choosing a metric, the model output and the usage scene must be checked first?
Sources And References¶
- scikit-learn developers,
Metrics and scoring: quantifying the quality of predictions, scikit-learn User Guide, accessed 2026-07-19. https://scikit-learn.org/stable/modules/model_evaluation.html - scikit-learn developers,
Clustering performance evaluation, scikit-learn User Guide, accessed 2026-07-19. https://scikit-learn.org/stable/modules/clustering.html#clustering-performance-evaluation