A classifier predicts a categorical outcome from input data. In supervised learning, it learns patterns from historical examples with known labels, then predicts labels for unseen data. This differs from regression, which predicts a continuous value: “fraudulent or genuine” is a classification target, while revenue is a regression target. section 1.5.1
To frame a classification problem:
- Identify the categories to predict and the labeled examples available for training. section 1.5.1
- Separate input attributes from the target label. For customer churn, attributes include revenue, service duration, cost, and usage; the target is churned Y/N. section 1.5.1
- If the input is text, clean it and represent it numerically before analysis. Tokenization, bag-of-words, and TF-IDF are among the described preparation techniques. section 7.0 section 7.20
Table 1.3 Example of a structured dataset for a telecom operator showing multiple data attributes
|
ID
|
Revenue ($)
|
Duration of service (years)
|
Avg. cost
|
Monthly usage (days)
|
Churned (Y/N)
|
|---|---|---|---|---|---|
|
1001
|
100
|
1.1
|
0.10
|
10
|
Y
|
|
1002
|
200
|
4.1
|
0.09
|
25
|
N
|
|
1003
|
300
|
5.2
|
0.05
|
28
|
N
|
|
1004
|
200
|
0.9
|
0.25
|
11
|
Y
|
|
1005
|
100
|
0.5
|
0.45
|
12
|
Y
|
The telecom table makes the input–target distinction concrete: several customer attributes accompany one categorical churn label. section 1.5.1
Logistic regression is one approach to classification. Its sigmoid function produces scores between 0 and 1, unlike a linear regression line, which can produce values outside that range. The choice of model should follow the target: a categorical outcome calls for classification, even when a method’s name includes “regression.” section 1.5.1
Classifying incoming text
News categorization assigns incoming articles to categories such as sports, politics, science, or business based on their text. Spam filtering instead predicts whether an incoming email belongs in the spam folder, using information such as its sender, subject, body, and attachments. Both are presented as supervised-learning applications. section 7.3
A binary classifier can also serve inside another model. In a generative adversarial network, the discriminator distinguishes real data from synthetic data, assigning higher probabilities to real examples and lower probabilities to generated ones. section 10.4.2






























