【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 分类报告

相关推荐
狒狒AI1 分钟前
DeepSeek Harness 插件生态拆解:31,259 个仓库与 93% 装不上的口径差
人工智能
AI前端工程狮2 分钟前
我把 MCP 长任务拆成三个工具,token 账单涨了 7 倍
javascript·人工智能·程序员
阿里云大数据AI技术4 分钟前
如何用 STAROps Elasticsearch 智能助手看穿“搜索变慢”
人工智能·agent
用户321468751117 分钟前
不会编程也能考AI证书?应用型与技术型认证的门槛差在哪
人工智能
程序员cxuan17 分钟前
GPT-6.2 Astra 发布了,但口碑崩了。。。
人工智能·后端·程序员
SelectDB19 分钟前
让数据更易查、更好用:正泰集团基于 SelectDB 的 AI 应用实践
人工智能
字节跳动数据库32 分钟前
火山引擎缓存数据库:如何构建超大规模缓存集群的无感弹性能力
数据库·人工智能·后端
阿里云大数据AI技术33 分钟前
MaxAgent 实战课堂(二):从单作业诊断到作业定时巡检
人工智能
泯泷37 分钟前
给你一个免费的20人 AI 团队,你的胜算真的变大了吗?
人工智能·llm