org.encog.platformspecific.j2se.data.image
Class ImageMLDataSet
- java.lang.Object
-
- org.encog.ml.data.basic.BasicMLDataSet
-
- org.encog.platformspecific.j2se.data.image.ImageMLDataSet
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Iterable<MLDataPair>, MLDataSet
public class ImageMLDataSet extends BasicMLDataSet
Store a collection of images for training with a neural network. This class collects and then downsamples images for use with a neural network. This is a memory based class, so large datasets can run out of memory.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.encog.ml.data.basic.BasicMLDataSet
BasicMLDataSet.BasicMLIterator
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringMUST_USE_IMAGEError message to inform the caller that only ImageNeuralData objects can be used with this collection.
-
Constructor Summary
Constructors Constructor and Description ImageMLDataSet(Downsample theDownsampler, boolean theFindBounds, double theHi, double theLo)Construct this class with the specified downsampler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddownsample(int theHeight, int theWidth)Downsample all images and generate training data.intgetHeight()intgetWidth()-
Methods inherited from class org.encog.ml.data.basic.BasicMLDataSet
add, add, add, clone, close, get, getData, getIdealSize, getInputSize, getRecord, getRecordCount, isSupervised, iterator, openAdditional, setData, size, toList
-
-
-
-
Field Detail
-
MUST_USE_IMAGE
public static final java.lang.String MUST_USE_IMAGE
Error message to inform the caller that only ImageNeuralData objects can be used with this collection.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ImageMLDataSet
public ImageMLDataSet(Downsample theDownsampler, boolean theFindBounds, double theHi, double theLo)
Construct this class with the specified downsampler.- Parameters:
theDownsampler- The downsampler to use.theFindBounds- Should the bounds be found and clipped.theHi- The high value to normalize to.theLo- The low value to normalize to.
-
-
Method Detail
-
downsample
public final void downsample(int theHeight, int theWidth)Downsample all images and generate training data.- Parameters:
theHeight- The height to downsample to.theWidth- the width to downsample to.
-
getHeight
public final int getHeight()
- Returns:
- the height
-
getWidth
public final int getWidth()
- Returns:
- the width
-
-
DMelt 3.0 © DataMelt by jWork.ORG