Learns, from scratch, the distribution of each class from the provided labels. Args: features (torch.Tensor): features for each element. labels (torch.Tensor): initial labeling for each element.
(self, features, labels)
| 55 | self.params, self.scratch = self.compiled_extension.init() |
| 56 | |
| 57 | def learn(self, features, labels): |
| 58 | """ |
| 59 | Learns, from scratch, the distribution of each class from the provided labels. |
| 60 | |
| 61 | Args: |
| 62 | features (torch.Tensor): features for each element. |
| 63 | labels (torch.Tensor): initial labeling for each element. |
| 64 | """ |
| 65 | self.compiled_extension.learn(self.params, self.scratch, features, labels) |
| 66 | |
| 67 | def apply(self, features): |
| 68 | """ |