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

相关推荐
Together_CZ8 分钟前
DarkIR: Robust Low-Light Image Restoration——鲁棒的低光照图像复原
python·image·robust·darkir·鲁棒的低光照图像复原·low-light·restoration
探索宇宙真理.9 分钟前
WordPress AI Engine信息泄露漏洞 | CVE-2025-11749 复现&研究
人工智能·经验分享·开源·安全漏洞
_妲己13 分钟前
stable diffusion的MLSD直线(AI室内设计)
人工智能·stable diffusion
拾贰_C23 分钟前
【python | pytorch | scipy】scipy scikit-learn库相互依赖?
pytorch·python·scipy
FF-Studio29 分钟前
Ubuntu 24.04 磁盘爆满“灵异“事件:Btrfs, Snapper 与删不掉的空间
linux·运维·人工智能·ubuntu
BoBoZz1930 分钟前
PolyDataContourToImageData 3D集合图像转换成等效3D二值图像
python·vtk·图形渲染·图形处理
2401_8414956434 分钟前
【自然语言处理】关系性形容词的特征
人工智能·python·自然语言处理·自动识别·特征验证·关系性形容词·语言学规则和计算
rebekk41 分钟前
Hydra介绍
人工智能·python
我不是小upper42 分钟前
从理论到代码:随机森林 + GBDT+LightGBM 融合建模解决回归问题
人工智能·深度学习·算法·随机森林·机器学习·回归
青啊青斯1 小时前
python markdown转word【包括字体指定】
开发语言·python·word