2

Accuracy is not a good metric when you have an unbalanced Dataset. Imagine a binary classification with a dataset composed of 90% of '0' and 10% of '1'. If you make a model that always predict '0', (so which is useless, because your goal is to identify ones), it'll have a 90% accuracy. Since you obtain 99% accuracy, I believe you trained your model in a goal ...


1

As complementary information to BeamsAdept's post, you can also calculate Matthews correlation coefficient, a metric that is robust to class imbalance. It provides a single value (balanced measure), ranging between +1 and -1. In your case, scikit-learn provides an api for calculating MCC: from sklearn.metrics import matthews_corrcoef mcc = matthews_corrcoef(...


1

Here is a brief discussion of the Xavier initialization. The goal of Xavier Initialization is to initialize the weights such that the variance of the activations are the same across every layer. This constant variance helps prevent the gradient from exploding or vanishing. Also check this for a slightly longer discussion on the topic by the same instructor....


1

I think your input dimension to the autoencoder and its output dimensions are different. The input is (1,933,1) while the output is (933,1). These should be same actually.


1

If you wish to count the number of layers in tensorflow (it's currently version 2.x as latest), since the model stored in the variable model, you just need to write: print(len(model.layers))


Only top voted, non community-wiki answers of a minimum length are eligible