数据准备

独热编码(除了决策树和随机森林),至于决策树和随机森林的名词性变量采用labelencoder或者数据库处理。

import numpy as np
import pandas as pd
from pandas import read_csv
from sklearn.preprocessing import OneHotEncoder
from sklearn.feature_extraction import DictVectorizer
filename_mat='student-mat.csv'
filename_por='student-por.csv'
data_mat=pd.read_csv(filename_mat,sep=';')
data_por=pd.read_csv(filename_por,sep=';')
data_dummies_mat=pd.get_dummies(data_mat)
data_dummies_por=pd.get_dummies(data_por)
data_dummies_mat.to_csv('studentmat_dummies.csv')
data_dummies_por.to_csv('studentpor_dummies.csv')

生成直方图

import numpy as np
from matplotlib import pyplot
from pandas import read_csv
filename_mat_binary='studentmat_binary.csv'
filename_mat_fivelevel='studentmat_five.csv'
filename_mat_numeric='studentmat_numeric.csv'
filename_por_binary='studentpor_binary.csv'
filename_por_fivelevel='studentpor_fivelevel.csv'
filename_por_numeric='studentpor_numeric.csv'
data_mat_binary=read_csv(filename_mat_binary,header=None)
data_mat_fivelevel=read_csv(filename_mat_fivelevel,header=None)
data_mat_numeric=read_csv(filename_mat_numeric,header=None)
data_por_binary=read_csv(filename_por_binary,header=None)
data_por_fivelevel=read_csv(filename_por_fivelevel,header=None)
data_por_numeric=read_csv(filename_por_numeric,header=None)
y_mat_binary=data_mat_binary.iloc[:,32]
y_mat_fivelevel=data_mat_fivelevel.iloc[:,32]
y_mat_numeric=data_mat_numeric.iloc[:,32]
y_por_binary=data_por_binary.iloc[:,32]
y_por_fivelevel=data_por_fivelevel.iloc[:,32]
y_por_numeric=data_por_numeric.iloc[:,32]
pyplot.figure()
y_mat_binary.hist()
pyplot.title('mat_binary')
pyplot.show()
pyplot.figure()
y_mat_fivelevel.hist()
pyplot.title('mat_fivelevel')
pyplot.show()
pyplot.figure()
y_mat_numeric.hist()
pyplot.title('mat_numeric')
pyplot.show()
pyplot.figure()
y_por_binary.hist()
pyplot.title('por_binary')
pyplot.show()
pyplot.figure()
y_por_fivelevel.hist()
pyplot.title('por_fivelevel')
pyplot.show()
pyplot.figure()
y_por_numeric.hist()
pyplot.title('por_numeric')
pyplot.show()

A_Mat_Reg的随机森林散点图

from sklearn.preprocessing import OneHotEncoder
from sklearn.feature_extraction import DictVectorizer
from sklearn.preprocessing import LabelEncoder
import pandas as pd
from sklearn.cross_validation import StratifiedKFold
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
import numpy as np
from matplotlib import pyplot
from sklearn.metrics import mean_squared_error,explained_variance_score
from pandas import read_csv
from pandas.plotting import scatter_matrix
from pandas import set_option
from sklearn.model_selection import KFold
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import classification_report
from sklearn.metrics import confusion_matrix
from sklearn.metrics import accuracy_score
from sklearn.pipeline import Pipeline
from sklearn.linear_model import LogisticRegression
from sklearn.neighbors import KNeighborsClassifier
from sklearn.tree import DecisionTreeClassifier
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
from sklearn.naive_bayes import GaussianNB
from sklearn.ensemble import AdaBoostClassifier
from sklearn.svm import SVC
from sklearn.svm import SVR
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import RandomForestRegressor
from sklearn.ensemble import ExtraTreesClassifier
import sklearn.naive_bayes
from sklearn.neural_network import MLPClassifier
import graphviz
from sklearn.tree import export_graphviz
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from sklearn import tree,datasets
from sklearn.tree import DecisionTreeRegressor
import math
from sklearn.decomposition import PCA
from sklearn.pipeline import Pipeline
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import confusion_matrix
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from sklearn.linear_model import LinearRegression
filename='studentmat_numeric.csv'
data=pd.read_csv(filename)
X,y=data.iloc[:,:32].values.astype(float),data.iloc[:,32].values.astype(float)
seed=8
num_tree=500
test_size=0.2
X_train,X_test,y_train,y_test=train_test_split(X,y,test_size=test_size,random_state=seed)plt.scatter(y_test,y_predicted)
array_x=np.array([0,20])
array_y=np.array([0,20])
plt.plot(array_x,array_y,'k')
regressor_forest=RandomForestRegressor(n_estimators=num_tree,random_state=seed)
regressor_forest.fit(X_train,y_train)
y_predicted=regressor_forest.predict(X_test)
plt.xlabel('Desired')
plt.ylabel('Predicted')
plt.show()

生成决策树的对应输入设置的流程图

import numpy as np
import pandas as pd
import graphviz
from sklearn.tree import export_graphviz
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from sklearn import tree,datasets
from sklearn.model_selection import train_test_split
filename='studentpor_binary.csv'
data=pd.read_csv(filename)
feature_names=['sex','age','school','address','Pstatus','Medu','Mjob','Fedu','Fjob','guardian','famsize','famrel','reason','traveltime','studytime','failures','schoolsup','famsup','activities','paidclass','internet','nursery','higher','romantic','freetime','goout','Walc','Dalc','health','absences','G1','G2']X,y=data.iloc[:,:32].values,data.iloc[:,32].values
X_train,X_test,y_train,y_test=train_test_split(X,y)
clf=tree.DecisionTreeClassifier(max_depth=3)
clf.fit(X_train,y_train)
class_names=[]
for i in range(20):class_names.append(str(i))
#class_names=['class_0','class_1','class_2','class_3','class_4']
export_graphviz(clf,out_file="por_binary.dot",class_names=class_names,feature_names=feature_names,impurity=False,filled=True)
with open("por_binary.dot") as f:dot_graph=f.read()dot=graphviz.Source(dot_graph)

