from sklearn.linear_model import LinearRegression # Let the computer find the pattern model = LinearRegression() model.fit(heights.reshape(-1, 1), weights) # Learn from data # Make predictions prediction = model.predict([[175]]) print(f"Learned prediction: {prediction[0]:.1f}kg")