1.首先用代码将变量归一化
我这第5列及后是我要归一化的数据,将归一化后的数据保存为nor_result.csv文件
import pandas as pd
from sklearn.preprocessing import MinMaxScaler
df = pd.read_csv('E:\\Sentinel12\\yangben\\result.csv')
cols_to_normalize = df.columns[4:]
scaler_slope = MinMaxScaler(feature_range=(0, 1))
scaler_aspect = MinMaxScaler(feature_range=(0, 1))
df[cols_to_normalize[0]] = scaler_slope.fit_transform(df[[cols_to_normalize[0]]])
df[cols_to_normalize[1]] = scaler_aspect.fit_transform(df[[cols_to_normalize[1]]])
for col in cols_to_normalize[2:]:
    scaler = MinMaxScaler(feature_range=(0, 1))
    df[col] = scaler.fit_transform(df[[col]])
for col in cols_to_normalize:
    df['N_' + col] = df[col]
    df = df.drop(col, axis=1)
df.to_csv('E:\\Sentinel12\\yangben\\nor_result.csv', index=False)
 
2.打开SPSS软件
我使用的是spss 26版本的
 
 开始建模:
 点击分析-回归-线性
 
 选择因变量为生物量
 
 其他变量为自变量
 统计里面把R方勾上
 
 图的话我们选择
 

 得到输出结果
 










![[深度学习实战]基于PyTorch的深度学习实战(补充篇)[RNN和LSTM基本原理、PyTorch中的LSTM、Embedding层]](https://img-blog.csdnimg.cn/0820df122fae4795bf4d3431776ae7d9.png)







