I agree that this is best handled with a custom transformer, for the reasons cited by Jacob, but also because it sounds like this transformer does not gather statistics from the training data, and so can be implemented with FunctionTransformer
On 7 Jul 2017 6:10 am, "Jacob Schreiber" <jmschreibe...@gmail.com> wrote: Hi Jeremy! Thanks for your offer to contribute. We're always looking for people to add good ideas to the package. Time series data can be tricky to handle appropriately, and so I think we generally try to pass it off to more specialized packages that focus on that. Andreas may have a more detailed perspective on this though. Jacob On Thu, Jul 6, 2017 at 12:50 PM, jt cunni <jtcu...@gmail.com> wrote: > First off, I have never contributed to anything before so please have > patience with me. I am a data scientist and I have been working with doing > some feature engineering on one of my datasets. In my code, I have a > pipeline of several transformers and an estimator. I use my pipeline > and randomizedsearchcv to tune my hyper-parameters and my transformer > settings. Pretty standard stuff. One thing I was doing was creating a > feature that was a moving average of another feature. In a basic example, > imagine I want to predict if a team is going to win a baseball game. I > create a feature that is the moving average of the last N games of runs > scored per game (this is the window size of the moving average). Not > knowing what the best window size for the moving average, I created a > custom transformer that could be put in a pipeline to find the window size > that provides the most lift. Is there any interest for this type of > contribution? If so, what unittests or anything else do I need to provide? > > > > Thanks, > > Jeremy > > _______________________________________________ > scikit-learn mailing list > scikit-learn@python.org > https://mail.python.org/mailman/listinfo/scikit-learn > > _______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn