Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prob_joint = normalize(prob_user * prob_usage) #12

Open
Mirjam-blokker opened this issue Sep 5, 2022 · 1 comment
Open

prob_joint = normalize(prob_user * prob_usage) #12

Mirjam-blokker opened this issue Sep 5, 2022 · 1 comment

Comments

@Mirjam-blokker
Copy link
Collaborator

in simulate, you find:
prob_joint = normalize(prob_user * prob_usage)

In the Matlab version I have coded this a bit differently. In case there is a prob_usage that is not only 1's (e.g. for the kitchen tap), this pdf is prevailing. Only when the users are not present, then a correction is made. This means that prob_user is first converted to 0 (not present) and 1 (present), but without the information on peak, night, away included.
Of course when prob_usage is only 1's, then prob_user is prevailing, and the information on peak, night and away is used.

@Yukun-Xie
Copy link
Collaborator

This problem can be solved by appling bool calculation.
Besides, the joint probability can be calculated outside the 'for' cycle and normalized in the cycle(reduce the number of operations).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants