gpt4 book ai didi

MATLAB 火车接口(interface) LIBLINEAR

转载 作者:行者123 更新时间:2023-11-30 08:40:10 25 4
gpt4 key购买 nike

LIBLINEAR docs ,我们有

matlab> model = train(training_label_vector, training_instance_matrix [,'liblinear_options', 'col']);

-training_label_vector:
An m by 1 vector of training labels. (type must be double)
-training_instance_matrix:
An m by n matrix of m training instances with n features.
It must be a sparse matrix. (type must be double)
-liblinear_options:
A string of training options in the same format as that of LIBLINEAR.
-col:
if 'col' is set, each column of training_instance_matrix is a data instance. Otherwise each row is a data instance.

但是,即使阅读了主页并查看了文档,我也无法找到 liblinear_options 的选项。

这是否已在某处列出,但我显然错过了?

此外,由于我无法找到任何地方列出的 liblinear_options,因此我遇到了以下问题:

train 方法是否使用线性 SVM 来开发模型?

最佳答案

Liblinear是一个线性分类器。除了SVM之外,它还包括基于逻辑回归的分类器。是的,正如其名称所示,线性核应用于 SVM。

您可以查看他们的github page对于liblinear_options。我也将它们复制到这里:

"liblinear_options:\n"
"-s type : set type of solver (default 1)\n"
" 0 -- L2-regularized logistic regression (primal)\n"
" 1 -- L2-regularized L2-loss support vector classification (dual)\n"
" 2 -- L2-regularized L2-loss support vector classification (primal)\n"
" 3 -- L2-regularized L1-loss support vector classification (dual)\n"
" 4 -- multi-class support vector classification by Crammer and Singer\n"
" 5 -- L1-regularized L2-loss support vector classification\n"
" 6 -- L1-regularized logistic regression\n"
" 7 -- L2-regularized logistic regression (dual)\n"
"-c cost : set the parameter C (default 1)\n"
"-e epsilon : set tolerance of termination criterion\n"
" -s 0 and 2\n"
" |f'(w)|_2 <= eps*min(pos,neg)/l*|f'(w0)|_2,\n"
" where f is the primal function and pos/neg are # of\n"
" positive/negative data (default 0.01)\n"
" -s 1, 3, 4 and 7\n"
" Dual maximal violation <= eps; similar to libsvm (default 0.1)\n"
" -s 5 and 6\n"
" |f'(w)|_1 <= eps*min(pos,neg)/l*|f'(w0)|_1,\n"
" where f is the primal function (default 0.01)\n"
"-B bias : if bias >= 0, instance x becomes [x; bias]; if < 0, no bias term added (default -1)\n"
"-wi weight: weights adjust the parameter C of different classes (see README for details)\n"
"-v n: n-fold cross validation mode\n"
"-q : quiet mode (no outputs)\n"

关于MATLAB 火车接口(interface) LIBLINEAR,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21340056/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com