使用随机森林得出各种设置的特征重要性

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from sklearn.feature_selection import SelectFromModel
from sklearn.tree import DecisionTreeRegressor
from sklearn.ensemble import AdaBoostRegressor
from sklearn import datasets
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error,explained_variance_score
from sklearn.utils import shuffle
import matplotlib.pyplot as plt
from sklearn.metrics import confusion_matrix
from sklearn.ensemble import RandomForestRegressor
from sklearn.ensemble import RandomForestClassifier
filename1='studentmat_binary.csv'
filename2='studentmat_five.csv'
filename3='studentmat_numeric.csv'
filename4='studentpor_binary.csv'
filename5='studentpor_fivelevel.csv'
filename6='studentpor_numeric.csv'
data=pd.read_csv(filename4)
seed=0
X,y=data.iloc[:,:31].values,data.iloc[:,32].values
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.2,random_state=seed)
feature_names=['sex','age','school','address','Pstatus','Medu','Mjob','Fedu','Fjob','guardian','famsize','famrel','reason','traveltime','studytime','failures','schoolsup','famsup','activities','paidclass','internet','nursery','higher','romantic','freetime','goout','Walc','Dalc','health','absences','G1']
forest=RandomForestRegressor(n_estimators=500,random_state=seed,n_jobs=-1)
forest.fit(X_train, y_train)
feature_importances=forest.feature_importances_
index_sorted=np.flipud(np.argsort(feature_importances))
index_sorted1=np.array(feature_names)[index_sorted]
print(index_sorted1)
print(feature_importances[index_sorted])
pos=np.arange(index_sorted.shape[0])+0.5#标签居中
plt.title('Feature Importances(B_Por_Bin)')
plt.bar(pos,feature_importances[index_sorted],align='center')
plt.xticks(pos,np.array(feature_names)[index_sorted],rotation=90)
plt.show()

DT.py

# -*- coding: utf-8 -*-
"""
Created on Mon Apr  1 13:34:50 2019@author: zyf
"""
from sklearn.preprocessing import OneHotEncoder
from sklearn.feature_extraction import DictVectorizer
from sklearn.preprocessing import LabelEncoder
import pandas as pd
from sklearn.cross_validation import StratifiedKFold
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
import numpy as np
from matplotlib import pyplot
from sklearn.metrics import mean_squared_error,explained_variance_score
from pandas import read_csv
from pandas.plotting import scatter_matrix
from pandas import set_option
from sklearn.model_selection import KFold
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import classification_report
from sklearn.metrics import confusion_matrix
from sklearn.metrics import accuracy_score
from sklearn.pipeline import Pipeline
from sklearn.linear_model import LogisticRegression
from sklearn.neighbors import KNeighborsClassifier
from sklearn.tree import DecisionTreeClassifier
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
from sklearn.naive_bayes import GaussianNB
from sklearn.ensemble import AdaBoostClassifier
from sklearn.svm import SVC
from sklearn.svm import SVR
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import RandomForestRegressor
from sklearn.ensemble import ExtraTreesClassifier
import sklearn.naive_bayes
from sklearn.neural_network import MLPClassifier
import graphviz
from sklearn.tree import export_graphviz
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from sklearn import tree,datasets
from sklearn.tree import DecisionTreeRegressor
import math
from sklearn.decomposition import PCA
from sklearn.pipeline import Pipeline
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import confusion_matrix
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from sklearn.linear_model import LinearRegression
filename0='studentmat_binary.csv'
filename1='studentmat_five.csv'
filename2='studentmat_numeric.csv'
filename3='studentpor_binary.csv'
filename4='studentpor_fivelevel.csv'
filename5='studentpor_numeric.csv'
filenames=[filename0,filename1,filename2,filename3,filename4,filename5]
runs=20
num_folds=10
seed=8
num_tree=500
feature_names=['sex','age','school','address','Pstatus','Medu','Mjob','Fedu','Fjob','guardian','famsize','famrel','reason','traveltime','studytime','failures','schoolsup','famsup','activities','paidclass','internet','nursery','higher','romantic','freetime','goout','Walc','Dalc','health','absences']#主义修改特征数
for i in range(6):filename=filenames[i]if filename==filename0 or filename==filename1 or filename==filename3 or filename==filename4:data=pd.read_csv(filename)for j in range(3):if j==0:X,y=data.iloc[:,:32].values.astype(float),data.iloc[:,32].values.astype(float)feature_names.append('G1')feature_names.append('G2')kfold=KFold(n_splits=num_folds,random_state=seed)classifier_tree=DecisionTreeClassifier(max_depth=5)results=[]scoring='accuracy'for i in range(20):scores=cross_val_score(classifier_tree,X,y,cv=kfold,scoring=scoring)results.append(scores.mean())print(filename)print('DT_Classifier_A模型交叉验证得分: %.3f' %np.mean(results))elif j==1:X,y=data.iloc[:,:31].values.astype(float),data.iloc[:,32].values.astype(float)feature_names.append('G1')kfold=KFold(n_splits=num_folds,random_state=seed)classifier_tree=DecisionTreeClassifier(max_depth=5)results=[]scoring='accuracy'for i in range(20):scores=cross_val_score(classifier_tree,X,y,cv=kfold,scoring=scoring)results.append(scores.mean())print(filename)print('DT_Classifier_B模型交叉验证得分: %.3f' %np.mean(results))elif j==2:X,y=data.iloc[:,:30].values.astype(float),data.iloc[:,32].values.astype(float)feature_names=feature_nameskfold=KFold(n_splits=num_folds,random_state=seed)classifier_tree=DecisionTreeClassifier(max_depth=5)results=[]scoring='accuracy'for i in range(20):scores=cross_val_score(classifier_tree,X,y,cv=kfold,scoring=scoring)results.append(scores.mean())print(filename)print('DT_Classifier_C模型交叉验证得分: %.3f' %np.mean(results))elif filename==filename2 or filename==filename5:data=pd.read_csv(filename)for j in range(3):if j==0:X,y=data.iloc[:,:32].values.astype(float),data.iloc[:,32].values.astype(float)feature_names.append('G1')feature_names.append('G2')kfold=KFold(n_splits=num_folds,random_state=seed)regressor_tree=DecisionTreeRegressor(max_depth=5)results=[]scoring='neg_mean_squared_error'for i in range(20):scores=cross_val_score(regressor_tree,X,y,cv=kfold,scoring=scoring)results.append(np.sqrt(abs(scores.mean())))print(filename)print('DT_Regressor_A模型交叉验证得分: %.3f' % np.mean(results))elif j==1:X,y=data.iloc[:,:31].values.astype(float),data.iloc[:,32].values.astype(float)feature_names.append('G1')kfold=KFold(n_splits=num_folds,random_state=seed)regressor_tree=DecisionTreeRegressor(max_depth=5)results=[]scoring='neg_mean_squared_error'for i in range(20):scores=cross_val_score(regressor_tree,X,y,cv=kfold,scoring=scoring)results.append(np.sqrt(abs(scores.mean())))print(filename)print('DT_Regressor_B模型交叉验证得分: %.3f' % np.mean(results))elif j==2:X,y=data.iloc[:,:30].values.astype(float),data.iloc[:,32].values.astype(float)feature_names=feature_nameskfold=KFold(n_splits=num_folds,random_state=seed)regressor_tree=DecisionTreeRegressor(max_depth=5)results=[]scoring='neg_mean_squared_error'for i in range(20):scores=cross_val_score(regressor_tree,X,y,cv=kfold,scoring=scoring)results.append(np.sqrt(abs(scores.mean())))print(filename)print('DT_Regressor_C模型交叉验证得分: %.3f' % np.mean(results))

