简体   繁体   English

使用在Matlab中训练的SVM模型在python中进行分类

[英]Use SVM model trained in Matlab for classification in python

I have a SVM model trained in MATLAB (using 6 features) for which I have: 我有一个在MATLAB中训练的SVM模型(使用6个功能),具有以下功能:

  • Support Vectors [337 x 6] 支持向量[337 x 6]
  • Alpha [337 x 1] 阿尔法[337 x 1]
  • Bias 偏压
  • Kernel Function: @rbf_kernel 内核功能:@rbf_kernel
  • Kernel Function Args = 0.9001 内核函数Args = 0.9001
  • GroupNames [781 x 1] 群组名称[781 x 1]
  • Support Vector Indices [337 x 1] 支持向量指数[337 x 1]
  • Scale Data containing: 比例数据包含:
    • shift [1 x 6] 移位[1 x 6]
    • scale factor [1 x 6] 比例因子[1 x 6]

These above are all data that I am able to load in python. 以上是我能够在python中加载的所有数据。

Now I would like to use this model in python without retraining to perform classification in python. 现在,我想在python中使用此模型而无需重新训练以在python中执行分类。 In particular I would like to create a SVM model in python from the support vector generated in MATLAB 特别是,我想根据在MATLAB中生成的支持向量在python中创建SVM模型

Is it possible? 可能吗? How? 怎么样? Any help would be very appreciated! 任何帮助将不胜感激! I can't retrain it in python because I don't have the training data (and labels) anymore. 我无法在python中对其进行再培训,因为我再也没有了培训数据(和标签)。

我想您了解SVM的工作原理,所以我要做的是再次在python上仅在找到的支持向量上训练模型,而不是在所有原始训练数据上训练,结果应该保持不变(就像您对SVM进行了训练一样)完整数据),因为支持向量是数据中位于边界上的“有趣”向量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM