- 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
- Import desired data into a worksheet.
- Select X columns for training, and click the icon in the Apps Gallery panel.
- In the pop up dialog, select one column as training Y.
- If you want to make prediction for another dataset, check Predict checkbox, and select the dataset.
- In the Options tab, change the parameters as needed for your case. For details for each parameter, see Dialog Settings below.
- If the training X is 2 dimensions, in the Output tab, you can select to make territorial map plot or not.
- 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.