Output weka results to text file
Asked Answered
M

2

6

I am new to Weka GUI and i want to output a list of correlations on different fields to a .txt file. My arff file is correct. Can anyone help ?

I have already managed it using the art writer with the api, but i can't seem to find from where using the guy.

Maritzamariupol answered 14/11, 2014 at 19:5 Comment(0)
B
8

In the "classify" tab there is a box in the bottom left with the Results list. Right click on the test you want to save, click on "save result buffer", select the location and name it whatever.txt. It will save the results of whatever test you ran as a .txt file.

Bournemouth answered 14/11, 2014 at 19:13 Comment(0)
H
1

If anyone is not using the GUI, but with code -

import java.io.BufferedWriter;
import java.io.FileWriter;

    public static void main(String[] args) throws Exception {
        Instances data = loadData("data.txt");
           /* Changes in data */
        BufferedWriter writer = new BufferedWriter(new FileWriter("test.txt"));
        writer.write(data.toString());
        writer.flush();
        writer.close();
    }
Hollah answered 19/4, 2018 at 7:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.