University of Sydney · FACULTY OF ELECTRICAL ENGINEERING

ELEC5622 Chap.9 Classifying Medical Images: Bayes and SVM

- one subject, every graph, every model, every mark
7 Chapters4-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 9 of 12 · ELEC5622

Classifying Medical Images: Bayes and SVM

This chapter covers the decision-making half of image analysis. Naive Bayes multiplies class-conditional likelihoods by a prior. The linear SVM picks the separating hyperplane with the widest margin, defined by its support vectors, and kernels extend it to curved boundaries. Project 1 applies an SVM to 90 regional grey matter volumes to separate Alzheimer's patients from controls, after scaling every feature to a common range.

Every method is worked with small numbers so that the geometry of the margin and the arithmetic of the posterior can both be checked by hand. The chapter ends with the Project 1 rubric, so you can see how methods, results and discussion are weighted.

In this chapter

What this chapter covers

  • 01

    Applications of medical image classification

  • 02

    Bayes' theorem and the naive independence assumption

  • 03

    Linear SVM, the margin and support vectors

  • 04

    Hard-margin optimisation and the dual problem

  • 05

    Radial basis function and polynomial kernels

  • 06

    Soft margins and the C parameter

  • 07

    Feature normalisation for Project 1

Worked example · free

Classifying a point with a trained linear SVM

Q [3 marks]. A linear SVM has w = (2, −1) and b = −3. Classify x = (3, 1), say whether it lies outside the margin, and find the margin width. The marks are a study aid we chose and are not an official University assessment scheme.
A hard-margin separator for eight points.A hard-margin separator for eight points. The solid line x1 + x2 = 6 separates the classes, the dashed lines x1 + x2 = 4 and 8 bound the margin, and the three circled points lying on those lines are the support vectors.x1 + x2 = 6circled: support vectorsdashed: margin linescircles: class +1squares: class −1margin width 2√2
A hard-margin separator for eight points. The solid line x1 + x2 = 6 separates the classes, the dashed lines x1 + x2 = 4 and 8 bound the margin, and the three circled points lying on those lines are the support vectors.
  • 1Decision value w·x + b = 2 × 3 − 1 × 1 − 3 = 2.
  • 1The value is positive, so class +1, and since 2 ≥ 1 the point lies outside the margin.
  • 1‖w‖ = √(4 + 1) = √5, so the margin width is 2 / √5 ≈ 0.894.
Class +1, outside the margin; margin width ≈ 0.894. A point with decision value 0.5 would still be class +1 but would sit inside the margin, which a soft-margin SVM allows at a cost set by C.
Sia tip — Compare the decision value with ±1, not just with 0: values between −1 and 1 sit inside the margin.
Glossary

Key terms

Support vector
A support vector is a training point lying on a margin hyperplane whose removal would change the SVM solution.
Kernel function
A kernel function computes inner products in a mapped feature space without computing the mapping itself.
Naive Bayes classifier
A naive Bayes classifier assigns the class with the highest posterior, assuming features are independent within each class.
Slack variable
A slack variable measures how far a training point violates the margin in a soft-margin SVM.
Decision function
A decision function is the score an SVM computes for a point, whose sign gives the predicted class.
FAQ

Classifying Medical Images: Bayes and SVM FAQ

What does the C parameter do in a soft-margin SVM?

C weights the penalty on slack variables, the amounts by which points violate the margin. A large C punishes errors heavily and fits the training data closely; a small C tolerates some errors in exchange for a wider, often more general, margin.

Why normalise features before training the Project 1 SVM?

Regional volumes differ greatly in size, and the SVM measures distances, so large regions would dominate. Scaling each feature to zero mean and unit standard deviation over the training set puts every region on an equal footing.

Why is it called naive Bayes?

It assumes every feature is independent of the others within a class, so the joint likelihood becomes a simple product of single-feature likelihoods. The assumption is rarely exactly true but makes estimation feasible with few samples.

What is a support vector?

It is a training point that lies exactly on one of the two margin hyperplanes, so y(w·x + b) = 1. These points alone fix the separator; moving any other point, while it stays outside the margin, leaves the classifier unchanged.

When would you use an RBF kernel instead of a linear SVM?

When the classes cannot be separated by a hyperplane in the original features. The RBF kernel measures similarity by distance, so the boundary can curve around clusters; its width σ controls how local each training point's influence is.

How is the Project 1 report weighted?

The rubric gives 20% to aims and background, 30% to background and methods with use of sources, 20% to results and 30% to discussion and conclusion. The submission also includes predictions for the ten test subjects and a spreadsheet of the regional grey matter volumes.

Study strategy

Exam move

Work a two-class naive Bayes problem by hand, then change the prior to see when the decision flips. For SVMs, practise computing decision values, margin widths and support vectors on small 2D sets you can plot. Explain the kernel trick in two sentences and describe how C and the RBF width change the boundary.

Finish with the Project 1 workflow from images to predictions in five steps, marking where normalisation statistics must come from the training subjects only. Explain in one sentence why only support vectors carry weight in the decision function, and check it on the eight-point example in the chapter.

Working through Classifying Medical Images: Bayes and SVM in ELEC5622? Sia is AskSia’s AI Electrical Engineering tutor — ask any ELEC5622 Classifying Medical Images: Bayes and SVM question and get a clear, step-by-step explanation grounded in how ELEC5622 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 196 of your University of Sydney subjects - and 1,000+ Bibles across every Australian university.
Sia - your ELEC5622 tutor, unlimited, worked the way the exam marks it
The full 4-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works