Introduction to Linear Modeling in Python
Jason Vestuto
Data Scientist
การสร้างโมเดล:
การประเมินโมเดล:
residuals = y_model - y_data
RSS = np.sum( np.square(residuals) )
mean_squared_residuals = np.sum( np.square(residuals) ) / len(residuals)
MSE = np.mean( np.square(residuals) )
RMSE = np.sqrt(np.mean( np.square(residuals)))
RMSE = np.std(residuals)
ค่าเบี่ยงเบน:
deviations = np.mean(y_data) - y_data
VAR = np.sum(np.square(deviations))
ค่าคงเหลือ:
residuals = y_model - y_data
RSS = np.sum(np.square(residuals))
R-squared:
r_squared = 1 - (RSS / VAR)
r = correlation(y_data, y_model)




Introduction to Linear Modeling in Python