Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- reload(hw3code)
- print("No cut")
- bias, variance = hw3code.compute_bias_variance(DecisionTreeRegressor(), np.sin)
- print("Bias %5f Variance %5f" % (bias, variance))
- print()
- reload(hw3code)
- print("Depth 2")
- bias, variance = hw3code.compute_bias_variance(DecisionTreeRegressor(max_depth=2), np.sin)
- print("Bias %5f Variance %5f" % (bias, variance))
- print()
- reload(hw3code)
- print("Depth 4")
- bias, variance = hw3code.compute_bias_variance(DecisionTreeRegressor(max_depth=4), np.sin)
- print("Bias %5f Variance %5f" % (bias, variance))
- print()
Add Comment
Please, Sign In to add comment