Skip to content

Conversation

@dhruvpal102005
Copy link

Hey! This PR adds the include_bias option to Polynomial and Fourier basis functions.

Right now, some basis functions like Legendre and Hermite already let you control whether to include a bias term, but Polynomial and Fourier didn't have that option. This was limiting for certain modeling scenarios where you might not want the bias term.

What changed:

  • Added include_bias parameter to both Polynomial and Fourier
  • Set the default to True to match what Legendre, Hermite, etc. are doing
  • Updated the existing tests since the default behavior now includes a bias column
  • Added some new tests to make sure both include_bias=True and include_bias=False work correctly

Testing:

Tested manually and everything works as expected:

  • When include_bias=True, you get a column of ones prepended to the output
  • When include_bias=False, no bias column is added

Let me know if you'd like me to change anything!

Fixes #193

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add include_bias option for basis function

1 participant