ankane / eps

Machine learning for Ruby
MIT License
643 stars 15 forks source link

Question about computing the intercept #11

Closed Aliciawyse closed 4 years ago

Aliciawyse commented 4 years ago

Hi there!

I have the following code:

model = Eps::LinearRegression.new(x, y)

It outputs something like

image

I have a question about that text highlighted in pink. Is there a way to prevent the intercept from being calculated?

For example, the scikit learn library has this fit_intercept method that can be set to true to false, allowing me to say when I want an intercept to be used in calculations.

Is this possible with this library?

ankane commented 4 years ago

Hey @Aliciawyse, added on master.

Eps::LinearRegression.new(x, y, intercept: false)
Aliciawyse commented 4 years ago

wow, thanks!