We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"pillow==8.3.2"
instead of
"pillow>=8.3.2"
This isn't optimal but so far it works as long as I don't need to paste equations on Colab.
N = len(soldata) error = [] error_std = [] for c in unique_classes: # slice out segments test = soldata.loc[soldata["Group"] == c] train = soldata.loc[soldata["Group"] != c] test_x, test_y = test[feature_names].values, test["Solubility"].values x, y = train[feature_names].values, train["Solubility"].values # compute coefficients w, *_ = np.linalg.lstsq(x, y) # compute intercept (b) b = np.mean(y - np.dot(x, w)) # compute test erropr k_error.append(np.mean((np.dot(test_x, w) + b - test_y) ** 2)) error.append(np.mean(k_error)) error_std.append(np.std(k_error, ddof=1)) print(f"test error = {np.mean(error):.2f}")
There is something missing as k_error isn't initiated
The text was updated successfully, but these errors were encountered:
No branches or pull requests
"pillow==8.3.2"
instead of
"pillow>=8.3.2"
This isn't optimal but so far it works as long as I don't need to paste equations on Colab.
Leave one class out CV
N = len(soldata)
error = []
error_std = []
for c in unique_classes:
# slice out segments
test = soldata.loc[soldata["Group"] == c]
train = soldata.loc[soldata["Group"] != c]
test_x, test_y = test[feature_names].values, test["Solubility"].values
x, y = train[feature_names].values, train["Solubility"].values
# compute coefficients
w, *_ = np.linalg.lstsq(x, y)
# compute intercept (b)
b = np.mean(y - np.dot(x, w))
# compute test erropr
k_error.append(np.mean((np.dot(test_x, w) + b - test_y) ** 2))
error.append(np.mean(k_error))
error_std.append(np.std(k_error, ddof=1))
print(f"test error = {np.mean(error):.2f}")
There is something missing as k_error isn't initiated
The text was updated successfully, but these errors were encountered: