Icon

SVM

SVM Exercise with Parameter Optimization
Use Case DescriptionThe dataset for this exercise contains 2D attributes of silhouettes created by different types of vehicles. The last column isthe target column, describing the 4 types of vehicles (bus, Opel, Saab, and van). The main goal is to train a classifier with17 silhouette attributes to predict the vehicle type. The silhouette attributes are numerical, and have been normalized to[0,1] scale. We use a support vector machine (SVM) as a classification model. We explore an optimal parameter for theSVM setting. Exercise: SVM1). Read the data (vehicle.table) with a Table Reader node.2). Split the data with a Partitioning node into the training (80%) and testing (20%) data sets. Use stratified sampling topreserve the target distribution on Col18.3). Train an SVM classifier with the SVM Learner node. Use the RBF kernel with sigma=0.5.4). Use the trained model to predict the vehicle type with the SVM Predictor node5). Assess the classification outcome by examining the confusion matrix with the Scorer node.6). Determine the optimal margin hardness by varying the Overlapping penalty in the SVM learner node with a ParameterOptimization Loop.6a). For the Parameter Optimization Loop Start, create a parameter “c” ranging from 1 to 25, with the step size of 2.6b). Use the parameter c to control “c_parameter” in the SVM Learner flow variable.6c). Connect the flow variable output from the Scorer node to the Parameter Optimization Loop End. Maximize theAccuracy. PartitionTraining (80%)Testing (20%)Train modelApply modelReadingvehicle.tabledataLoop overOverlapping penaltyMaximize accuracy Partitioning SVM Learner SVM Predictor Scorer Table Reader Parameter OptimizationLoop Start ParameterOptimization Loop End Use Case DescriptionThe dataset for this exercise contains 2D attributes of silhouettes created by different types of vehicles. The last column isthe target column, describing the 4 types of vehicles (bus, Opel, Saab, and van). The main goal is to train a classifier with17 silhouette attributes to predict the vehicle type. The silhouette attributes are numerical, and have been normalized to[0,1] scale. We use a support vector machine (SVM) as a classification model. We explore an optimal parameter for theSVM setting. Exercise: SVM1). Read the data (vehicle.table) with a Table Reader node.2). Split the data with a Partitioning node into the training (80%) and testing (20%) data sets. Use stratified sampling topreserve the target distribution on Col18.3). Train an SVM classifier with the SVM Learner node. Use the RBF kernel with sigma=0.5.4). Use the trained model to predict the vehicle type with the SVM Predictor node5). Assess the classification outcome by examining the confusion matrix with the Scorer node.6). Determine the optimal margin hardness by varying the Overlapping penalty in the SVM learner node with a ParameterOptimization Loop.6a). For the Parameter Optimization Loop Start, create a parameter “c” ranging from 1 to 25, with the step size of 2.6b). Use the parameter c to control “c_parameter” in the SVM Learner flow variable.6c). Connect the flow variable output from the Scorer node to the Parameter Optimization Loop End. Maximize theAccuracy. PartitionTraining (80%)Testing (20%)Train modelApply modelReadingvehicle.tabledataLoop overOverlapping penaltyMaximize accuracy Partitioning SVM Learner SVM Predictor Scorer Table Reader Parameter OptimizationLoop Start ParameterOptimization Loop End

Nodes

Extensions

Links