All Downloads are FREE. Search and download functionalities are using the official Maven repository.

weka.classifiers.evaluation.output.prediction.CSV Maven / Gradle / Ivy

Go to download

The Waikato Environment for Knowledge Analysis (WEKA), a machine learning workbench. This version represents the developer version, the "bleeding edge" of development, you could say. New functionality gets added to this version.

There is a newer version: 3.9.6
Show newest version
/*
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see .
 */

/*
 * CSV.java
 * Copyright (C) 2009-2012 University of Waikato, Hamilton, New Zealand
 */

package weka.classifiers.evaluation.output.prediction;

import java.util.Collections;
import java.util.Enumeration;
import java.util.Vector;

import weka.classifiers.Classifier;
import weka.core.Instance;
import weka.core.Option;
import weka.core.Utils;

/**
 *  Outputs the predictions as CSV.
 * 

* * * Valid options are: *

* *

 * -p <range>
 *  The range of attributes to print in addition to the classification.
 *  (default: none)
 * 
* *
 * -distribution
 *  Whether to turn on the output of the class distribution.
 *  Only for nominal class attributes.
 *  (default: off)
 * 
* *
 * -decimals <num>
 *  The number of digits after the decimal point.
 *  (default: 3)
 * 
* *
 * -file <path>
 *  The file to store the output in, instead of outputting it on stdout.
 *  Gets ignored if the supplied path is a directory.
 *  (default: .)
 * 
* *
 * -suppress
 *  In case the data gets stored in a file, then this flag can be used
 *  to suppress the regular output.
 *  (default: not suppressed)
 * 
* *
 * -use-tab
 *  Whether to use TAB as separator instead of comma.
 *  (default: comma)
 * 
* * * * @author fracpete (fracpete at waikato dot ac dot nz) * @version $Revision: 10169 $ */ public class CSV extends AbstractOutput { /** for serialization. */ private static final long serialVersionUID = 3401604538169573720L; /** the delimiter. */ protected String m_Delimiter = ","; /** * Returns a string describing the output generator. * * @return a description suitable for displaying in the GUI */ @Override public String globalInfo() { return "Outputs the predictions as CSV."; } /** * Returns a short display text, to be used in comboboxes. * * @return a short display text */ @Override public String getDisplay() { return "CSV"; } /** * Returns an enumeration of all the available options.. * * @return an enumeration of all available options. */ @Override public Enumeration




© 2015 - 2024 Weber Informatics LLC | Privacy Policy