# Handle Unbalanced data [closed]

I have a data-set with 2 target classes. In training dataset, the ratio of the 2 classes are 1:93

With my neural network, the current accuracy is 63%. I tried undersampling, oversampling, equal sampling but not improvements.

• try to change your architecture, also use F1 score for evaluation. Jan 29, 2018 at 15:47
• change architecture? as in change the number of hidden layers or manipulating the data Jan 29, 2018 at 17:28
• is F1 score for evaluation in keras available directly? Jan 29, 2018 at 17:29

You have not specified that what neural network you are using but as comments, you should try to fit your data first. You have to try to find a model that learns your training data. For this purpose you don't have to increase the number of data, at least not at this stage. You should try to find a good model which suits your data. For this purpose you have to change the hyper-parameters of your neural network, e.g. number of layers or number of neurons in layers. You can take a look at here and here which the former can help you and the latter helps you understand the features learned by CNNs in case you are using them.

For using F1 score in Keras I've not seen but you can implement it and pass it to compile method, take a look at here.

• I am using a standard neural network of 4 layers(20,30,10,2). Isn't CNN used when with more layers we can detail out the features? Jan 29, 2018 at 17:47
• I guess you are using MLP. We use CNNs usually in cases that the locality of the features, like images, are important. If you have image data I recommend you using CNNs. Moreover both links may help you. Also, welcome to our comunity. Jan 29, 2018 at 17:50