Task Types
Binary Classification
In shortA supervised machine learning task where the model sorts each item into one of exactly two classes, such as yes or no, spam or not spam.
Binary classification is a supervised machine learning task in which the model predicts one of exactly two outcomes for each item. Is this page mobile-friendly, yes or no? Is this review spam? Is this query written by a person or generated by a machine? It is the simplest shape a classification problem can take, and often the best place to start.
How it works
You train the model on labelled examples, where each example already has the right answer (1 for the positive class, 0 for the negative). Most binary classifiers output a probability for the positive class, and a threshold, often 0.5, turns that probability into a label. Moving the threshold trades one kind of mistake for another: a lower threshold catches more true positives but lets in more false alarms.
Common algorithms include logistic regression, decision trees, random forests and support vector machines. Results are judged with a confusion matrix and metrics such as precision, recall and accuracy.
How it’s used in SEO and marketing
- Performance prediction. Will this page reach the top 10, yes or no, using features such as content length, title structure and search volume.
- Query screening. MLforSEO’s synthetic vs user query notebook separates queries into two classes with both rule-based and machine learning detection.
- Quality flags. Spammy or safe backlink, review to report or keep, branded or non-branded query.
- Marketing. Will this customer churn, will this subscriber open the email.
Example
Say you want to flag pages that need a content refresh. You label 300 pages from last year as “refreshed and improved” or “did not need it”, add features such as age, clicks trend and word count, and train a logistic regression. The model then gives every live page a probability, and you review the pages above your chosen threshold first.
Limitations and things to watch
- Imbalanced data. If 95% of examples are “no”, a model can look accurate by saying “no” to everything. Check precision and recall, and use resampling or class weights.
- Threshold choice. The default cut-off is rarely the best one for your use case; pick it based on the cost of each type of error.
- Labels decide quality. Inconsistent or biased labels produce a confidently wrong model.
- Two boxes may be too few. If items genuinely belong to several categories, use multi-class or multi-label classification instead.
Learn it on MLforSEO
Where Binary Classification shows up on MLforSEO
Learn it in a course
Read about it on the blog
Sources and further reading
Other terms from Task Types
- Anomaly DetectionAutomatically spotting data points or periods that differ sharply from the normal pattern, such as an unexpect…
- Clustering (ML Task)An unsupervised ML task that groups unlabelled data, such as keywords, pages or customers, by similarity so pa…
- Computer Vision (Image Recognition)The field of AI that lets machines interpret images and video, from recognising objects and text to describing…
- Content Transformation (ML)Using ML and generative AI to convert content between formats or adapt it for new platforms, e.g. video to tex…
- Keyword ExtractionAn NLP task that automatically pulls the most relevant words or phrases out of a text, used to summarise, tag…
- Multi-Class ClassificationClassification where each item gets exactly one label from three or more options, such as tagging a page as bl…
- Multi-Label ClassificationClassification where one item can receive several labels at once, such as tagging a post as both "analytics" a…
- Regression (ML Task)A supervised machine learning task that predicts a continuous number, such as traffic, revenue or click-throug…
- Search Intent ClassificationLabelling queries by what the searcher wants, such as informational, navigational, commercial or transactional…
