資源簡介
matlab開發-SMOTEBoost。用于處理數據中類不平衡問題的SMOTEBoost算法的實現。

代碼片段和文件信息
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
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????209??2012-06-25?18:10??SMOTEBoost\ARFFheader.txt
?????文件?????????621??2012-06-25?18:11??SMOTEBoost\ClassifierPredict.m
?????文件????????1013??2012-01-18?02:58??SMOTEBoost\ClassifierTrain.m
?????文件?????????914??2012-01-17?21:58??SMOTEBoost\CSVtoARFF.m
?????文件???????24192??2011-11-22?21:16??SMOTEBoost\data.csv
?????文件????????3102??2012-06-25?23:17??SMOTEBoost\README.txt
?????文件????????7971??2012-06-25?18:36??SMOTEBoost\SMOTEBoost.m
?????文件?????????883??2012-06-25?23:17??SMOTEBoost\Test.m
?????文件?????6467130??2011-10-28?17:57??SMOTEBoost\weka.jar
?????文件????????1310??2014-02-12?14:03??license.txt
評論
共有 條評論