ELEC5622 Chap.9 Classifying Medical Images: Bayes and SVM
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.
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
- 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.
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.
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.
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.