RF.py

# -*- coding: utf-8 -*-
"""
Created on Mon Apr  1 13:56:18 2019@author: zyf
"""
from sklearn.preprocessing import OneHotEncoder
from sklearn.feature_extraction import DictVectorizer
from sklearn.preprocessing import LabelEncoder
import pandas as pd
from sklearn.cross_validation import StratifiedKFold
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
import numpy as np
from matplotlib import pyplot
from sklearn.metrics import mean_squared_error,explained_variance_score
from pandas import read_csv
from pandas.plotting import scatter_matrix
from pandas import set_option
from sklearn.model_selection import KFold
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import classification_report
from sklearn.metrics import confusion_matrix
from sklearn.metrics import accuracy_score
from sklearn.pipeline import Pipeline
from sklearn.linear_model import LogisticRegression
from sklearn.neighbors import KNeighborsClassifier
from sklearn.tree import DecisionTreeClassifier
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
from sklearn.naive_bayes import GaussianNB
from sklearn.ensemble import AdaBoostClassifier
from sklearn.svm import SVC
from sklearn.svm import SVR
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import RandomForestRegressor
from sklearn.ensemble import ExtraTreesClassifier
import sklearn.naive_bayes
from sklearn.neural_network import MLPClassifier
import graphviz
from sklearn.tree import export_graphviz
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from sklearn import tree,datasets
from sklearn.tree import DecisionTreeRegressor
import math
from sklearn.decomposition import PCA
from sklearn.pipeline import Pipeline
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import confusion_matrix
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from sklearn.linear_model import LinearRegression
filename0='studentmat_binary.csv'
filename1='studentmat_five.csv'
filename2='studentmat_numeric.csv'
filename3='studentpor_binary.csv'
filename4='studentpor_fivelevel.csv'
filename5='studentpor_numeric.csv'
filenames=[filename0,filename1,filename2,filename3,filename4,filename5]
runs=20
num_folds=10
seed=8
num_tree=500
feature_names=['sex','age','school','address','Pstatus','Medu','Mjob','Fedu','Fjob','guardian','famsize','famrel','reason','traveltime','studytime','failures','schoolsup','famsup','activities','paidclass','internet','nursery','higher','romantic','freetime','goout','Walc','Dalc','health','absences']#主义修改特征数
for i in range(6):filename=filenames[i]if filename==filename0 or filename==filename1 or filename==filename3 or filename==filename4:data=pd.read_csv(filename)for j in range(3):if j==0:X,y=data.iloc[:,:32].values.astype(float),data.iloc[:,32].values.astype(float)feature_names.append('G1')feature_names.append('G2')kfold=KFold(n_splits=num_folds,random_state=seed)classifier_forest=RandomForestClassifier(n_estimators=500,random_state=seed)results=[]scoring='accuracy'for i in range(20):scores=cross_val_score(classifier_forest,X,y,cv=kfold,scoring=scoring)results.append(scores.mean())print(filename)print('RF_Classifier_A模型交叉验证得分: %.3f' %np.mean(results))elif j==1:X,y=data.iloc[:,:31].values.astype(float),data.iloc[:,32].values.astype(float)feature_names.append('G1')kfold=KFold(n_splits=num_folds,random_state=seed)classifier_forest=RandomForestClassifier(n_estimators=500,random_state=seed)results=[]scoring='accuracy'for i in range(20):scores=cross_val_score(classifier_forest,X,y,cv=kfold,scoring=scoring)results.append(scores.mean())print(filename)print('RF_Classifier_B模型交叉验证得分: %.3f' %np.mean(results))elif j==2:X,y=data.iloc[:,:30].values.astype(float),data.iloc[:,32].values.astype(float)feature_names=feature_nameskfold=KFold(n_splits=num_folds,random_state=seed)classifier_forest=RandomForestClassifier(n_estimators=500,random_state=seed)results=[]scoring='accuracy'for i in range(20):scores=cross_val_score(classifier_forest,X,y,cv=kfold,scoring=scoring)results.append(scores.mean())print(filename)print('RF_Classifier_C模型交叉验证得分: %.3f' %np.mean(results))elif filename==filename2 or filename==filename5:data=pd.read_csv(filename)for j in range(3):if j==0:X,y=data.iloc[:,:32].values.astype(float),data.iloc[:,32].values.astype(float)feature_names.append('G1')feature_names.append('G2')kfold=KFold(n_splits=num_folds,random_state=seed)regressor_forest=RandomForestRegressor(n_estimators=500,random_state=seed)results=[]scoring='neg_mean_squared_error'for i in range(20):scores=cross_val_score(regressor_forest,X,y,cv=kfold,scoring=scoring)results.append(np.sqrt(abs(scores.mean())))print(filename)print('RF_Regressor_A模型交叉验证得分: %.3f' % np.mean(results))elif j==1:X,y=data.iloc[:,:31].values.astype(float),data.iloc[:,32].values.astype(float)feature_names.append('G1')kfold=KFold(n_splits=num_folds,random_state=seed)regressor_forest=RandomForestRegressor(n_estimators=500,random_state=seed)results=[]scoring='neg_mean_squared_error'for i in range(20):scores=cross_val_score(regressor_forest,X,y,cv=kfold,scoring=scoring)results.append(np.sqrt(abs(scores.mean())))print(filename)print('RF_Regressor_B模型交叉验证得分: %.3f' % np.mean(results))elif j==2:X,y=data.iloc[:,:30].values.astype(float),data.iloc[:,32].values.astype(float)feature_names=feature_nameskfold=KFold(n_splits=num_folds,random_state=seed)regressor_forest=RandomForestRegressor(n_estimators=500,random_state=seed)results=[]scoring='neg_mean_squared_error'for i in range(20):scores=cross_val_score(regressor_forest,X,y,cv=kfold,scoring=scoring)results.append(np.sqrt(abs(scores.mean())))print(filename)print('RF_Regressor_C模型交叉验证得分: %.3f' % np.mean(results))

