fanvanzh/3dtiles
This commit does not belong 提供外汇交易商Binary简介 to any branch on this repository, and may belong to a fork outside of the repository.
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
Launching 提供外汇交易商Binary简介 GitHub Desktop
If nothing happens, download GitHub Desktop 提供外汇交易商Binary简介 and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.提供外汇交易商Binary简介
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
English | 简体中文
Tools for 3D-Tiles convertion.
This is a RUST language project with cpp lib to handle osgb data.
Tools provided are as follow:
Osgb(OpenSceneGraph 提供外汇交易商Binary简介 Binary) to 3D-Tiles : convert huge of osgb 提供外汇交易商Binary简介 file to 3D-Tiles.
Esri Shapefile to 3D-Tiles : convert shapefile to 3D-Tiles.
Fbx to 3D-Tiles : convert fbx file to 3D-Tiles, include auto_lod\texture convertion etc.
支持向量机原理详解(八): 多类分类SVM
11.1 成对分类方法(提供外汇交易商Binary简介 one-against-one,pairwise classification)
成对分类方法(文献[6])是基于binary SVM的,也叫one-against-one(文献[2-3]),pairwise classification(文献[1]引入)。one-against-one适合实际应用(文献[3]),也是LIBSVM库采用的方法(文献[2])。
设训练集数据共 M 个类,one-against-one方法是在每两个类之间都构造一个binary SVM。以下图(a)为例,共三类(二维)数据,虚线 d_ 表示1类和2类数据之间的binary SVM的决策边界, d_ 表示1类和3类之间的决策边界, d_ 则表示2类和3类之间的决策边界。
成对分类方法,one-against-one
对于第 i 类和第 j 类数据,训练一个binary SVM即求解二次规划问题:
其中,上标表示是 i 类和 j 类之间binary SVM的参数;下标 t 表示 i 类和 j 类的并集中样本的索引; \phi 表示输入空间到特征空间的非线性映射。
(当然,求解的是 \left( \rm I \right) 的对偶问题。)
索引 i,j\in \left\< 1,\ldots,M \right\>, iM(M-1) 个binary SVMs。平均每个类包含 N/M 提供外汇交易商Binary简介 个样本,所以平均每个对偶问题包含 2N/M 个变量。
第 i 类和第 j 类之间binary SVM的决策函数:
(1)式用于判断数据是属于 i 类还是 j 类。
- 每个binary SVM根据其决策函数对新数据 \mathbf x_ 有一个预测(投票),以 i 类和 j 类之间的binary SVM为例,若对 \mathbf x_ 提供外汇交易商Binary简介 的预测为 i 类,则 i 类得票加1;否则 j 类得票加1;
- 最终得票最多的类别就是对 \mathbf x_ 的预测(Max Wins, [3]);
- 若出现平票的情况,(虽然可能不是一个好方法),简单地选择索引较小的那个类别作为对 \mathbf x_ 的分类。
11.2 一类对余类,one-against-all,one-against-the-rest
这种方法也好理解:对于每一个类,将其作为+1类,而其余 M-1 个类的所有样本作为-1类,构造一个binary SVM。如下图(a)所示,对于黄点所示的1类,将2类和3类都当成-1类,构造binary SVM,其决策边界为 d_1 ;对于蓝点所示的2类,则将1类和3类都当成-1类,构造binary SVM,其决策边界为 d_2 ;类似地得到 d_3 。
一类对余类,one-against-all
一般地,构造一个binary SVM将第 i 类与其余 M-1 类分开,即求解二次规划问题:
其中,下标 t 表示样本的索引;上标 i\in \left\ < 1,\ldots,M \right\>,一共需训练 M 个binary SVMs,求解 M 个包含 N 个变量的二次规划问题。
为避免平票,通常去掉决策函数(1)中的符号函数(signum function),第 i 类的决策函数采用:
(2)式可看作新数据 \mathbf x_ 到第 i 条决策边界的'带符号的函数间隔‘。因为在问题 \left( \rm II \right) 中我们把第 i 类当成+1类,所以如果 \mathbf x_ 属于第 i 类,那么一般来说(2)式应该是正的。
对于 \mathbf x_ , M 个决策函数一共有 M 个输出。我们选择使(2)式最大的类 i 作为对 \mathbf x_ 的预测(winner-takes-all, [1]),也就是说,采用如下的决策函数来对 \mathbf x_ 进行分类:
图(b)所示为相应的决策边界(文献[1])。若 \mathbf x_ 位于橙色区域,则 d_^1 最大, \mathbf x_ 会被预测为1类;同理,位于蓝色区域 d_^2 最大,会被预测为2类;位于红色区域 d_^3 最大,会被预测为3类。
个人理解:这会使得问题 \left( \rm II \right) 目标函数中的惩罚项主要由-1类样本的'error'组成,模型偏向于-1类。
其中, C^+, C^- 分别表示+1类和-1类的惩罚参数。对于样本数更少的+1类,采用更大的惩罚参数 C^+ 。
\begin &\min_<\mathbf \alpha>\mathbf -\mathbf>\\ &s.t. \ \ \ 0 \leq \mathbf \alpha_i \leq C^+, \ \ y_i=1\\ &\ \ \ \ \ \ \ \ \ \ 0 \leq \mathbf \alpha_i \leq C^-, \ \ y_i=-1\\ &\ \ \ \ \ \ \ \ \ \ \ \ \ \ \mathbf = 0 \\ \end\\
各个binary SVM可以通过交叉验证(cross-validation)来选择各自的最优参数(惩罚参数和核参数);也可对所有binary SVM采用相同的参数。
文献[7]Section 8比较了这两种方法在one-against-one的 \nu-\rm SVM 上的应用。文献[8]也有比较研究。这里就不做介绍了。
11.3 只需求解一个优化问题的多类方法
对于多类分类SVM,还有一种只需求解一个优化问题的方法(文献[4-5])。这种方法类似于one-against-all,构造 M 个二类的决策函数,其中第 m 个函数 \mathbf w_m^T\phi(\mathbf x_t) +b_m 将第 m 类和其余类分开。形成的优化问题如下:
解这个优化问题得到全部 M 个决策函数。
个人理解:不等式约束(3)表示第 y_t 类数据到第 y_t 个边界的'函数间隔'应该比到其余 M-1 个边界都要远。
文献[4-5]推导了问题 \left( \rm III \right) 的对偶问题。
关于支持向量机的学习暂时先到这里吧。至于 \nu-\rm SVM ,sci-kit learn(sklearn)库的svm模块等,以后有机会再继续学习。
[1] Krebel, U. H.-G. 1998. Pairwise classification and support vector 提供外汇交易商Binary简介 machines. In Advances in Kernel Methods – Support Vector Learning, B. Scholkopf, C. J. C. Burges, and A. J. Smola, Eds., MIT Press, Cambridge, MA, 255-268.
[2] C. C. Chang and C. J. Lin. 2001. LIBSVM: a library for support vector machines. http://www. csie . http:// ntu.edu.tw/cjlin/libsvm .
[3] C. W. Hsu and C. J. Lin. 2002. A comparison of methods for multi-class support vector machines. IEEE Trans. Neural 提供外汇交易商Binary简介 Netw. 13, 2, 415-425.
[4] J. Weston and C. Watkins. 1998. Multi-class support vector machines. Technical Report CSD-TR-98-04, Department of Computer Science, Royal Holloway, University of London.
[5] J. Weston and C. Watkins. Support vector machines for multi-class pattern recognition. In Proceedings of the Seventh European Symposium on Artificial Neural Networks, April 1999.
[7] P. H. Chen, C. J. Lin, and B. Scholkopf. 2005. A tutorial on \nu -support vector machines. Appl. Stochas. Models Bus. Indust. 21, 提供外汇交易商Binary简介 111-136.
[8] W. C. Kao, K. M. Chung, C. L. Sun, and C. J. Lin. 2004. Decomposition methods for linear support vector machines. Neural Computation, 16:1689-1704.
python运筹优化(一):Cplex for python使用简介
wuxiaojun
许多优化解决程序(商业的和开源的)都有用于建模LPs、MILPs和QPs的Python接口。这里我选择了CPLEX和Gurobi,因为它们都是领先的商业解决方案,还有PuLP,它是Python中一个强大的开源建模包。我将为每个包提供一个并行教程,我希望它能帮助您轻松地将模型从一个转换到另一个。在这里,我们使用gurobipy (Gurobi的Python API)、docplex(用于Python的IBM Decision Optimization CPLEX建模包)和pulp(用Python编写的LP/MILP建模器)。出于本文的目的,我假设您熟悉Python,即,您知道如何安装和使用Python包,以及使用Python数据结构,如列表、元组和字典。我还将假设您知道线性规划、混合整数规划和约束优化的基本知识。
二进制转十进制
本人编辑
©2022 Baidu 使用百度前必读 | 百科协议 | 隐私政策 | 百度百科合作平台 | 京ICP证030173号