Azzera filtri
Azzera filtri

How to load two ARFF file in Matlab?

1 visualizzazione (ultimi 30 giorni)
afef
afef il 24 Apr 2017
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

Risposte (0)

Categorie

Scopri di più su Statistics and Machine Learning Toolbox in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by