SVM.py

# -*- coding: utf-8 -*-
"""
Created on Mon Apr  1 14:49:02 2019@author: zyf
"""# -*- coding: utf-8 -*-
"""
Created on Mon Apr  1 21:22:37 2019@author: zyf
"""from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import OneHotEncoder
from sklearn.feature_extraction import DictVectorizer
from sklearn.preprocessing import LabelEncoder
import pandas as pd
from sklearn.feature_selection import SelectFromModel
from sklearn.cross_validation import StratifiedKFold
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
import numpy as np
from matplotlib import pyplot
from sklearn.metrics import mean_squared_error,explained_variance_score
from pandas import read_csv
from pandas.plotting import scatter_matrix
from pandas import set_option
from sklearn.model_selection import KFold
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import classification_report
from sklearn.metrics import confusion_matrix
from sklearn.metrics import accuracy_score
from sklearn.pipeline import Pipeline
from sklearn.linear_model import LogisticRegression
from sklearn.neighbors import KNeighborsClassifier
from sklearn.tree import DecisionTreeClassifier
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
from sklearn.naive_bayes import GaussianNB
from sklearn.ensemble import AdaBoostClassifier
from sklearn.svm import SVC
from sklearn.svm import SVR
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import RandomForestRegressor
from sklearn.ensemble import ExtraTreesClassifier
import sklearn.naive_bayes
from sklearn.neural_network import MLPClassifier
from sklearn.neural_network import MLPRegressor
import graphviz
from sklearn.tree import export_graphviz
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from sklearn import tree,datasets
from sklearn.tree import DecisionTreeRegressor
import math
from sklearn.decomposition import PCA
from sklearn.pipeline import Pipeline
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import confusion_matrix
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from sklearn.linear_model import LinearRegression
filename0='studentmat_dummies_binary.csv'
filename1='studentmat_dummies_five.csv'
filename2='studentmat_dummies_numeric.csv'
filename3='studentpor_dummies_binary.csv'
filename4='studentpor_dummies_five.csv'
filename5='studentpor_dummies_numeric.csv'
feature_names=['age', 'Medu', 'Fedu', 'traveltime', 'studytime', 'failures', 'famrel','freetime', 'goout', 'Dalc', 'Walc', 'health', 'absences',  'school_GP', 'school_MS', 'sex_F', 'sex_M', 'address_R','address_U', 'famsize_GT3', 'famsize_LE3', 'Pstatus_A', 'Pstatus_T','Mjob_at_home', 'Mjob_health', 'Mjob_other', 'Mjob_services','Mjob_teacher', 'Fjob_at_home', 'Fjob_health', 'Fjob_other','Fjob_services', 'Fjob_teacher', 'reason_course', 'reason_home','reason_other', 'reason_reputation', 'guardian_father','guardian_mother', 'guardian_other', 'schoolsup_no', 'schoolsup_yes','famsup_no', 'famsup_yes', 'paid_no', 'paid_yes', 'activities_no','activities_yes', 'nursery_no', 'nursery_yes', 'higher_no','higher_yes', 'internet_no', 'internet_yes', 'romantic_no','romantic_yes']
filenames=[filename0,filename1,filename2,filename3,filename4,filename5]
runs=20
num_folds=10
seed=8
for i in range(6):filename=filenames[i]if filename==filename0 or filename==filename1 or filename==filename3 or filename==filename4:data=pd.read_csv(filename)for j in range(3):if j==0:X,y=data.iloc[:,:58].values.astype(float),data.iloc[:,58].values.astype(float)feature_names.append('G1')feature_names.append('G2')pipe_svc=Pipeline([('scl',StandardScaler()),('clf',SVC(random_state=seed))])param_range=[0.0001,0.001,0.01,0.1,1.0,10.0,100.0,1000.0]param_grid=[{'clf__C': param_range,'clf__kernel': ['linear']},{'clf__C': param_range,'clf__gamma': param_range,'clf__kernel': ['rbf']}]scoring='accuracy'grid=GridSearchCV(estimator=pipe_svc,param_grid=param_grid,cv=num_folds,scoring=scoring)grid=grid.fit(X,y)print(filename)print('最佳模型:{}'.format(grid.best_params_))print('SVM_Classifier_A模型的最佳得分:{:.3f}'.format(grid.best_score_))elif j==1:X,y=data.iloc[:,:57].values.astype(float),data.iloc[:,58].values.astype(float)feature_names.append('G1')pipe_svc=Pipeline([('scl',StandardScaler()),('clf',SVC(random_state=seed))])param_range=[0.0001,0.001,0.01,0.1,1.0,10.0,100.0,1000.0]param_grid=[{'clf__C': param_range,'clf__kernel': ['linear']},{'clf__C': param_range,'clf__gamma': param_range,'clf__kernel': ['rbf']}]scoring='accuracy'grid=GridSearchCV(estimator=pipe_svc,param_grid=param_grid,cv=num_folds,scoring=scoring)grid=grid.fit(X,y)print(filename)print('最佳模型:{}'.format(grid.best_params_))print('SVM_Classifier_B模型的最佳得分:{:.3f}'.format(grid.best_score_))elif j==2:X,y=data.iloc[:,:56].values.astype(float),data.iloc[:,58].values.astype(float)feature_names=feature_namespipe_svc=Pipeline([('scl',StandardScaler()),('clf',SVC(random_state=seed))])param_range=[0.0001,0.001,0.01,0.1,1.0,10.0,100.0,1000.0]param_grid=[{'clf__C': param_range,'clf__kernel': ['linear']},{'clf__C': param_range,'clf__gamma': param_range,'clf__kernel': ['rbf']}]scoring='accuracy'grid=GridSearchCV(estimator=pipe_svc,param_grid=param_grid,cv=num_folds,scoring=scoring)grid=grid.fit(X,y)print(filename)print('最佳模型:{}'.format(grid.best_params_))print('SVM_Classifier_C模型的最佳得分:{:.3f}'.format(grid.best_score_))elif filename==filename2 or filename==filename5:data=pd.read_csv(filename)for j in range(3):if j==0:X,y=data.iloc[:,:58].values.astype(float),data.iloc[:,58].values.astype(float)feature_names.append('G1')feature_names.append('G2')pipe_svr=Pipeline([('scl',StandardScaler()),('reg',SVR())])param_range=[0.0001,0.001,0.01,0.1,1.0,10.0,100.0,1000.0]param_grid=[{'reg__C': param_range,'reg__kernel': ['linear']},{'reg__C': param_range,'reg__gamma': param_range,'reg__kernel': ['rbf']}]scoring='neg_mean_squared_error'grid=GridSearchCV(estimator=pipe_svr,param_grid=param_grid,cv=num_folds,scoring=scoring)grid=grid.fit(X,y)print(filename)print('最佳模型:{}'.format(grid.best_params_))print('SVM_Regressor_A模型的最佳得分:{:.3f}'.format(np.sqrt(abs(grid.best_score_))))elif j==1:X,y=data.iloc[:,:57].values.astype(float),data.iloc[:,58].values.astype(float)feature_names.append('G1')pipe_svr=Pipeline([('scl',StandardScaler()),('reg',SVR())])param_range=[0.0001,0.001,0.01,0.1,1.0,10.0,100.0,1000.0]param_grid=[{'reg__C': param_range,'reg__kernel': ['linear']},{'reg__C': param_range,'reg__gamma': param_range,'reg__kernel': ['rbf']}]scoring='neg_mean_squared_error'grid=GridSearchCV(estimator=pipe_svr,param_grid=param_grid,cv=num_folds,scoring=scoring)grid=grid.fit(X,y)print(filename)print('最佳模型:{}'.format(grid.best_params_))print('SVM_Regressor_B模型的最佳得分:{:.3f}'.format(np.sqrt(abs(grid.best_score_))))elif j==2:X,y=data.iloc[:,:56].values.astype(float),data.iloc[:,58].values.astype(float)feature_names=feature_namespipe_svr=Pipeline([('scl',StandardScaler()),('reg',SVR())])param_range=[0.0001,0.001,0.01,0.1,1.0,10.0,100.0,1000.0]param_grid=[{'reg__C': param_range,'reg__kernel': ['linear']},{'reg__C': param_range,'reg__gamma': param_range,'reg__kernel': ['rbf']}]scoring='neg_mean_squared_error'grid=GridSearchCV(estimator=pipe_svr,param_grid=param_grid,cv=num_folds,scoring=scoring)grid=grid.fit(X,y)print(filename)print('最佳模型:{}'.format(grid.best_params_))print('SVM_Regressor_C模型的最佳得分:{:.3f}'.format(np.sqrt(abs(grid.best_score_))))

