Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
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.
/*
* 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 .
*/
/*
* DateToNumeric.java
* Copyright (C) 2006-2017 University of Waikato, Hamilton, New Zealand
*/
package weka.filters.unsupervised.attribute;
import java.util.*;
import weka.core.*;
import weka.core.Capabilities.Capability;
import weka.filters.SimpleBatchFilter;
/**
*
* A filter for turning date attributes into numeric ones.
* The numeric value will be the number of milliseconds since January 1, 1970, 00:00:00 GMT,
* corresponding to the given date."
*
*
*
*
* Valid options are:
*
*
*
* -R <col1,col2-col4,...>
* Specifies list of attributes to turn into numeric ones. Only date attributes will be converted.
* First and last are valid indexes.
* (default: first-last)
*
*
*
* -V
* Invert matching sense of column indexes.
*
*
*
*
* @author eibe (eibe at waikato dot ac dot nz)
* @version $Revision: 14274 $
*/
public class DateToNumeric extends SimpleBatchFilter implements WeightedInstancesHandler, WeightedAttributesHandler {
/** for serialization */
private static final long serialVersionUID = -6614650822291796239L;
/** Stores which columns to turn into numeric attributes */
protected Range m_Cols = new Range("first-last");
/** The default columns to turn into numeric attributes */
protected String m_DefaultCols = "first-last";
/**
* Returns a string describing this filter
*
* @return a description of the filter suitable for displaying in the
* explorer/experimenter gui
*/
@Override
public String globalInfo() {
return "A filter for turning date attributes into numeric ones. The numeric value will be the number " +
"of milliseconds since January 1, 1970, 00:00:00 GMT, corresponding to the given date.";
}
/**
* Gets an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration