How do I compare the accuracy of a neural network classifier model to a random classifier?

조회 수: 2 (최근 30일)
Hi, I am attempting to show that the binary predictions made by my bidirectional LSTM neural network classifier are statistically significant, i.e. that the accuracy is more than that which may occur by chance using a 'random' classifier. I know that I can use McNemar's test to compare the accuracies achieved by 2 different models, but I am unsure as to which model to use as the 'random' or 'baseline' classifier.
Any suggestions would be greatly appreciated. Thanks in advance.

답변 (1개)

Vineet Joshi
Vineet Joshi 2021년 4월 19일
Hi
You can create a random classifier by simply using the randsample function. This function can return a randomly sampled class out of provided n classes.
On the other hand, a simple non-random ‘baseline’ classifier can be K nearest neighbor based.
The exact baseline model to use will depend on your use case. For example if you want to show how a bidirectional LSTM neural network can capture the sequential information, you can use a vanilla neural network as a baseline classifier as it will make predictions without any sequence information
Hope this helps.
  댓글 수: 1
Cai Chin
Cai Chin 2021년 4월 19일
Hi Vineet, thanks very much for our suggestions. Regarding the vanilla (shallow) network you have linked, I see that the input is understandably different from that used in a biLSTM network. For instance, the following is used for training a biLSTM network for classifying ECG signals as normal or abnormal:
net201 = trainNetwork(XTrainSD,YTrain_w,layers,options);
Here, 'XTrainSD' represents the signal data which is a 1062 cell array containing 4x28 doubles, whilst 'YTrain_w' is the corresponding labels.
Whereas, the inputs for the shallow network are as follows:
trainedNet = train(net,X,T,Xi,Ai,EW)
I am struggling to understand how I may translate my inputs to fit these arguments, despite reading the page. Could you please suggest how I may achieve this? Thanks again.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by