Distribute a numerical range to each cell of a list based on a weighting factor assigned on it
up vote
0
down vote
favorite
I have a list of 'bins' and an equal length list of weighting factors (probabilities) associated to each bin. Given a numeric range, for example 100,000, I want to distribute it to each bin based on their associated weighting factors.
I don't even know how to start tackling this,
I need to make sure that the input range can fit in the bins:
input_number mod bins_list_length = 0
Distribute the given numeric range to each bin based on the weighting factor assosiated to each bin:
no idea
Any suggestions are more than welcome!
thanks
python list modulo
add a comment |
up vote
0
down vote
favorite
I have a list of 'bins' and an equal length list of weighting factors (probabilities) associated to each bin. Given a numeric range, for example 100,000, I want to distribute it to each bin based on their associated weighting factors.
I don't even know how to start tackling this,
I need to make sure that the input range can fit in the bins:
input_number mod bins_list_length = 0
Distribute the given numeric range to each bin based on the weighting factor assosiated to each bin:
no idea
Any suggestions are more than welcome!
thanks
python list modulo
It would be helpful to know more about the probability distribution you are using, like is it a uniform probability? Also, please post the code you have tried, it's easier to answer pointing to your code than a description of the general problem.
– Joshua Smith
Nov 19 at 23:41
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a list of 'bins' and an equal length list of weighting factors (probabilities) associated to each bin. Given a numeric range, for example 100,000, I want to distribute it to each bin based on their associated weighting factors.
I don't even know how to start tackling this,
I need to make sure that the input range can fit in the bins:
input_number mod bins_list_length = 0
Distribute the given numeric range to each bin based on the weighting factor assosiated to each bin:
no idea
Any suggestions are more than welcome!
thanks
python list modulo
I have a list of 'bins' and an equal length list of weighting factors (probabilities) associated to each bin. Given a numeric range, for example 100,000, I want to distribute it to each bin based on their associated weighting factors.
I don't even know how to start tackling this,
I need to make sure that the input range can fit in the bins:
input_number mod bins_list_length = 0
Distribute the given numeric range to each bin based on the weighting factor assosiated to each bin:
no idea
Any suggestions are more than welcome!
thanks
python list modulo
python list modulo
asked Nov 19 at 23:35
Artemis
1716
1716
It would be helpful to know more about the probability distribution you are using, like is it a uniform probability? Also, please post the code you have tried, it's easier to answer pointing to your code than a description of the general problem.
– Joshua Smith
Nov 19 at 23:41
add a comment |
It would be helpful to know more about the probability distribution you are using, like is it a uniform probability? Also, please post the code you have tried, it's easier to answer pointing to your code than a description of the general problem.
– Joshua Smith
Nov 19 at 23:41
It would be helpful to know more about the probability distribution you are using, like is it a uniform probability? Also, please post the code you have tried, it's easier to answer pointing to your code than a description of the general problem.
– Joshua Smith
Nov 19 at 23:41
It would be helpful to know more about the probability distribution you are using, like is it a uniform probability? Also, please post the code you have tried, it's easier to answer pointing to your code than a description of the general problem.
– Joshua Smith
Nov 19 at 23:41
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53384186%2fdistribute-a-numerical-range-to-each-cell-of-a-list-based-on-a-weighting-factor%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
It would be helpful to know more about the probability distribution you are using, like is it a uniform probability? Also, please post the code you have tried, it's easier to answer pointing to your code than a description of the general problem.
– Joshua Smith
Nov 19 at 23:41