SVM Margin Width
Instance-Based, Kernel & Probabilistic Methods DS practice problem on Onlearn.
Difficulty: medium.
Topics: Understanding the Geometric Margin in Support Vector Machines, Weight Vector Norm, Margin Maximization, Decision Boundary Geometry, Euclidean Distance Calculation, Feature Space Dimensionality, Linear Algebra, Optimization Theory, Statistical Learning Theory, Vector Calculus, Computational Geometry, Hyperplane Separation, L2 Regularization, Dual Problem Formulation, Support Vector Identification, Distance Metrics.
Given the weight vector 'w' of a trained linear Support Vector Machine, calculate the total margin width. The margin width is defined as 2 divided by the Euclidean norm (L2 norm) of the weight vector. Your function should accept a list of floats representing the weights and return the calculated margin width.