|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectml.shifu.guagua.example.nn.MemoryDiskMLDataSet
public class MemoryDiskMLDataSet
A hybrid data set combining BasicMLDataSet and BufferedMLDataSet together.
With this data set, element is added firstly in memory, if over maxByteSize then element will be added into
disk.
This data set provide a very important feature to make in memory computing more stable. Even for some cases no enough memory, memory and disk will be leveraged together to accelerate computing.
Example almost same as BufferedMLDataSet:
MemoryDiskMLDataSet dataSet = new MemoryDiskMLDataSet(400, "a.txt"); dataSet.beginLoad(10, 1); dataSet.add(pair); dataSet.endLoad(); Iteratoriterator = dataSet.iterator(); while(iterator.hasNext()) { MLDataPair next = iterator.next(); ... } dataSet.close();
| 构造方法摘要 | |
|---|---|
MemoryDiskMLDataSet(long maxByteSize,
String fileName)
Constructor with maxByteSize and fileName |
|
MemoryDiskMLDataSet(long maxByteSize,
String fileName,
int inputCount,
int outputCount)
Constructor with maxByteSize, fileName, inputCount and outputCount. |
|
MemoryDiskMLDataSet(String fileName,
int inputCount,
int outputCount)
Constructor with fileName, inputCount and outputCount |
|
| 方法摘要 | |
|---|---|
void |
add(org.encog.ml.data.MLData data)
|
void |
add(org.encog.ml.data.MLData inputData,
org.encog.ml.data.MLData idealData)
|
void |
add(org.encog.ml.data.MLDataPair inputData)
|
void |
beginLoad(int inputSize,
int idealSize)
Setting input variable size and output target size. |
void |
close()
|
void |
endLoad()
This method should be called once all the data has been loaded. |
long |
getDiskCount()
|
int |
getIdealSize()
|
int |
getInputSize()
|
long |
getMemoryCount()
|
void |
getRecord(long index,
org.encog.ml.data.MLDataPair pair)
|
long |
getRecordCount()
|
boolean |
isSupervised()
|
Iterator<org.encog.ml.data.MLDataPair> |
iterator()
|
static void |
main(String[] args)
|
org.encog.ml.data.MLDataSet |
openAdditional()
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public MemoryDiskMLDataSet(String fileName,
int inputCount,
int outputCount)
fileName, inputCount and outputCount
public MemoryDiskMLDataSet(long maxByteSize,
String fileName)
maxByteSize and fileName
public MemoryDiskMLDataSet(long maxByteSize,
String fileName,
int inputCount,
int outputCount)
maxByteSize, fileName, inputCount and outputCount.
| 方法详细信息 |
|---|
public final void beginLoad(int inputSize,
int idealSize)
inputSize - input variable sizeidealSize - output target sizepublic final void endLoad()
public Iterator<org.encog.ml.data.MLDataPair> iterator()
Iterable<org.encog.ml.data.MLDataPair> 中的 iteratorpublic int getIdealSize()
org.encog.ml.data.MLDataSet 中的 getIdealSizepublic int getInputSize()
org.encog.ml.data.MLDataSet 中的 getInputSizepublic boolean isSupervised()
org.encog.ml.data.MLDataSet 中的 isSupervisedpublic long getRecordCount()
org.encog.ml.data.MLDataSet 中的 getRecordCount
public void getRecord(long index,
org.encog.ml.data.MLDataPair pair)
org.encog.ml.data.MLDataSet 中的 getRecordpublic org.encog.ml.data.MLDataSet openAdditional()
org.encog.ml.data.MLDataSet 中的 openAdditionalpublic void add(org.encog.ml.data.MLData data)
org.encog.ml.data.MLDataSet 中的 add
public void add(org.encog.ml.data.MLData inputData,
org.encog.ml.data.MLData idealData)
org.encog.ml.data.MLDataSet 中的 addpublic void add(org.encog.ml.data.MLDataPair inputData)
org.encog.ml.data.MLDataSet 中的 addpublic void close()
org.encog.ml.data.MLDataSet 中的 closepublic long getMemoryCount()
public long getDiskCount()
public static void main(String[] args)
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||