ToolPythonIntermediate
RDKit from the ground up: water solubility from a molecule's structure
- return root_mean_squared_error(y[test], pred)
- print(f"linear RMSE {root_mean_squared_error(y[test_s], lin_s.predict(X[test_s])):.2f}, "
- f"ridge RMSE {root_mean_squared_error(y[test_s], ridge_s.predict(Z_s[test_s])):.2f}")
- l = root_mean_squared_error(y[te], LinearRegression().fit(X[tr], y[tr]).predict(X[te]))
- r = root_mean_squared_error(y[te], RidgeCV(alphas=alphas).fit(Zs[tr], y[tr]).predict(Zs[te]))