Data - Model
Source code in EpyNN/epynn/commons/models.py
.
EpyNN binds sample features (X_data) and label (Y_label) to the epynn.commons.models.dataSet
object. Such binding is automatically performed upon instantiation of an Embedding layer which is required as an input layer when performing training of a Neural Network with EpyNN.
When using the method model.predict()
from the EpyNN model with samples features (X_data) as argument, the method returns such dataSet
object. Therefore, one may easily call the instance variable attributes summarized below, including both probability and decision predictions for each sample from unlabeled data.
Note that any intermediates can be retrieved at the layer level by following guidelines from Base layer section.
DataSet Model
- class epynn.commons.models.dataSet(X_data, Y_data=None, name='dummy')[source]
Definition of a dataSet object prototype.
- Parameters
- __init__(X_data, Y_data=None, name='dummy')[source]
Initialize dataSet object.
- Variables
active (bool) – True if X_data is not empty.
X (
numpy.ndarray
) – Set of sample features.Y (
numpy.ndarray
) – Set of sample label.y (
numpy.ndarray
) – Set of single-digit sample label.b (dict[int: int]) – Balance of labels in set.
A (
numpy.ndarray
) – Output of forward propagation.P (
numpy.ndarray
) – Label predictions.name (str) – Name of dataset.