I'd like to set my target feature as a hyperparameter which can be tuned.
For example, if the feature that I was solving for was volume, I might have a series of volumes in my data like this:
0.01, 0.02, 0.03, 0.04, 0.05, 0.06, etc.
Right now I'm assigning each of them to a "bin number" like this:
0.01: 1
0.02: 2
0.03: 3
0.04: 4
0.05: 5
0.06: 6
That may be too difficult to solve though, and I may want to try binning two volumes together:
0.01: 1
0.02: 1
0.03: 2
0.04: 3
0.05: 3
0.06: 3
There are multiple combinations of how I could "bin" these volumes together, and I'd like to know which one will give me the best results, just like one would do with Grid Search CV.
Is there an inbuilt way to do this? If I was going to write my own version of a hyperparameter into my Machine learning code, where should I start with this?
Thanks!
question from:https://stackoverflow.com/questions/66050937/how-to-create-my-own-hyper-parameter-within-sklearn