zoukankan      html  css  js  c++  java
  • Liblinear and Libsvm-rank训练数据的bash代码

    Liblinear and Libsvm-rank训练数据的bash代码:

    for j in  "amazon_mp3" "video_surveillance" "tablets" "mobilephone" "cameras" "TripAdvisor" "chunyu" "Treebank" "MovieReview" "yelp_review" "LargeMovie" "Electronics_5" "Health_and_Personal_Care_5" "Apps_for_Android_5" "Home_and_Kitchen_5"
    do
    	echo -e "SVC bias $j "	
    	./train -s 3 -c 0.03125 -v 5 -B 1 -C $j.train
    	./predict $j.test $j.train.model SVC1.$j.out.txt
    	echo -e "SVOR bias $j "	
    	./train -s 8 -c 0.03125 -v 5 -B 1 -m 2 -C $j.train
    	./predict $j.test $j.train.model SVOR1.$j.out.txt
    	echo -e "REDSVM bias $j "	
    	./train -s 8 -c 0.03125 -v 5 -B 1 -m 1 -C $j.train
    	./predict $j.test $j.train.model REDSVM1.$j.out.txt	
    	echo -e "SVMOP bias $j "		
    	./train -s 10 -c 0.03125 -v 5 -B 1 -m 2 -C $j.train
    	./predict $j.test $j.train.model SVMOP1.$j.out.txt
    	echo -e "NPSVOR bias $j "
    	./train -s 9 -c 0.03125  -v 5 -B 1 -C $j.train
    	./predict $j.test $j.train.model NPSVOR1.$j.out.txt
    	echo -e "SVR bias $j "
    	./train -s 13 -c 0.03125  -p 0.1 -B 1 -v 5 -C $j.train
    	./predict $j.test $j.train.model SVR1.$j.out.txt				
    done
    
    data=("amazon_mp3" "video_surveillance" "tablets" "mobilephone" "cameras" "TripAdvisor" "chunyu" "Treebank" "MovieReview" "yelp_review" "LargeMovie" "Electronics_5" "Health_and_Personal_Care_5" "Apps_for_Android_5" "Home_and_Kitchen_5")
    redsvm=(0.5  1 0.5 0.5 1 0.5 2 0.25 8 0.25 0.25 1 0.5 1 1)
    svor=(1 1 0.5 0.5 1 0.5 2 2 4 0.25 0.125 1 0.25 1 1)
    for k in {0..14}
    do
    	j=${data[$k]}
    	cr=${redsvm[$k]}
    	cs=${svor[$k]}
    	echo -e "SVOR bias $j "	
    	./svm-train -s 6 -t 0 -c $cs $j.train
    	./svm-predict $j.test $j.train.model SVOR1.$j.out.txt
    	echo -e "REDSVM bias $j "	
    	./svm-train -s 5 -t 0 -c $cr $j.train
    	./svm-predict $j.test $j.train.model REDSVM1.$j.out.txt				
    done
    
  • 相关阅读:
    深入浅出设计模式【转载】
    将EXCEL数据入ACCESS
    SFDC中的DEBUG
    2017新开始
    js获取窗体大小
    VS2005和VS2008快捷键大全
    Office云平台性能测试人员,全国火热征集中
    JQuery设置cookie|JQuery删除cookie|JQuery获取cookie 过期
    xpath操作xml
    Aptana中的中文显示乱码问题 .
  • 原文地址:https://www.cnblogs.com/huadongw/p/6440151.html
Copyright © 2011-2022 走看看