public class CSVToARFFHeaderReduceTask
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
CSVToARFFHeaderReduceTask() |
Modifier and Type | Method and Description |
---|---|
static weka.core.Instances |
aggregate(java.util.List<weka.core.Instances> headers)
Aggregates a list of Instances (headers) into a final Instances object.
|
static weka.core.Instances |
aggregateHeadersAndQuartiles(java.util.List<CSVToARFFHeaderMapTask.HeaderAndQuantileDataHolder> toAggregate)
Performs aggregation over a list of header and quantile data holder
objects.
|
static boolean |
headerContainsNumericAttributes(weka.core.Instances headerWithSummary)
Returns true if the supplied header contains numeric attributes
|
static boolean |
headerContainsQuartiles(weka.core.Instances headerWithSummary)
Returns true if the supplied header already has quartile infomration
calculated and there are numeric attributes in the data
|
static void |
main(java.lang.String[] args) |
static weka.core.Instances |
stripSummaryAtts(weka.core.Instances insts)
Utility method that returns a header Instances object without any summary
attributes.
|
static weka.core.Instances |
updateSummaryAttsWithQuartilesAndHistograms(weka.core.Instances trainingHeaderWithSummary,
QuantileCalculator quartiles,
java.util.Map<java.lang.Integer,NumericAttributeBinData> histograms)
Updates a header that contains summary attributes with quartiles and
histogram data.
|
public static weka.core.Instances aggregateHeadersAndQuartiles(java.util.List<CSVToARFFHeaderMapTask.HeaderAndQuantileDataHolder> toAggregate) throws DistributedWekaException
toAggregate
- the list of header and quantile data holders to
aggregate overDistributedWekaException
- if a problem occurspublic static weka.core.Instances aggregate(java.util.List<weka.core.Instances> headers) throws DistributedWekaException
headers
- a list of headers to aggregateDistributedWekaException
- if a problem occurspublic static weka.core.Instances stripSummaryAtts(weka.core.Instances insts) throws DistributedWekaException
insts
- the header to remove summary attributes fromDistributedWekaException
- if a problem occurspublic static weka.core.Instances updateSummaryAttsWithQuartilesAndHistograms(weka.core.Instances trainingHeaderWithSummary, QuantileCalculator quartiles, java.util.Map<java.lang.Integer,NumericAttributeBinData> histograms) throws DistributedWekaException
trainingHeaderWithSummary
- header with first pass summary dataquartiles
- QuartileCalculator containing quartiles to add to the
headerhistograms
- Map (keyed by attribute index) of histogram data for
numeric attributes to add to the headerDistributedWekaException
- if a problem occurspublic static boolean headerContainsNumericAttributes(weka.core.Instances headerWithSummary) throws DistributedWekaException
headerWithSummary
- a header (with summary attributes) to checkDistributedWekaException
- if a problem occurspublic static boolean headerContainsQuartiles(weka.core.Instances headerWithSummary) throws DistributedWekaException
headerWithSummary
- the header to checkDistributedWekaException
- if a problem occurspublic static void main(java.lang.String[] args)