1、基于相关性与标准差的多模型评价指标可视化比较
# 数据读取并分割
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
plt.rcParams['font.family'] = 'Times New Roman'
plt.rcParams['axes.unicode_minus'] = False
df = pd.read_csv(r'D:\links.csv')
df=df.dropna()
df = df.iloc[:10]
df
2、划分特征和目标变量
# 划分特征和目标变量
X = df.drop(['tmdbId'], axis=1)
y = df['movieId']
# 划分训练集和测试集
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)