<< nn_onehot Neural_Network_Functions nn_train >>

NeuralNet >> Neural_Network_Functions > nn_split_data

nn_split_data

Split the data into training and testing dataset

Parameters

P :

Input data

T :

Target data

test_ratio :

Ratio for testing dataset, from 0 - 1

seed :

Random seed

Description

This function used to split the data into training and testing dataset.

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
[P_train, T_train, P_test, T_test] = nn_split_data(P,T,0.25,3);

See also

Authors


Report an issue
<< nn_onehot Neural_Network_Functions nn_train >>