资源简介
使用python实现了各种机器学习的算法,也有通过tensorflow实现CNN
代码片段和文件信息
import numpy as np
import matplotlib.pyplot as plt
from sklearn.metrics import confusion_matrix
from sklearn.metrics import classification_report
# Define sample labels
true_labels = [2 0 0 2 4 4 1 0 3 3 3]
pred_labels = [2 1 0 2 4 3 1 0 1 3 3]
# Create confusion matrix
confusion_mat = confusion_matrix(true_labels pred_labels)
# Visualize confusion matrix
plt.imshow(confusion_mat interpolation=‘nearest‘ cmap=plt.cm.gray)
plt.title(‘Confusion matrix‘)
plt.colorbar()
ticks = np.arange(5)
plt.xticks(ticks ticks)
plt.yticks(ticks ticks)
plt.ylabel(‘True labels‘)
plt.xlabel(‘Predicted labels‘)
plt.show()
# Classification report
targets = [‘Class-0‘ ‘Class-1‘ ‘Class-2‘ ‘Class-3‘ ‘Class-4‘]
print(‘\n‘ classification_report(true_labels pred_labels target_names=targets))
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\
目录 0 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 02\
目录 0 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 02\code\
文件 810 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 02\code\confusion_matrix.py
文件 4820 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 02\code\data_multivar_nb.txt
文件 14445 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 02\code\data_multivar_regr.txt
文件 1148 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 02\code\data_preprocessor.py
文件 622 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 02\code\data_singlevar_regr.txt
文件 1184 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 02\code\house_prices.py
文件 2582 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 02\code\income_classifier.py
文件 3974305 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 02\code\income_data.txt
文件 813 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 02\code\label_encoder.py
文件 671 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 02\code\logistic_regression.py
文件 2172 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 02\code\naive_bayes.py
文件 1745 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 02\code\regressor_multivar.py
文件 1798 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 02\code\regressor_singlevar.py
文件 1386 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 02\code\utilities.py
目录 0 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 03\
目录 0 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 03\code\
文件 2013 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 03\code\class_imbalance.py
文件 4250 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 03\code\data_decision_trees.txt
文件 17674 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 03\code\data_imbalance.txt
文件 10645 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 03\code\data_random_forests.txt
文件 1720 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 03\code\decision_trees.py
文件 1800 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 03\code\feature_importance.py
文件 1645 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 03\code\grid_search.py
文件 3388 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 03\code\random_forests.py
文件 1645 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 03\code\run_grid_search.py
文件 526911 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 03\code\traffic_data.txt
文件 1987 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 03\code\traffic_prediction.py
文件 1441 2017-03-27 10:14 Artificial-Intelligence-with-Python-master\Chapter 03\code\utilities.py
............此处省略261个文件信息
相关资源
- 深度学习入门:基于 Python 的理论与实
- Deep Learning With Python_中文版+英文版+代
- Deep Learning With Python_中文版+英文版+代
- 《Python深度学习》2018文字版pdf(非扫
- 深度学习入门:基于Python的理论与实
- 深度学习入门:基于Python的理论与实
- Python机器学习经典 中文完整版高清
- Python人脸相似度对比
- Python入门教程完整版懂中文就能学会
- 《深度学习入门:基于Python的理论与
- 物体检测识别python源代码
- Python强化学习实战:应用OpenAI Gym和
- Introduction to Machine Learning with Python英文
- Python机器学习及实践高清
- Python编程:从入门到实践(超清版)
- Python深度学习pdf
- Practical Machine Learning with Python (2018)
- 2019新书系列-Introduction to Python Progra
- Python3.8-Window 64位
- 基于python+opencv的目标图像自动识别提
- 基于Python的人工智能美颜系统
- 麻瓜编程 实用主义学Python2018
- jieba分词,连接数据库,分析数据库中
- 传智播客python人工智能项目黑马程序
- 机器学习升级版第七期 xiaoxiang zoub
- 基于python的微博热点话题舆情聚类分
- 人工智能作业pacman吃豆人python源代码
- Python深度学习部分
- 是AI就躲个飞机-纯Python实现人工智能
- LSTM股价预测(python).zip
评论
共有 条评论