OER·harvester

← Back to the library
Zenodo PDF resource

Artificial intelligence (AI) with It's Applications

The book "Artificial Intelligence (AI) with It's Applications" provides a comprehensive insight into the field of AI, exploring its fundamental principles, modern applications, and future potential. It serves as a valuable resource for students, researchers, and professionals looking to understand AI’s role in shaping industries and everyday life. The book begins with an introduction to Artificial Intelligence , cov…

Licence
OPEN CC-BY-4.0
Authors
Dr. Dipikaben Umakant Thakar, Mrs. PL. Natchiammai, Dr. R. J. Kavitha…
Published
2025-03-18 · Zenodo
Language
eng
Length
66700 words
Type
narrative text
Open ↗ Download Open original ↗

Confusion matrix

from sklearn.metrics import confusion_matrix, classification_report

cm = confusion_matrix(y_test, y_pred)

conf_matrix = pd.DataFrame(data = cm,

columns = ['Predicted:0', 'Predicted:1'],

index =['Actual:0', 'Actual:1'])

plt.figure(figsize = (8, 5))

sns.heatmap(conf_matrix, annot = True, fmt = 'd', cmap = "Greens")

plt.show()

print('The details for confusion matrix is =')

print (classification_report(y_test, y_pred))

Output

6.2 Credit Card Fraud Detection

Importing all the necessary Libraries