Skip to content

Add include_bias option for basis function #193

Open
@wilsonrljr

Description

@wilsonrljr

Is your feature request related to a problem? Please describe.
Currently, some basis function in SysIdentPy automatically includes a bias term (intercept) in the model structure. While this is beneficial in many scenarios, there are cases where users may prefer to exclude the bias term to better fit specific modeling requirements. The lack of an option to include or exclude the bias term limits the flexibility of the basis function implementation.

New basis functions like legendre already has this option, but common basis like polynomial do not have such option.

Describe the solution you'd like
Introduce an include_bias parameter to the basis function, allowing users to specify whether or not to include the bias term in the model. By default, this parameter can be set to True to maintain current behavior, ensuring backward compatibility. When set to False, the basis function would exclude the bias term from the model structure.

Describe alternatives you've considered

  • Manual Removal: Users can manually modify the model structure to exclude the bias term after the basis function has been applied. However, this approach is cumbersome and prone to errors, especially for complex models.
  • Custom Basis Functions: Developing custom basis functions without a bias term is another alternative. However, this requires additional effort and may lead to code duplication, reducing maintainability.

Additional context
Implementing the include_bias parameter would improve the flexibility of SysIdentPy's basis function, accommodating a wider range of modeling scenarios. This feature aligns with practices in other machine learning libraries, such as scikit-learn, where similar parameters are available for linear models and polynomial feature generation.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions