【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 求职工具评测:简小派 vs Jobscan、Teal 与国内同类
人工智能
(●—●)橘子……1 分钟前
力扣344.反转字符串 练习理解
python·学习·算法·leetcode·职场和发展
本妖精不是妖精2 分钟前
在 CentOS 7 上部署 Node.js 18 + Claude Code
linux·python·centos·node.js·claudecode
Vanranrr5 分钟前
Python vs PowerShell:自动化 C++ 配置文件的两种实现方案
c++·python·自动化
糖果罐子♡5 分钟前
在 openEuler 上快速体验 PyTorch 深度学习
人工智能·pytorch·深度学习
周杰伦_Jay5 分钟前
【Conda 完全指南】环境管理+包管理从入门到精通(含实操示例+表格对比)
开发语言·人工智能·微服务·架构·conda
暗碳6 分钟前
ai分析aweme-app.xml,default_config .xml文件
xml·人工智能
凌晨一点的秃头猪7 分钟前
构建视觉词典(visual vocabulary / codebook)
人工智能
PS1232327 分钟前
城市安全建设中的风环境监测解决方案
大数据·人工智能