neutompy.recon.nnfbp.TrainingData¶
-
class
neutompy.recon.nnfbp.TrainingData.
MATTrainingData
(fls, dataname='mat')[source]¶ Bases:
neutompy.recon.nnfbp.TrainingData.TrainingData
Implementation of
TrainingData
that uses a MAT files to store data.
-
class
neutompy.recon.nnfbp.TrainingData.
TrainingData
(data, nPoints, network, blockSize=10000)[source]¶ Bases:
object
Base object of a class that represents training or validation data used during training of a network.
An implementing class should define
getDataBlock
,addDataBlock
andnormalizeData
methods. See, for example,HDF5TrainingData
.Parameters: - data (DataSet) – Dataset to pick pixels from. (see
nnfbp.DataSet
) - nPoints (
int
) – Number of pixels to pick. - blockSize (
int
) – Size of each data block.
-
addDataBlock
(data, i)[source]¶ Add a block of data to the set.
Parameters: - data (
numpy.ndarray
) – Block of data to add. - i (
int
) – Position to add block to.
- data (
-
getDataBlock
(i)[source]¶ Get a block of data from the set.
Parameters: i ( int
) – Position of block to get.Returns: numpy.ndarray
– Block of data.
-
getMinMax
()[source]¶ Returns the minimum and maximum values of each column of the entire set.
Returns: tuple
with:minL
–numpy.ndarray
with minimum value of each column except last.maxL
–numpy.ndarray
with maximum value of each column except last.minIn
–float
minimum values of last column.maxIn
–float
maximum values of last column.
- data (DataSet) – Dataset to pick pixels from. (see