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
In the section 'Machine Learning' in the 'Foundations' course, there is a code block in the 'Inference' sub-section:
# Unstandardize predictions pred_infer = model(X_infer).detach().numpy() * np.sqrt(y_scaler.var_) + y_scaler.mean_ for i, index in enumerate(sample_indices): print (f"{df.iloc[index]["y"]:.2f} (actual) → {pred_infer[i][0]:.2f} (predicted)")
However since there are also double-quotes around the y in the indexing (intended to display as "y"), the f-string ends early.
A fix would include simply changing the double quotes around the "y" to single quotes 'y':
# Unstandardize predictions pred_infer = model(X_infer).detach().numpy() * np.sqrt(y_scaler.var_) + y_scaler.mean_ for i, index in enumerate(sample_indices): print (f"{df.iloc[index]['y']:.2f} (actual) → {pred_infer[i][0]:.2f} (predicted)")
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In the section 'Machine Learning' in the 'Foundations' course, there is a code block in the 'Inference' sub-section:
# Unstandardize predictions pred_infer = model(X_infer).detach().numpy() * np.sqrt(y_scaler.var_) + y_scaler.mean_ for i, index in enumerate(sample_indices): print (f"{df.iloc[index]["y"]:.2f} (actual) → {pred_infer[i][0]:.2f} (predicted)")
However since there are also double-quotes around the y in the indexing (intended to display as "y"), the f-string ends early.
A fix would include simply changing the double quotes around the "y" to single quotes 'y':
# Unstandardize predictions pred_infer = model(X_infer).detach().numpy() * np.sqrt(y_scaler.var_) + y_scaler.mean_ for i, index in enumerate(sample_indices): print (f"{df.iloc[index]['y']:.2f} (actual) → {pred_infer[i][0]:.2f} (predicted)")
The text was updated successfully, but these errors were encountered: