2018-08-05 17:00 GMT+01:00 Thouraya TH <thouray...@gmail.com>:

> Hi,
> Please i'd like to use prediction techniques in sklearn .
> I have this file:
>
>
> x | y
>
> 1| 1
> 2| 4
> 4|16
>
>
> --> prediction techniques must give me this model y=x*x
>
>
> using this model i can predict the value y of x=3
> This is a sample example. In my experiment i use a file with 1000 lines.
> Please, how can transform these lines on codes ?
>
>
> Code:
>
>  from sklearn.preprocessing import PolynomialFeatures
>
> from sklearn import linear_model
>
>
>
> X = [[1, 2, 4], [1, 4, 16]]
>
>
>
> poly = PolynomialFeatures(degree=2)
>
>
>
> X_ = poly.fit_transform(X)
>
>
> Thank you so much for help.
> Kind regards.
>
_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn

Reply via email to