10 2015 档案
SVMtoy
摘要:SVMtoy[label_matrix, instance_matrix] = libsvmread('ex8b.txt');options = '';% contour_level = [-1 0 1];contour_level = [-0.2 0.2 1 2];% function svm...
阅读全文
SVMshow
摘要:SVMshow% http://www.peteryu.ca/tutorials/matlab/visualize_decision_boundaries% load RankData% NumTrain =200;load RankData2lambda = 20;rho = 1;c1 =10;c...
阅读全文
Matlab boxplot for Multiple Groups(多组数据的箱线图)
摘要:在画之前首先介绍一下Matlabboxplot,下面这段说明内容来自http://www.plob.org/2012/06/10/2153.html由于matlab具有强大的计算功能,用其统计数据功能优点显而易见,这里分享使用matlab中的boxplot的一些技巧,供大家参考。Matlabboxp...
阅读全文
GPOR
摘要:[tengzhenzhen15@lu01 gpor]$ for ((i=0; i0,1)=1; Error(k) = mean(TrueD); AbsErr(k) = mean(abs(D));end [tengzhenzhen15@lu01 gpor]$ for ((i=0; i<=...
阅读全文
MATLAB 生成数据保存至文件
摘要:% load pyrim% NumTrain = 50;% load machine%NumTrain = 150;% load housing% NumTrain = 300;% load abalone% NumTrain = 1000;% load bank32nh% NumTrain = 3...
阅读全文
Linux Bash代码 利用for循环实现命令的多次执行
摘要:Linux Bash代码[yuanhao15@lu01 libsvm-rank-2.81]$ for ((i=0; i<=19; i++)) do ./svm-train -s 5 -c 10 -t 0 X4058_300/mytask_train.$((i)); done[yuanhao15@l...
阅读全文
DataProcessing
摘要:clearload X4058[m,n]=size(X528);Mean=zeros(1,n);Dev=zeros(1,n);for i=1:n Xi=X528(1:end-1,i); Xi(Xi==0)=[]; Mean(i) = mean(Xi); Dev(i) = st...
阅读全文
boxplot
摘要:x1 = rand(20,6);x2 = .5+rand(20,6);x3 = randn(20,6);x = [x1;x2;x3]; x = x(:);g1 = [ones(size(x1)); 2*ones(size(x2)); 3*ones(size(x3))]; g1 = g1(:);g2 ...
阅读全文
Collaborative Filtering
摘要:for i=1:6040Ai=ratings(ratings(:,1)==i,:);for j=1:5Labnum(i,j)=length(Ai(Ai(:,3)==j));endnum(i)=length(Ai(:,1));endnum=[[1:6040]',num'];numsort=sortro...
阅读全文
Python中T-SNE实现降维
摘要:Python中T-SNE实现降维from sklearn.manifold import TSNEfrom sklearn.datasets import load_irisfrom sklearn.decomposition import PCAimport matplotlib.pyplot a...
阅读全文
tsne降维可视化
摘要:Python代码:准备训练样本的数据和标签:train_X4000.txt、train_y4000.txt 放于tsne.py当前目录.(具体t-SNE – Laurens van der Maatenhttp://lvdmaaten.github.io/tsne/,Python implement...
阅读全文