成品來了~2023美賽B題成品(論文+資料+代碼+支撐材料+思路講解)
B題是包含完整模型建立求解求解,資料代碼齊全,圖表公式代碼可以直接使用,H獎以上水準
預覽
部分代碼
function result=cwfac(vector);
fprintf('相關系數矩陣:\n')
std=CORRCOEF(vector) %計算相關系數矩陣
fprintf('特征向量(vec)及特征值(val):\n')
[vec,val]=eig(std) %求特征值(val)及特征向量(vec)
newval=diag(val) ;
[y,i]=sort(newval) ; %對特征根進行排序,y 為排序結果,i 為索引
fprintf('特征根排序:\n')
for z=1:length(y)
newy(z)=y(length(y)+1-z);
end
{
"cell_type": "code",
"execution_count": 45,
"metadata": {},
"outputs": [],
"source": [
"df1 = pd.read_csv('./data/file1.csv')\n",
"df4 = pd.read_csv('./data/file4.csv')\n"
]
},
{
"cell_type": "code",
"execution_count": 46,
"metadata": {},
"outputs": [],
"source": [
"df_11 = df1[['carid','price']]\n",
"df4 = df_11.merge(df4,on='carid')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 1 資料預處理"
]
},
{
"cell_type": "code",
"execution_count": 47,
源文下載下傳位址
https://mbd.pub/o/bread/ZJWWmp9y