Classifying Data with Neural Networks
Create a net to compute the probability of a point lying in each cluster, using a "Class" decoder to classify the input as Red, Green or Blue:
Plot the degree of uncertainty of the classifier as measured by entropy as a function of the position:
Create a NetChain to perform the classification, using a "Class" decoder to interpret the output of the net as probabilities for each class:
NetTrain will automatically use a CrossEntropyLossLayer with a NetEncoder to interpret the class labels in the training data:
Use NetMeasurements to test the classification performance of the trained net on the test set:
Create a network with an input corresponding to each feature and using a "Boolean" decoder to interpret the output of the net as the probability of survival.
Train the net on the training data. NetTrain will automatically attach a CrossEntropyLossLayer["Binary"] layer to the output of the net:
Use NetMeasurements to test the accuracy of the trained net on the test set:
The accuracy is typically comparable to that obtained using Classify when specifying the method "LogisticRegression":
Create a NetGraph that will produce separate classifications for the high-level and low-level labels:
Train the network. NetTrain will automatically attach CrossEntropyLossLayer objects to both outputs, taking the target values from the training data using the corresponding names "Label" and "SubLabel":
From a random sample, select the images for which the net produces highest and lowest entropy predictions for "Label":
Use NetMeasurements to test the accuracy for both outputs of the net: