資源簡介
matlab開發-RUSBoost。Rusboost是一種基于提升的采樣算法,用于處理類標記數據中的類不平衡。

代碼片段和文件信息
function?prediction?=?ClassifierPredict(datamodel)
%?Predicting?the?labels?of?the?test?instances
%?Input:?data?=?test?data
%????????model?=?the?trained?model
%????????type?=?type?of?classifier
%?Output:?prediction?=?prediction?labels
javaaddpath(‘weka.jar‘);
CSVtoARFF(data‘test‘‘test‘);
test_file?=?‘test.arff‘;
reader?=?javaobject(‘java.io.FileReader‘?test_file);
test?=?javaobject(‘weka.core.Instances‘?reader);
test.setClassIndex(test.numAttributes()?-?1);
prediction?=?[];
for?i?=?0?:?size(data1)?-?1
????p?=?model.classifyInstance(test.instance(i));
????prediction?=?[prediction;?p];
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????5049??2012-08-07?16:04??RUSBoost\test.arff
?????文件????????2408??2012-08-07?16:04??RUSBoost\resampled.arff
?????文件???????19554??2012-08-07?16:04??RUSBoost\train.arff
?????文件?????6467130??2011-10-28?20:57??RUSBoost\weka.jar
?????文件?????????917??2012-06-26?04:13??RUSBoost\Test.m
?????文件????????6205??2012-08-07?16:04??RUSBoost\RUSBoost.m
?????文件????????2643??2012-06-26?04:28??RUSBoost\README.txt
?????文件???????24192??2011-11-22?23:16??RUSBoost\data.csv
?????文件?????????914??2012-01-17?23:58??RUSBoost\CSVtoARFF.m
?????文件????????1013??2012-01-18?04:58??RUSBoost\ClassifierTrain.m
?????文件?????????621??2012-06-25?21:11??RUSBoost\ClassifierPredict.m
?????文件?????????209??2012-06-25?21:10??RUSBoost\ARFFheader.txt
?????文件????????1310??2014-02-12?14:05??license.txt
評論
共有 條評論