NN.py

# -*- coding: utf-8 -*-
"""
Created on Mon Apr  1 21:22:37 2019@author: zyf
"""from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import OneHotEncoder
from sklearn.feature_extraction import DictVectorizer
from sklearn.preprocessing import LabelEncoder
import pandas as pd
from sklearn.feature_selection import SelectFromModel
from sklearn.cross_validation import StratifiedKFold
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
import numpy as np
from matplotlib import pyplot
from sklearn.metrics import mean_squared_error,explained_variance_score
from pandas import read_csv
from pandas.plotting import scatter_matrix
from pandas import set_option
from sklearn.model_selection import KFold
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import classification_report
from sklearn.metrics import confusion_matrix
from sklearn.metrics import accuracy_score
from sklearn.pipeline import Pipeline
from sklearn.linear_model import LogisticRegression
from sklearn.neighbors import KNeighborsClassifier
from sklearn.tree import DecisionTreeClassifier
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
from sklearn.naive_bayes import GaussianNB
from sklearn.ensemble import AdaBoostClassifier
from sklearn.svm import SVC
from sklearn.svm import SVR
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import RandomForestRegressor
from sklearn.ensemble import ExtraTreesClassifier
import sklearn.naive_bayes
from sklearn.neural_network import MLPClassifier
from sklearn.neural_network import MLPRegressor
import graphviz
from sklearn.tree import export_graphviz
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from sklearn import tree,datasets
from sklearn.tree import DecisionTreeRegressor
import math
from sklearn.decomposition import PCA
from sklearn.pipeline import Pipeline
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import confusion_matrix
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from sklearn.linear_model import LinearRegression
filename0='studentmat_dummies_binary.csv'
filename1='studentmat_dummies_five.csv'
filename2='studentmat_dummies_numeric.csv'
filename3='studentpor_dummies_binary.csv'
filename4='studentpor_dummies_five.csv'
filename5='studentpor_dummies_numeric.csv'
feature_names=['age', 'Medu', 'Fedu', 'traveltime', 'studytime', 'failures', 'famrel','freetime', 'goout', 'Dalc', 'Walc', 'health', 'absences',  'school_GP', 'school_MS', 'sex_F', 'sex_M', 'address_R','address_U', 'famsize_GT3', 'famsize_LE3', 'Pstatus_A', 'Pstatus_T','Mjob_at_home', 'Mjob_health', 'Mjob_other', 'Mjob_services','Mjob_teacher', 'Fjob_at_home', 'Fjob_health', 'Fjob_other','Fjob_services', 'Fjob_teacher', 'reason_course', 'reason_home','reason_other', 'reason_reputation', 'guardian_father','guardian_mother', 'guardian_other', 'schoolsup_no', 'schoolsup_yes','famsup_no', 'famsup_yes', 'paid_no', 'paid_yes', 'activities_no','activities_yes', 'nursery_no', 'nursery_yes', 'higher_no','higher_yes', 'internet_no', 'internet_yes', 'romantic_no','romantic_yes']
filenames=[filename0,filename1,filename2,filename3,filename4,filename5]
runs=20
num_folds=10
seed=8
for i in range(6):filename=filenames[i]if filename==filename0 or filename==filename1 or filename==filename3 or filename==filename4:data=pd.read_csv(filename)for j in range(3):if j==0:X,y=data.iloc[:,:58].values.astype(float),data.iloc[:,58].values.astype(float)feature_names.append('G1')feature_names.append('G2')params=[{'clf':[MLPClassifier(solver='lbfgs',random_state=seed)],'scaler':[StandardScaler(),None],'clf__hidden_layer_sizes':[(50,),(100,),(100,100)]},{'clf':[RandomForestRegressor(random_state=seed)],'scaler':[None],'clf__n_estimators':[50,100,500]}]pipe=Pipeline([('scaler',StandardScaler()),('clf',MLPClassifier())])grid=GridSearchCV(pipe,params,cv=num_folds)grid.fit(X,y)print(filename)print('最佳模型:{}'.format(grid.best_params_))print('NN_Classifier_A模型的最佳得分:{:.3f}'.format(grid.best_score_))elif j==1:X,y=data.iloc[:,:57].values.astype(float),data.iloc[:,58].values.astype(float)feature_names.append('G1')params=[{'clf':[MLPClassifier(solver='lbfgs',random_state=seed)],'scaler':[StandardScaler(),None],'clf__hidden_layer_sizes':[(50,),(100,),(100,100)]},{'clf':[RandomForestRegressor(random_state=seed)],'scaler':[None],'clf__n_estimators':[50,100,500]}]pipe=Pipeline([('scaler',StandardScaler()),('clf',MLPClassifier())])grid=GridSearchCV(pipe,params,cv=num_folds)grid.fit(X,y)print(filename)print('最佳模型:{}'.format(grid.best_params_))print('NN_Classifier_B模型的最佳得分:{:.3f}'.format(grid.best_score_))elif j==2:X,y=data.iloc[:,:56].values.astype(float),data.iloc[:,58].values.astype(float)feature_names=feature_namesparams=[{'clf':[MLPClassifier(solver='lbfgs',random_state=seed)],'scaler':[StandardScaler(),None],'clf__hidden_layer_sizes':[(50,),(100,),(100,100)]},{'clf':[RandomForestRegressor(random_state=seed)],'scaler':[None],'clf__n_estimators':[50,100,500]}]pipe=Pipeline([('scaler',StandardScaler()),('clf',MLPClassifier())])grid=GridSearchCV(pipe,params,cv=num_folds)grid.fit(X,y)print(filename)print('最佳模型:{}'.format(grid.best_params_))print('NN_Classifier_C模型的最佳得分:{:.3f}'.format(grid.best_score_))elif filename==filename2 or filename==filename5:data=pd.read_csv(filename)for j in range(3):if j==0:X,y=data.iloc[:,:58].values.astype(float),data.iloc[:,58].values.astype(float)feature_names.append('G1')feature_names.append('G2')params=[{'reg':[MLPRegressor(solver='lbfgs',random_state=seed)],'scaler':[StandardScaler(),None],'reg__hidden_layer_sizes':[(50,),(100,),(100,100)]},{'reg':[RandomForestRegressor(random_state=seed)],'scaler':[None],'reg__n_estimators':[50,100,500]}]pipe=Pipeline([('scaler',StandardScaler()),('reg',MLPRegressor())])scoring='neg_mean_squared_error'grid=GridSearchCV(pipe,params,cv=num_folds,scoring=scoring)grid.fit(X,y)print(filename)print('最佳模型:{}'.format(grid.best_params_))print('NN_Regressor_A模型的最佳得分:{:.3f}'.format(np.sqrt(abs(grid.best_score_))))elif j==1:X,y=data.iloc[:,:57].values.astype(float),data.iloc[:,58].values.astype(float)feature_names.append('G1')params=[{'reg':[MLPRegressor(solver='lbfgs',random_state=seed)],'scaler':[StandardScaler(),None],'reg__hidden_layer_sizes':[(50,),(100,),(100,100)]},{'reg':[RandomForestRegressor(random_state=seed)],'scaler':[None],'reg__n_estimators':[50,100,500]}]pipe=Pipeline([('scaler',StandardScaler()),('reg',MLPRegressor())])scoring='neg_mean_squared_error'grid=GridSearchCV(pipe,params,cv=num_folds,scoring=scoring)grid.fit(X,y)print(filename)print('最佳模型:{}'.format(grid.best_params_))print('NN_Regressor_B模型的最佳得分:{:.3f}'.format(np.sqrt(abs(grid.best_score_))))elif j==2:X,y=data.iloc[:,:56].values.astype(float),data.iloc[:,58].values.astype(float)feature_names=feature_namesparams=[{'reg':[MLPRegressor(solver='lbfgs',random_state=seed)],'scaler':[StandardScaler(),None],'reg__hidden_layer_sizes':[(50,),(100,),(100,100)]},{'reg':[RandomForestRegressor(random_state=seed)],'scaler':[None],'reg__n_estimators':[50,100,500]}]pipe=Pipeline([('scaler',StandardScaler()),('reg',MLPRegressor())])scoring='neg_mean_squared_error'grid=GridSearchCV(pipe,params,cv=num_folds,scoring=scoring)grid.fit(X,y)print(filename)print('最佳模型:{}'.format(grid.best_params_))print('NN_Regressor_C模型的最佳得分:{:.3f}'.format(np.sqrt(abs(grid.best_score_))))

