dennybritz / cnn-text-classification-tf

Convolutional Neural Network for Text Classification in Tensorflow
Apache License 2.0
5.65k stars 2.77k forks source link

Added Evluation Metrics (F1, Confusion Matrix and AUC) to eval.py #169 #195

Open SakshamJain24 opened 7 months ago

SakshamJain24 commented 7 months ago

Evaluation Metrics:

Added a confusion matrix, F1 score, and AUC (Area Under the Curve) to the evaluation. Calculate and print these metrics after evaluating the model. Replacements for Deprecated Methods:

Replace tf.flags with absl flags, including importing and defining flags using absl flags. Remove tf.app.run() and use app.run(main) to parse the flags and run the main function.

Replacing contrib.learn.DNNClassifier: Import the tf.estimator library.

These changes aimed to modernize the code for compatibility with TensorFlow 2.x and enhance the evaluation process with additional metrics.