国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > Python > 正文

Python根據成績分析系統淺析

2020-02-16 01:05:51
字體:
來源:轉載
供稿:網友

案例:該數據集的是一個關于每個學生成績的數據集,接下來我們對該數據集進行分析,判斷學生是否適合繼續深造

數據集特征展示

1  GRE 成績 (290 to 340)2  TOEFL 成績(92 to 120)3  學校等級 (1 to 5)4  自身的意愿 (1 to 5)5  推薦信的力度 (1 to 5)6  CGPA成績 (6.8 to 9.92)7  是否有研習經驗 (0 or 1)8  讀碩士的意向 (0.34 to 0.97)

1.導入包

import numpy as npimport pandas as pdimport matplotlib.pyplot as pltimport seaborn as snsimport os,sys

2.導入并查看數據集

df = pd.read_csv("D://machine-learning//score//Admission_Predict.csv",sep = ",")
print('There are ',len(df.columns),'columns')
for c in df.columns:
sys.stdout.write(str(c)+', '
There are 9 columnsSerial No., GRE Score, TOEFL Score, University Rating, SOP, LOR , CGPA, Research, Chance of Admit , 
一共有9列特征
df.info()
<class 'pandas.core.frame.DataFrame'>RangeIndex: 400 entries, 0 to 399Data columns (total 9 columns):Serial No.   400 non-null int64GRE Score   400 non-null int64TOEFL Score   400 non-null int64University Rating 400 non-null int64SOP     400 non-null float64LOR     400 non-null float64CGPA     400 non-null float64Research    400 non-null int64Chance of Admit  400 non-null float64dtypes: float64(4), int64(5)memory usage: 28.2 KB

數據集信息:
1.數據有9個特征,分別是學號,GRE分數,托福分數,學校等級,SOP,LOR,CGPA,是否參加研習,進修的幾率
2.數據集中沒有空值
3.一共有400條數據
# 整理列名稱df = df.rename(columns={'Chance of Admit ':'Chance of Admit'})
# 顯示前5列數據
df.head()

3.查看每個特征的相關性

fig,ax = plt.subplots(figsize=(10,10))sns.heatmap(df.corr(),ax=ax,annot=True,linewidths=0.05,fmt='.2f',cmap='magma')plt.show()

結論:1.最有可能影響是否讀碩士的特征是GRE,CGPA,TOEFL成績

2.影響相對較小的特征是LOR,SOP,和Research

4.數據可視化,雙變量分析

4.1 進行Research的人數

print("Not Having Research:",len(df[df.Research == 0]))print("Having Research:",len(df[df.Research == 1]))y = np.array([len(df[df.Research == 0]),len(df[df.Research == 1])])x = np.arange(2)plt.bar(x,y)plt.title("Research Experience")plt.xlabel("Canditates")plt.ylabel("Frequency")plt.xticks(x,('Not having research','Having research'))plt.show()

  結論:進行research的人數是219,本科沒有research人數是181

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 友谊县| 翼城县| 车险| 隆尧县| 中阳县| 黔西| 朝阳县| 乌拉特后旗| 宜黄县| 天柱县| 中江县| 边坝县| 扶风县| 雅江县| 通辽市| 青州市| 龙井市| 广安市| 宁陵县| 澄迈县| 郯城县| 鲜城| 阳新县| 财经| 定西市| 肥西县| 上饶市| 绥化市| 泗水县| 双江| 三门峡市| 台中市| 陇西县| 鲁山县| 广德县| 乌鲁木齐县| 重庆市| 四川省| 特克斯县| 金沙县| 太白县|