<< nn_eval_performance Neural_Network_Functions nn_split_data >>

NeuralNet >> Neural_Network_Functions > nn_onehot

nn_onehot

One-hot Encoding

Parameters

Tin :

Index of classes, starting from 1 to m

Tout :

One-hot encoding output for Tin, in m x p, where m is the number of classes, and p is the number of datasets

Description

One-hot Encoding for target data in Feed-forward Back-Propagation Network Base on Andrew Ng's Coursera Deep-Learning Specialization Course.

Examples

P = [1 2 3 4; 1 2 3 4]./2 - 1; // Simple Normalization
Tc = [1 2 3 4];
T = nn_onehot(Tc); // Convert to one-hot encoding

See also

Authors


Report an issue
<< nn_eval_performance Neural_Network_Functions nn_split_data >>