Skip to content

Commit

Permalink
fix calculating E[x2] in FullSupportBarDistribution
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Valchev committed Feb 5, 2025
1 parent f1af310 commit 4c79b45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tabpfn/model/bar_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ def mean_of_square(self, logits: torch.Tensor) -> torch.Tensor:
)
bucket_mean_of_square[-1] = (
side_normals[1].variance
+ (side_normals[1].variance + self.borders[-2]).square()
+ (side_normals[1].mean + self.borders[-2]).square()
)
p = torch.softmax(logits, -1)
return p @ bucket_mean_of_square
Expand Down

0 comments on commit 4c79b45

Please sign in to comment.