liveBook · Manning

Hyperplane

As explained in AI-Powered Search

A separating hyperplane is a flat boundary in a feature space that divides examples into regions associated with different classes or ranking outcomes.

A hyperplane is a flat boundary that divides a feature space into two regions. In search, it can separate relevant results from irrelevant ones. section 10.4.1

An SVM chooses a separating hyperplane that limits training mistakes while remaining generalizable to unseen examples. Feature normalization matters because unequal ranges can distort the boundary and give one feature undue influence. section 10.4.1

The vector orthogonal to the hyperplane provides feature weights and points toward relevance. In a ranking model, stronger weights on title_bm25 and overview_bm25 indicate greater influence on scoring. section 10.5.1

From animal classification to search ranking

A line can separate dogs from cats using height and weight. The same idea separates relevant and irrelevant search results using features such as normalized title_bm25, overview_bm25, and release_year. section 10.4.1 section 10.5.1

Figure 10.4 SVM example: Is an animal a dog or a cat? This hyperplane (the line here) separates these two cases based on two features: height and weight. Soon you’ll see how we might do something similar to separate relevant and irrelevant search results for a query.
figure

Visualizes a hyperplane separating two classes with height and weight, then connects the boundary to relevant and irrelevant search results. section 10.4.1

Listing 10.12 Training a linear SVM with scikit-learn
from sklearn import svm
model = svm.LinearSVC(max_iter=10000  #1
model.fit(feature_deltas, predictor_deltas)  #2
display(model.coef_) #3

Shows a scikit-learn LinearSVC trained on feature deltas and predictor deltas to learn the hyperplane’s feature-weight vector. section 10.5.1

How AI-Powered Search covers it

How deep it goes
Defines geometric separation and connects it to ranking weights, while stopping short of an in-depth SVM treatment.
Examples
Uses dog-cat classification, height and weight, search-result features, feature deltas, and a LinearSVC implementation.
What it assumes
Assumes feature vectors and binary classification while explaining geometric boundaries without requiring machine-learning expertise.
What you can do after
Evaluate how a learned boundary separates classes and interpret its orthogonal vector as ranking feature weights.
How it connects
Connects binary classification, support vector machines, feature normalization, learning to rank, and scoring functions.

Also explained in

Compare how 6 books explain hyperplane →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI-Powered Search. The section links point to the parts of the book it draws on.