NV.py

# -*- coding: utf-8 -*-
"""
Created on Mon Apr  1 14:03:01 2019@author: zyf
"""
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import OneHotEncoder
from sklearn.feature_extraction import DictVectorizer
from sklearn.preprocessing import LabelEncoder
import pandas as pd
from sklearn.feature_selection import SelectFromModel
from sklearn.cross_validation import StratifiedKFold
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
import numpy as np
from matplotlib import pyplot
from sklearn.metrics import mean_squared_error,explained_variance_score
from pandas import read_csv
from pandas.plotting import scatter_matrix
from pandas import set_option
from sklearn.model_selection import KFold
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import classification_report
from sklearn.metrics import confusion_matrix
from sklearn.metrics import accuracy_score
from sklearn.pipeline import Pipeline
from sklearn.linear_model import LogisticRegression
from sklearn.neighbors import KNeighborsClassifier
from sklearn.tree import DecisionTreeClassifier
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
from sklearn.naive_bayes import GaussianNB
from sklearn.ensemble import AdaBoostClassifier
from sklearn.svm import SVC
from sklearn.svm import SVR
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import RandomForestRegressor
from sklearn.ensemble import ExtraTreesClassifier
import sklearn.naive_bayes
from sklearn.neural_network import MLPClassifier
import graphviz
from sklearn.tree import export_graphviz
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from sklearn import tree,datasets
from sklearn.tree import DecisionTreeRegressor
import math
from sklearn.decomposition import PCA
from sklearn.pipeline import Pipeline
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import confusion_matrix
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from sklearn.linear_model import LinearRegression
filename0='studentmat_dummies_binary.csv'
filename1='studentmat_dummies_five.csv'
filename2='studentmat_dummies_numeric.csv'
filename3='studentpor_dummies_binary.csv'
filename4='studentpor_dummies_five.csv'
filename5='studentpor_dummies_numeric.csv'
feature_names=['age', 'Medu', 'Fedu', 'traveltime', 'studytime', 'failures', 'famrel','freetime', 'goout', 'Dalc', 'Walc', 'health', 'absences',  'school_GP', 'school_MS', 'sex_F', 'sex_M', 'address_R','address_U', 'famsize_GT3', 'famsize_LE3', 'Pstatus_A', 'Pstatus_T','Mjob_at_home', 'Mjob_health', 'Mjob_other', 'Mjob_services','Mjob_teacher', 'Fjob_at_home', 'Fjob_health', 'Fjob_other','Fjob_services', 'Fjob_teacher', 'reason_course', 'reason_home','reason_other', 'reason_reputation', 'guardian_father','guardian_mother', 'guardian_other', 'schoolsup_no', 'schoolsup_yes','famsup_no', 'famsup_yes', 'paid_no', 'paid_yes', 'activities_no','activities_yes', 'nursery_no', 'nursery_yes', 'higher_no','higher_yes', 'internet_no', 'internet_yes', 'romantic_no','romantic_yes']
filenames=[filename0,filename1,filename2,filename3,filename4,filename5]
runs=20
num_folds=10
seed=8
for i in range(6):filename=filenames[i]if filename==filename0 or filename==filename1 or filename==filename3 or filename==filename4:data=pd.read_csv(filename)for j in range(3):if j==0:X,y=data.iloc[:,:58].values.astype(float),data.iloc[:,58].values.astype(float)feature_names.append('G1')feature_names.append('G2')kfold=KFold(n_splits=num_folds,random_state=seed)pipe=make_pipeline(StandardScaler(),SelectFromModel(RandomForestRegressor(random_state=seed)),GaussianNB())results=[]scoring='accuracy'for i in range(20):scores=cross_val_score(pipe,X,y,cv=kfold,scoring=scoring)results.append(scores.mean())print(filename)print('NV_Classifier_A模型交叉验证得分: %.3f' %np.mean(results))elif j==1:X,y=data.iloc[:,:57].values.astype(float),data.iloc[:,58].values.astype(float)feature_names.append('G1')kfold=KFold(n_splits=num_folds,random_state=seed)pipe=make_pipeline(StandardScaler(),SelectFromModel(RandomForestRegressor(random_state=seed)),GaussianNB())results=[]scoring='accuracy'for i in range(20):scores=cross_val_score(pipe,X,y,cv=kfold,scoring=scoring)results.append(scores.mean())print(filename)print('NV_Classifier_B模型交叉验证得分: %.3f' %np.mean(results))elif j==2:X,y=data.iloc[:,:56].values.astype(float),data.iloc[:,58].values.astype(float)feature_names=feature_nameskfold=KFold(n_splits=num_folds,random_state=seed)pipe=make_pipeline(StandardScaler(),SelectFromModel(RandomForestRegressor(random_state=seed)),GaussianNB())results=[]scoring='accuracy'for i in range(20):scores=cross_val_score(pipe,X,y,cv=kfold,scoring=scoring)results.append(scores.mean())print(filename)print('NV_Classifier_C模型交叉验证得分: %.3f' %np.mean(results))elif filename==filename2 or filename==filename5:data=pd.read_csv(filename)for j in range(3):if j==0:X,y=data.iloc[:,:58].values.astype(float),data.iloc[:,58].values.astype(float)feature_names.append('G1')feature_names.append('G2')kfold=KFold(n_splits=num_folds,random_state=seed)pipe=make_pipeline(StandardScaler(),SelectFromModel(RandomForestRegressor(random_state=seed)),GaussianNB())results=[]scoring='neg_mean_squared_error'for i in range(20):scores=cross_val_score(pipe,X,y,cv=kfold,scoring=scoring)results.append(np.sqrt(abs(scores.mean())))print(filename)print('NV_Regressor_A模型交叉验证得分: %.3f' % np.mean(results))elif j==1:X,y=data.iloc[:,:57].values.astype(float),data.iloc[:,58].values.astype(float)feature_names.append('G1')kfold=KFold(n_splits=num_folds,random_state=seed)pipe=make_pipeline(StandardScaler(),SelectFromModel(RandomForestRegressor(random_state=seed)),GaussianNB())results=[]scoring='neg_mean_squared_error'for i in range(20):scores=cross_val_score(pipe,X,y,cv=kfold,scoring=scoring)results.append(np.sqrt(abs(scores.mean())))print(filename)print('NV_Regressor_B模型交叉验证得分: %.3f' % np.mean(results))elif j==2:X,y=data.iloc[:,:56].values.astype(float),data.iloc[:,58].values.astype(float)feature_names=feature_nameskfold=KFold(n_splits=num_folds,random_state=seed)pipe=make_pipeline(StandardScaler(),SelectFromModel(RandomForestRegressor(random_state=seed)),GaussianNB())results=[]scoring='neg_mean_squared_error'for i in range(20):scores=cross_val_score(pipe,X,y,cv=kfold,scoring=scoring)results.append(np.sqrt(abs(scores.mean())))print(filename)print('NV_Regressor_C模型交叉验证得分: %.3f' % np.mean(results))

