【DWJ_1703225514】基于Sklearn航空公司服务质量分析

【Talk is cheap】

复制代码
# 导入库
import warnings
warnings.filterwarnings('ignore')

import pandas as pd 

import seaborn as sns
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif'] = ['SimHei']
plt.rcParams['axes.unicode_minus'] = False 
%matplotlib inline

from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import classification_report

1 加载数据

数据集中缺失数据占的百分比为:
Unnamed: 0 0.000000
id 0.000000
Gender 0.000000
Customer Type 0.000000
Age 0.000000
Type of Travel 0.000000
Class 0.000000
Flight Distance 0.000000
Inflight wifi service 0.000000
Departure/Arrival time convenient 0.000000
Ease of Online booking 0.000000
Gate location 0.000000
Food and drink 0.000000
Online boarding 0.000000
Seat comfort 0.000000
Inflight entertainment 0.000000
On-board service 0.000000
Leg room service 0.000000
Baggage handling 0.000000
Checkin service 0.000000
Inflight service 0.000000
Cleanliness 0.000000
Departure Delay in Minutes 0.000000
Arrival Delay in Minutes 0.298352
satisfaction 0.000000

2 探索性分析

3 机器学习

3.1 分割数据

3.2 标签编码

3-3 随机森林

3-4 分类报告

相关推荐
AI街潜水的八角1 小时前
Python电脑屏幕&摄像头录制软件(提供源代码)
开发语言·python
hadage2331 小时前
--- git 的一些使用 ---
开发语言·git·python
kk哥88992 小时前
从数据分析到深度学习!Anaconda3 2025 全流程开发平台,安装步骤
人工智能
陈天伟教授3 小时前
基于学习的人工智能(3)机器学习基本框架
人工智能·学习·机器学习·知识图谱
搞科研的小刘选手4 小时前
【厦门大学主办】第六届计算机科学与管理科技国际学术会议(ICCSMT 2025)
人工智能·科技·计算机网络·计算机·云计算·学术会议
fanstuck5 小时前
深入解析 PyPTO Operator:以 DeepSeek‑V3.2‑Exp 模型为例的实战指南
人工智能·语言模型·aigc·gpu算力
萤丰信息5 小时前
智慧园区能源革命:从“耗电黑洞”到零碳样本的蜕变
java·大数据·人工智能·科技·安全·能源·智慧园区
世洋Blog5 小时前
更好的利用ChatGPT进行项目的开发
人工智能·unity·chatgpt
笨笨聊运维7 小时前
CentOS官方不维护版本,配置python升级方法,无损版
linux·python·centos