Q1 4_1和4_2作为训练集 import pandas as pd train1 = pd.read_table('question_4_1...
train_data = train['sentiment'].values test_data = test['sentiment'].val...
from sklearn.ensemble import RandomForestClassifier import matplotlib.py...
4_3作为测试集 test = pd.read_table('question_4_3.txt', sep='\t', header=None)...
4_1和4_2作为训练集 import pandas as pd train1 = pd.read_table('question_4_1.tx...
先贴写好的 import pandas as pd sentence_data = pd.read_table('question_4_1.tx...
第3小问 Elbow method k = 5 plt.figure(figsize=(10,5)) plt.plot() plt.scatte...
第1小问 用KMeans product_df = pd.read_csv("question_2.csv",sep=';') product_...
抱歉,各位大佬。 第1问: 将3个dataframe以相同的列作为索引进行合并,列income_74,income_75,income_76不进...