机器学习在学生成绩预测模型上的应用相关推荐

  1. 用机器学习进行学生成绩预测的数据分析(入门向 附可用源码)

    用机器学习进行学生成绩预测的数据分析(入门向 附可用源码) 声明 思路 检查数据 图像化处理 分析 相关性分析 构建模型 代码实现 可运行代码 声明 文章代码修改于kaggle博主DIPAMVASAN ...

  2. 学生成绩预测模型_每日排行榜|四川省大学生金融科技建模大赛 10.9

    四川省大学生金融科技建模大赛  每日排行榜 十月九日榜 四川省大学生金融科技建模大赛 正如火如荼进行中 各路建模高手激烈角逐 同台竞技,竞争最强建模手 十月九日排行榜已发榜 谁将傲视群雄,最终夺魁 让 ...

  3. 学生成绩预测模型_逻辑回归实战练习——根据学生成绩预测是否被录取

    前言: 在学习了梯度下降和逻辑回归的基本算法后,选取此案例来进行实践练习,本次练习主要通过python中的三大块pandas.numpy和matplotlib来实现,基本不涉及到sklearn库的调用 ...

  4. 学生成绩预测模型_2020年甘肃省建筑信息模型技术员(学生组)暨第三届全国装配式建筑职业技能竞赛(学生组)选拔赛成绩揭晓!...

    年终总结报告工作汇报/计划总结 2020年度取得成就 当工作进行到一定阶段或告一段落时,需要回过头来对所做的工作认真地分析研究一下,肯定成绩,找出问题,归纳出经验教训,提高认识,明确方向,以便进一步做 ...

  5. 学生成绩预测模型_华中农大学子在美国大学生数学建模竞赛中获佳绩

    2020年美国大学生数学建模竞赛(MCM/ICM)成绩日前揭晓,在来自30多个国家和地区的20948支参赛队伍中,华中农业大学学子斩获佳绩,共获M奖(一等)4项.H奖(二等)17项. 来自工学院的李自 ...

  6. 大一上学期C++课程设计——学生成绩管理系统(QT项目)

    这里是一个大一的萌新!仅做学习分享 工程文件在评论区置顶!! 近期整理了一下大一上学期的课程设计报告作为学习总结,使用的软件是Qt Creator,主界面效果如下图 ----------以下为课程设计 ...

  7. 机器学习实战4-教育领域:学生成绩的可视化分析与成绩预测-详细分析

    大家好,我是微学AI,今天给大家带来机器学习实战4-学生成绩的可视化分析与成绩预测,机器学习在教育中的应用具有很大的潜力,特别是在学生成绩的可视化分析与成绩预测方面. 机器学习可以通过对学生的父母教育 ...

  8. SQL初学、精通者必看:10个学生成绩查询史上最强技巧全攻略

    SQL初学.精通者必看:10个学生成绩查询史上最强技巧全攻略 本文提供了一个含有学生.成绩.课程和教师信息的完整数据库,并为读者提供了 SQL 查询练习题,还包含了练习的答案以及解析.这些题目旨在帮助 ...

  9. 基于go语言的史上最流弊的学生成绩管理系统

    简介 一个基于go语言的学生成绩管理系统,没有花里胡哨的界面,但有你想象不到的功能:没有mysql,redis做支撑,但文件管理也不赖 :没有高大上的高级语法,但经验告诉我:大道至简! 刚刚学习完go ...

  10. 课上——HTML 表格 学生成绩表

    <!DOCTYPE html> <html><head><meta charset="UTF-8"><title>学生成 ...

