tf-svm-master

所属分类:人工智能/神经网络/深度学习
开发工具:Python
文件大小:163KB
下载次数:1
上传日期:2019-03-23 11:08:15
上 传 者中世纪!!
说明:  用tensorflow来以原始形式实现标准的二级正则化支持向量机(SVM)。
(how you can usetensorflow toimplement a standard L2-regularized support vector machine (SVM) in primal form.)

文件列表:
.ipynb_checkpoints\Untitled-checkpoint.ipynb (72, 2019-03-15)
figures\D.png (2003, 2017-08-30)
figures\L.png (2788, 2017-08-30)
figures\result.png (134790, 2017-08-30)
linearly_separable_data.csv (75080, 2017-08-30)
linear_svm.py (4525, 2017-08-30)
plot_boundary_on_data.py (735, 2017-08-30)
Untitled.ipynb (6993, 2019-03-15)
.ipynb_checkpoints (0, 2019-03-15)
figures (0, 2019-03-15)

Tensorflow Linear SVM === A demonstration of how you can use [TensorFlow](http://www.tensorflow.org/) to implement a standard L2-regularized support vector machine (SVM) in primal form. `linear_svm.py` optimizes the following SVM cost using gradient descent: ![](figures/L.png) where ![](figures/D.png) The first part of the cost function, i.e. the regularization part, is implemented by the `regularization_loss` expression, and the second part is implemented by the `hinge_loss` expression in the code. Run the code using `python linear_svm.py --train linearly_separable_data.csv --svmC 1 --verbose True --num_epochs 10` On a linearly separable, 2D data, the code gives the following decision boundary: The code here is inspired by the repository [try-tf](https://github.com/jasonbaldridge/try-tf).

近期下载者

相关文件


收藏者