Split the data into training and testing dataset
Input data
Target data
Ratio for testing dataset, from 0 - 1
Random seed
This function used to split the data into training and testing dataset.
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);