最新文章

  1. 【阿里云课程】如何基于GAN完成人脸图像超分辨任务
  2. C#关于MSMQ通过HTTP远程发送专有队列消息的问题
  3. LeetCode MySQL 1412. 查找成绩处于中游的学生
  4. 虚拟跳线软件干什么用的_跳线的作用
  5. java替换最后一个字符_Excel公式技巧23: 同时定位字符串中的第一个和最后一个数字...
  6. ibm服务器更换主板怎么恢复系统,记号一次更换IBM X3650M4主板后RAID无法启动的解决...
  7. Linux C语言解析 yaml,c – 用yaml cpp解析yaml
  8. eclipse多余的Workspace如何删除
  9. tomcat官网下载详细步骤
  10. 微软笔试题2:403 Forbidden
  11. Uncaught Error: Syntax error, unrecognized expression: |117的js错误
  12. 注塑行业MES实施方案
  13. 计算机考研单科成绩要求,考研国家线公布,百分制的单科分数线最低仅31分,研究生好考了?...
  14. 电影数据库开发设计——基于jsp(使用eclipse-jee,mysql-front)
  15. PDF Search for Mac(PDF文件搜索工具)
  16. IDEA上班摸鱼神器之LeetCode刷题插件
  17. 男人来自火星,女人来自金星(摘要)
  18. AI技术在智能海报设计中的应用
  19. cscope、ctags和vim简明使用流程
  20. 米尔格拉姆实验(Milgram experiment)

热门文章

  1. 一个游戏程序员的学习资料(全是好书)
  2. linux 文件大小单位显示
  3. Hdmi 和vga 接口有什么区别?
  4. InstallShield脚本使用笔记
  5. Java练手项目:点菜系统
  6. 简单的连数据库 拼接数据 发邮件Python脚本
  7. JavaScript - 动画介绍与学习
  8. Qt实现的简单记账本软件
  9. 深入了解ElasticSearch的Nested数据类型
  10. 游戏开发需要具备哪些技术?