final formatting tweaks
This commit is contained in:
parent
207f77cdc7
commit
9ae5e09387
|
@ -33,7 +33,6 @@ You can see the code [here](https://git.nunosempere.com/NunoSempere/peopleprobs/
|
||||||
|
|
||||||
With that code, the posterior over the number of people my followers know stands as:
|
With that code, the posterior over the number of people my followers know stands as:
|
||||||
|
|
||||||
|
|
||||||
| Num people known | % |
|
| Num people known | % |
|
||||||
| ---- | ----- |
|
| ---- | ----- |
|
||||||
| ~16 | 7.2% |
|
| ~16 | 7.2% |
|
||||||
|
|
|
@ -140,13 +140,14 @@ func main() {
|
||||||
|
|
||||||
for j := i * (n_dists / num_threads); j < (i+1)*(n_dists/num_threads); j++ {
|
for j := i * (n_dists / num_threads); j < (i+1)*(n_dists/num_threads); j++ {
|
||||||
|
|
||||||
// Get
|
// Get indivisual distributions
|
||||||
people_known_distribution := generatePeopleKnownDistribution(r)
|
people_known_distribution := generatePeopleKnownDistribution(r)
|
||||||
result := getUnnormalizedBayesianUpdateForDistribution(people_known_distribution, r)
|
result := getUnnormalizedBayesianUpdateForDistribution(people_known_distribution, r)
|
||||||
if result > 0 {
|
if result > 0 {
|
||||||
dists[j] = IntProbsWeights{IntProbs: people_known_distribution, w: result}
|
dists[j] = IntProbsWeights{IntProbs: people_known_distribution, w: result}
|
||||||
} else {
|
} else {
|
||||||
dists[j] = IntProbsWeights{IntProbs: nil, w: 0} // make explicit that this is initialized to nil; we won't compute it later becasue weight is 0
|
dists[j] = IntProbsWeights{IntProbs: nil, w: 0}
|
||||||
|
// make explicit that this is initialized to nil; we won't compute it later becasue weight is 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user