question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

weights for datasets

See original GitHub issue

Hi, I am trying to perform a fit on a weighted dataset, first trying the simple example in https://github.com/zfit/zfit/blob/develop/examples/simple_fit.py.
To do that, I used the weights argument in zfit.Data.from_numpy.
My weights are [0] * 9999 + [1]. When fitting, it tells me that there are incompatible shapes:

  File "iminuit/_libiminuit.pyx", line 736, in iminuit._libiminuit.Minuit.migrad
RuntimeError: exception was raised in user function
User function arguments:
       mu = +1.200000
    sigma = +1.300000
Original python exception in user function:
InvalidArgumentError: Incompatible shapes: [10000] vs. [9992]
	 [[node mul (defined at lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py:1748) ]]

Are the weights meant to be used for something else? Or is this unwanted behaviour?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
niklasnoltecommented, Jan 28, 2020

i just do the cutting myself for now. thanks for taking care of it!

0reactions
jonas-eschlecommented, Mar 11, 2020

Fixed in #212 (currently develop). Thanks again for reporting and please let us know in case the problem still persists.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Heights and Weights Dataset | Kaggle
This is a simple dataset to start with. It contains only the height (inches) and weights (pounds) of 25,000 different humans of 18...
Read more >
Why Weight? The Importance of Training on Balanced ...
Calculate sample weights ... Balanced class weights can be automatically calculated within the sample weight function. Set class_weight = ' ...
Read more >
A Primer for Using and Understanding Weights With National ...
The author gives recommendations on the most appropriate weighting options, with specific reference to employing a strategy to accommodate both oversampled ...
Read more >
Add weights to dataset - Weka Wiki
Add weights to dataset. The following examples show how to add weights to normal datasets and save them in the new XRFF data...
Read more >
The weight prediction dataset
This is description of our weight prediction dataset which was used to train and test the object weight prediction neural network in our...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found