Getting Started with Python Integration to SAS Viya for Predictive Modeling - Fitting a Support Vector Machine (SVM) Model

0

Fitting a Support Vector Machine (SVM) Model - Learn how to fit a support vector machine model and use your model to score new data

In Part 6, Part 7, Part 9, Part 10, and Part 11 of this series, we fit a logistic regression, decision tree, random forest, gradient boosting and neural network model to the Home Equity data we saved in Part 4. In this post we will fit a support vector machine (SVM) model to the same data to predict who is likely to go delinquent on their home equity loan and we will score data with this model.

What is Support Vector Machine (SVM)?

Support Vector Machines (SVM) are supervised machine learning models used for classification and regression tasks. They work by finding a boundary, known as a hyperplane, that best separates data points into different classes. In a classification context, the SVM identifies the hyperplane that maximizes the margin between the closest data points from each class, known as support vectors. This maximized margin helps the model make predictions with greater confidence and accuracy.

SVMs are particularly effective when working with data that is not linearly separable. This ability to handle both linear and non-linear relationships makes SVMs a versatile and powerful tool for predictive modeling tasks in a variety of domains.

What is the Support Vector Machine (SVM) Action Set?

The Support Vector Machine Action Set in SAS Viya offers an action for building support vector machine models.

Load the Modeling Data into Memory

Let’s start by loading our data we saved in Part 4 into CAS memory. I will load the sashdat file for my example. The csv and parquet file can be loaded using similar syntax.

conn.loadTable(path="homeequity_final.sashdat", caslib="casuser",
               casout={'name':'HomeEquity',
                               'caslib':'casuser', 'replace':True})

The home equity data is now loaded and ready for modeling.