Closed TarenGorman closed 6 years ago
Not a huge fan of n_features. Maybe we should streamline SymbolicFeatures with PolynomialFeatures and provide n_output_features_
instead of n_features
and than use this in the SINDy
class.
Okay yeah I think that's a good idea. So, replacing in symfeat.py
:
121 # 1) Get all simple features
122 simple = (SimpleFeature(e, index=i) for e, i in product(self.exponents, range(self.n_features)))
With a PolynomialFeatures call and removing all the SimpleFeature implementation essentially?
I was looking at https://github.com/Ohjeah/sparsereg/blob/master/sparsereg/preprocessing/symfeat.py#L120
which should be n_inputfeatures similar to https://github.com/scikit-learn/scikit-learn/blob/a24c8b46/sklearn/preprocessing/data.py#L1313-L1314
Okay got it, I updated the pull request with PolynomialFeatures
styling for the SymbolicFeatures
and SINDy
classes.
Perfect, thanks!
Some small functionality edits for wrapper class: