資源簡介
SVM(Support Vector Machine)指的是支持向量機,是常見的一種判別方法。在機器學習領域,是一個有監督的學習模型,通常用來進行模式識別、分類以及回歸分析。pca即主成分分析技術,又稱主分量分析。主成分分析也稱主分量分析,旨在利用降維的思想,把多指標轉化為少數幾個綜合指標。
代碼片段和文件信息
#include?“allInclude.h“
using?namespace?std;
using?namespace?cv;
using?namespace?cv::ml;
//僅僅svm?慢的一匹
void?getFiles(string?path?vector&?files)
{
intptr_t???hFile?=?0;
struct?_finddata_t?fileinfo;
string?p;
if?((hFile?=?_findfirst(p.assign(path).append(“\\*“).c_str()?&fileinfo))?!=?-1)
{
do
{
if?((fileinfo.attrib?&??_A_SUBDIR))
{
if?(strcmp(fileinfo.name?“.“)?!=?0?&&?strcmp(fileinfo.name?“..“)?!=?0)
getFiles(p.assign(path).append(“\\“).append(fileinfo.name)?files);
}
else
{
files.push_back(p.assign(path).append(“\\“).append(fileinfo.name));
}
}?while?(_findnext(hFile?&fileinfo)?==?0);
_findclose(hFile);
}
}
void?getBubblesvm(cv::Mat&?trainingImages?vector&?trainingLabels)//count第幾個訓練器??num第幾個
評論
共有 條評論