Here's an example on how to use dlnetwork for regression in Matlab:
main.m969 chars39 lines
In this example, the housing dataset is loaded and split into training and testing sets. A dlnetwork with a sequence input layer, fully connected layer (with ReLu activation) and regression layer is defined. The network is trained using the training set and options set by trainingOptions
. Finally, the trained network is used to predict on the testing set, and the RMSE is calculated to evaluate the performance.
gistlibby LogSnag