How to Use libsvm in linux with Ubuntu (installation and test)

step_1 Download the original sources from website

  1. you could click it or use the command wget
  2. then you will get the file like following:
    在这里插入图片描述

step_2 decompress the download file into “libsvm-3.25”

  1. use the command tar -zxvf libsvm-3.25.tar.gz and you will get the following file
    在这里插入图片描述

step_3 compile the source file into executable file

  1. use sudo chmod 777 libsvm-3.25 to give the file power to compile
  2. cd libsvm-3.25/
  3. make
  4. then you will see some executive files
    在这里插入图片描述

step_4 now you could find a dataset to conduct your experiment

  1. I test my work with data file heart_scale

  2. use the command ./svm-train heart_scale(note that heart-scale and svm-train are in same path folder) to train the default svm model with heart_scale database, the results shows as follows:
    在这里插入图片描述
    在这里插入图片描述

  3. Then use the command ./svm-predict heart_scale heart_scale.model heart_scale.predict to test the accuracy heart_scale.model. Note that owing to no file heart_scale.t in this folder, I JUST use the training database to make this test and got the following results:
    在这里插入图片描述

Anyway, I just to say the process installing libsvm into my linux is correct. and I log it just to wish it could help more folks know about this awesome portable classication tools.

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值