File Exchange > Data Analysis >    SVM Classification

Author:
OriginLab Technical Support
Date Added:
3/25/2020
Last Update:
1/9/2024
Downloads (90 Days):
506
Total Ratings:
4
File Size:
51 KB
Average Rating:
File Name:
SVM Classi...on.opx
File Version:
2.00
Minimum Versions:
License:
Free
Type:
App
Summary:

Support vector machine for classification.

Screen Shot and Video:
Description:

  • Note: Scikit-learn library is used for this app, so some related python libraries are needed for this app, such as setuptools, numpy, scipy, scikit-learn, scikit-image, and their dependent libraries. You can use pip to install them first.
  • Purpose
    This app can be used to perform the support vector machine algorithm for classification.
  • Features Include:
    • Peform support vector machine algorithm and output the related parameters.
    • Predict the class labels for specified data.
    • Multiple kernels are supported, including linear, poly, rbf, and sigmoid.
    • Decision function can be one vs rest or one vs one.
    • For 2 Dimensions' X data, territorial map plot is available for output.
  • Installation
    Download the file "SVM Classification.opx", and then drag-and-drop onto the Origin workspace. An icon will appear in the Apps gallery window.
  • Operation
    1. Import desired data into a worksheet.
    2. Select X columns for training, and click the icon in the Apps Gallery panel.
    3. In the pop up dialog, select one column as training Y.
    4. If you want to make prediction for another dataset, check Predict checkbox, and select the dataset.
    5. In the Options tab, change the parameters as needed for your case. For details for each parameter, see Dialog Settings below.
    6. If the training X is 2 dimensions, in the Output tab, you can select to make territorial map plot or not.
    7. Click OK button to create report.
  • Dialog Settings
    • Input Tab
      • Training X: X dataset of the samples.
      • Training Y: Y data of the samples.
      • Predict: If checked, perform prediction for the specified X dataset.
      • X to Predict: Available if Predict is checked, is to specified the X dataset for prediction.
    • Options Tab
      • Regularization Parameter: The strength of the regularization is inversely proportional to this regularization parameter. Its penalty is squred L2 penalty.
      • Kernel: Kernel type for the algorithm, including linear, poly, rbf, and sigmoid.
      • Degree: If kernel is poly, this is for specifying the degree of the polynomial kernel function.
      • Gamma: This is available when Kernel is poly, rbf or sigmoid. Default is scale.
      • Gamma Value: This is the value for specified gamma.
      • Independent Term: This is available when Kernel is poly or sigmoid, used to specify the independent term in kernel function.
      • Shrinking Heuristic: Whether to use the shrinking heuristic.
      • Estimate Probability: Whether to enable probability estimates.
      • Tolerance: Tolerance for stopping criterion.
      • Max Iterations: Max number of iterations for stopping the solver, and -1 for no limit.
      • Decision Function: Specify decision function, one vs rest or one vs one.
      • Specify Random State: Check to specify the seed of pseudo random number generator used when shuffling the data for probability estimates.
      • Random State: Specify the seed of pseudo random number generator.
    • Output Tab
      • Territorial Map: Check to output territorial map plot. This is for training X with 2 dimensions.
      • X1 Minimum: The minimum value of the first dimension of training X.
      • X1 Maximum: The maximum value of the first dimension of training X.
      • X2 Minimum: The minimum value of the second dimension of training X.
      • X2 Maximum: The maximum value of the second dimension of training X.
      • Number of Points for X1: Number of points for the first dimension of training X to make the territorial map plot.
      • Number of Points for X2: Number of points for the second dimension of training X to make the territorial map plot.
      • Report Table: The report table to output the results.
      • Report Data: The worksheet to output the report data.
    • OK: Click this button to create report.
    • Cancel: Close dialog without doing anything.
  • References
    • This app is calling sklearn.svm.SVC for the calculation, please refer to svm classification for more details.

Updates:

v2: Update to check the scikit-learn library installation
v1.9: Update to use Python 3.11
v1.8: Update to use pip command to install related Python libraries
v1.7: Fix bug for categorical data as x
v1.6: Update for Python 3.8
v1.5: Fix bug for colormap of territorial map
v1.4: Update for Origin 2021
v1.3: Support data filter for group (class) column
v1.2: Fixed bug of creating territorial map issue, and auto install dependent Python packages
v1.1: Fixed speed issue of updating plot and issue of dependent Python packages

Reviews and Comments:
01/03/2024  

08/16/2023段一雄 

08/28/2022XC1119796177It would be better if some teaching vidio regarding SVM can be uploaded.

10/27/2020venyipaulThank you OriginLab