Solved
Contributor
Posts: 43

# Multi Classes SVM

Dear Members;

How to implement multi target svm in SAS Enterprise Miner 13.2?

I know the HPSVM is implemented for binary classification? Is there found any method to implement it now?

Regards

Accepted Solutions
Solution
‎07-15-2015 05:03 PM
SAS Employee
Posts: 15

## Re: Multi Classes SVM

Currently in enterprise miner the SVM node can only handle binary classification.

With a bit of work, you can get multi class SVM working. Here are the steps:

1) Create a new column for each level of the target. For column1, each observation should have a value of 1 if the target is level1 or 0 otherwise. For column2 each observation should have a value of 1 if the target is level2 or 0 otherwise. Repeat this for each level of the target.

2) Run a number of SVM models equal to the number of levels of the target. For each SVM model, specify the target as one of the newly created columns. You're using each created column as a binary target, and by creating an SVM model for each, you then have covered all of the levels of the target variable.

3) For the SVM model built on level1 you will get a probability that the target is level1, for the SVM model built on level2 you will get a probability that the target is level2, and so on. Choose the largest probability, and the level of the target associated with it.

4) For scoring new data, you score an observation using each model. Pick the level with the highest probability assigned to it from among all the models.

I hope this helps give some guidance.

All Replies
Solution
‎07-15-2015 05:03 PM
SAS Employee
Posts: 15

## Re: Multi Classes SVM

Currently in enterprise miner the SVM node can only handle binary classification.

With a bit of work, you can get multi class SVM working. Here are the steps:

1) Create a new column for each level of the target. For column1, each observation should have a value of 1 if the target is level1 or 0 otherwise. For column2 each observation should have a value of 1 if the target is level2 or 0 otherwise. Repeat this for each level of the target.

2) Run a number of SVM models equal to the number of levels of the target. For each SVM model, specify the target as one of the newly created columns. You're using each created column as a binary target, and by creating an SVM model for each, you then have covered all of the levels of the target variable.

3) For the SVM model built on level1 you will get a probability that the target is level1, for the SVM model built on level2 you will get a probability that the target is level2, and so on. Choose the largest probability, and the level of the target associated with it.

4) For scoring new data, you score an observation using each model. Pick the level with the highest probability assigned to it from among all the models.

I hope this helps give some guidance.

Contributor
Posts: 43

Dear Ralph