How to load two ARFF file in Matlab?

조회 수: 5 (최근 30일)
afef
afef 2017년 4월 24일
I want to load ARFF file to matlab and i find this function
function wekaOBJ = loadARFF(filename)
import weka.core.converters.ArffLoader;
import java.io.File;
loader = ArffLoader();
loader.setFile(File('train.arff'));
wekaOBJ = loader.getDataSet();
wekaOBJ.setClassIndex(wekaOBJ.numAttributes -1);
end
But when i try to load 2 ARFF files with this code i only get the last file.How can i solve this ?
function wekaOBJ = loadARFF(filename)
import weka.core.converters.ArffLoader;
import java.io.File;
loader = ArffLoader();
loader.setFile(File('train.arff'));
wekaOBJ = loader.getDataSet();
wekaOBJ.setClassIndex(wekaOBJ.numAttributes -1);
loader = ArffLoader();
loader.setFile(File('test.arff'));
wekaOBJ = loader.getDataSet();
wekaOBJ.setClassIndex(wekaOBJ.numAttributes -1);
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by