arogozhnikov / hep_ml

Machine Learning for High Energy Physics.
https://arogozhnikov.github.io/hep_ml/
Other
179 stars 64 forks source link

Question for multidimensional fit #34

Open vrivesmolina opened 8 years ago

vrivesmolina commented 8 years ago

Hi,

I am using your tool for reweighing MC to make it look like splotted data (thanks!) I am currently following the examples and I am able to make it work for 1D, but I am not sure how to do it for more than one dimension. I mean, what I need is to find the MC weights when more than one variable presents disagreement between MC and data.

How do I do it?

Thanks!

Vicente Rives Molina

arogozhnikov commented 8 years ago

Dear Vincente, there is no difference between single / multidimensional fits.

The data you pass should be numpy.array or pandas.DataFrame of shape [n_samples, n_features]. If you want to pass weights, pass numpy.array of shape [n_samples].

If you feel this explanation is still complicated, you can pass through some scikit-learn tutorial, e.g. this one