top of page
Search

PYTHON CODING

  • Writer: waclaw_koscielniak
    waclaw_koscielniak
  • 4 days ago
  • 1 min read

from sklearn.linear_model import LinearRegression

import numpy as np

X = np.array([[1], [2], [3]])

Y = np.array([2, 4, 6])

model = LinearRegression().fit(X, Y)

print(model.predict([[4]])[0])


[Running] python3 -u "/Users/name/test/test638.py"

7.999999999999998

[Done] exited with code=0 in 1.378 seconds



Try to verify it.
Try to verify it.
















 
 
 

1 Comment


Guest
4 days ago

Check if this is true.

Like
bottom of page