org.encog.ml.data.buffer.codec
Class ExcelCODEC
- java.lang.Object
-
- org.encog.ml.data.buffer.codec.ExcelCODEC
-
- All Implemented Interfaces:
- DataSetCODEC
public class ExcelCODEC extends java.lang.Object implements DataSetCODEC
A CODEC that can read/write Microsoft Excel (*.XLSX) files.
-
-
Constructor Summary
Constructors Constructor and Description ExcelCODEC(java.io.File theFile)Constructor to create Excel from binary.ExcelCODEC(java.io.File theFile, int theInputCount, int theIdealCount)Create a CODEC to load data from Excel to binary.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()Close any open files.intgetIdealSize()intgetInputSize()voidprepareRead()Prepare to read from an external data source.voidprepareWrite(int recordCount, int inputSize, int idealSize)Prepare to write to an external data destination.booleanread(double[] input, double[] ideal, double[] significance)Read one record of data from an external source.voidwrite(double[] input, double[] ideal, double significance)Write one record of data to an external destination.
-
-
-
Constructor Detail
-
ExcelCODEC
public ExcelCODEC(java.io.File theFile)
Constructor to create Excel from binary.- Parameters:
theFile- The CSV file to create.
-
ExcelCODEC
public ExcelCODEC(java.io.File theFile, int theInputCount, int theIdealCount)Create a CODEC to load data from Excel to binary.- Parameters:
theFile- The Excel file to load.theInputCount- The number of input columns.theIdealCount- The number of ideal columns.
-
-
Method Detail
-
close
public void close()
Close any open files.- Specified by:
closein interfaceDataSetCODEC
-
getIdealSize
public int getIdealSize()
- Specified by:
getIdealSizein interfaceDataSetCODEC- Returns:
- The size of the ideal data.
-
getInputSize
public int getInputSize()
- Specified by:
getInputSizein interfaceDataSetCODEC- Returns:
- The size of the input data.
-
prepareRead
public void prepareRead()
Prepare to read from an external data source.- Specified by:
prepareReadin interfaceDataSetCODEC
-
prepareWrite
public void prepareWrite(int recordCount, int inputSize, int idealSize)Prepare to write to an external data destination.- Specified by:
prepareWritein interfaceDataSetCODEC- Parameters:
recordCount- The total record count, that will be written.inputSize- The input size.idealSize- The ideal size.
-
read
public boolean read(double[] input, double[] ideal, double[] significance)Read one record of data from an external source.- Specified by:
readin interfaceDataSetCODEC- Parameters:
input- The input data array.ideal- The ideal data array.significance- The significance. The first element will be modified to hold the significance.- Returns:
- True, if there is more data to be read.
-
write
public void write(double[] input, double[] ideal, double significance)Write one record of data to an external destination.- Specified by:
writein interfaceDataSetCODEC- Parameters:
input- The input data array.ideal- The ideal data array.significance- The significance (full = 1.0)
-
-
DMelt 3.0 © DataMelt by jWork.ORG