Cluster-weighted sampling, as ESM-2 drew UniRef50: a cluster uniformly, then one of its members uniformly, so large families don't dominate. With every sequence its own cluster, it is uniform sampling with replacement.
More...
#include <protein_training.hpp>
|
| | ClusterSampler (const std::vector< std::string > &cluster_of, uint64_t seed=0) |
| |
| int64_t | next () |
| | The next sequence's index.
|
| |
| int64_t | num_clusters () const |
| |
Cluster-weighted sampling, as ESM-2 drew UniRef50: a cluster uniformly, then one of its members uniformly, so large families don't dominate. With every sequence its own cluster, it is uniform sampling with replacement.
◆ ClusterSampler()
| pulsatrix::ClusterSampler::ClusterSampler |
( |
const std::vector< std::string > & |
cluster_of, |
|
|
uint64_t |
seed = 0 |
|
) |
| |
- Parameters
-
| cluster_of | Each sequence's cluster, any ids. |
- Exceptions
-
| std::invalid_argument | if empty. |
◆ next()
| int64_t pulsatrix::ClusterSampler::next |
( |
| ) |
|
The next sequence's index.
◆ num_clusters()
| int64_t pulsatrix::ClusterSampler::num_clusters |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: