Skip to content

Commit

Permalink
Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturoAmorQ committed May 7, 2024
1 parent 16c35ad commit 32407a5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python_scripts/ensemble_gradient_boosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ def generate_data(n_samples=50):
"""Generate synthetic dataset. Returns `data_train`, `data_test`,
`target_train`."""
x_max, x_min = 1.4, -1.4
len_x = x_max - x_min
rng = np.random.default_rng(0) # Create a random number generator
x = rng.uniform(size=(n_samples,)) * len_x - len_x / 2
x = rng.uniform(x_min, x_max, size=(n_samples,))
noise = rng.normal(size=(n_samples,)) * 0.3
y = x**3 - 0.5 * x**2 + noise

Expand Down

0 comments on commit 32407a5

Please sign in to comment.