Job: Class Probability Filter (Legacy)
Select a subset of extracted particles.
Last updated
Select a subset of extracted particles.
Last updated
Keep particles which have a high probability of belonging to selected 2D or 3D classes.
In most particle curation pipelines, 2D and 3D classification are used to group particles into good and bad classes (that is, classes which do and do not look like the target). Particles can then be retained for downstream analysis if they belong to a good class and discarded if they belong to a bad class. In other words, particles are selected using a binary filter — they either are or are not in a good class.
Most classification jobs in CryoSPARC assign classes a probability of belonging to a class, rather than a binary in or out classification. When using class membership to filter particles, particles are considered to be members of the class for which they have the highest probability. Good particles ideally have a high probability of belonging to one class and a low probability of belonging to all others.
For example, the top two particles images in the figure at the top of this article have much higher probability of belonging to the cone or cube (respectively) than any other class. Filtering particles by their best class is often sufficient for high-quality data.
Consider, on the other hand, a junk particle (the third particle image in the figure at the top of this article). Since it is random noise, it has a relatively low probability of belonging to any class. If it happens by random chance to have the highest probability of belonging to a good class it will still be selected, despite the fact that its probability in that class may be much lower than particles which truly belong to that class. In this example, the junk particle has a probability of 0.26
of belonging to the cube class, which is greater than its probability of belonging to any other class so if we took all particles in the cube class we would also take this junk particle.
The Class Probability Filter job filters particles by their probability of belonging to a given class or set of classes, rather than simply by whether they are more likely to belong to a good class than a bad class. Considering the example above again, if we designate the cube and cone as good classes and only keep particles with a 75% or greater chance of belonging to one of those two classes, the good particles will be kept and the junk pick will correctly be discarded.
This job acts on either 2D or 3D class probabilities. Because of how jobs work under the hood in CryoSPARC, either 3D or 2D parameters must be set. Setting both or the wrong parameter will cause the job to fail when it looks for data which is not there.
Indexes of good classes. These can be found in several places, including the output panel. For instance, if the good volumes are labeled “Volume class 0” and “Volume class 2” in the output panel, entering 0,2
for this parameter would select those classes as good and the rest as bad.
Class Probability Filter will keep only particles which have a total probability, across all input classes, of this value or greater.
For instance, say we have classified three particles into four classes. Classes 1 and 2 are good classes, and we want to keep any particle that has a total probability of being in a good class of 0.6 or better. If we only look at individual probabilities, no particles meet this threshold:
However, if we consider the sum of the probability of all good classes (provided by 3D Class Indexes
), then particles 2 and 3 both clear the threshold of 0.6:
Class Probability Filter will keep only particles which have a probability in their best class of at least this value.
For instance, if the input particles are classified into four classes A, B, C, and D and this parameter was set to 0.9
, a particle would be kept if its probabilities were 0.95, 0.01, 0.01, 0.00
but not 0.4, 0.3, 0.2, 0.0
. Note that there is no way to know whether this high probability comes from a good or bad class. Class Probability Filter selects particles based on the confidence of their assignment, not the quality of the class they are assigned to.
Particles with a total probability greater than or equal to the threshold are in this output group, otherwise unchanged.
Particles with a total probability less than the threshold are in this output group, otherwise unchanged.
Keep particles which have a high probability of belonging to selected 2D or 3D classes.
In most particle curation pipelines, 2D and 3D classification are used to group particles into good and bad classes (that is, classes which do and do not look like the target). Particles can then be retained for downstream analysis if they belong to a good class and discarded if they belong to a bad class. In other words, particles are selected using a binary filter — they either are or are not in a good class.
Most classification jobs in CryoSPARC assign classes a probability of belonging to a class, rather than a binary in or out classification. When using class membership to filter particles, particles are considered to be members of the class for which they have the highest probability. Good particles ideally have a high probability of belonging to one class and a low probability of belonging to all others.
For example, the top two particles images in the figure at the top of this article have much higher probability of belonging to the cone or cube (respectively) than any other class. Filtering particles by their best class is often sufficient for high-quality data.
Consider, on the other hand, a junk particle (the third particle image in the figure at the top of this article). Since it is random noise, it has a relatively low probability of belonging to any class. If it happens by random chance to have the highest probability of belonging to a good class it will still be selected, despite the fact that its probability in that class may be much lower than particles which truly belong to that class. In this example, the junk particle has a probability of 0.26
of belonging to the cube class, which is greater than its probability of belonging to any other class so if we took all particles in the cube class we would also take this junk particle.
The Class Probability Filter job filters particles by their probability of belonging to a given class or set of classes, rather than simply by whether they are more likely to belong to a good class than a bad class. Considering the example above again, if we designate the cube and cone as good classes and only keep particles with a 75% or greater chance of belonging to one of those two classes, the good particles will be kept and the junk pick will correctly be discarded.
This job acts on either 2D or 3D class probabilities. Because of how jobs work under the hood in CryoSPARC, either 3D or 2D parameters must be set. Setting both or the wrong parameter will cause the job to fail when it looks for data which is not there.
Indexes of good classes. These can be found in several places, including the output panel. For instance, if the good volumes are labeled “Volume class 0” and “Volume class 2” in the output panel, entering 0,2
for this parameter would select those classes as good and the rest as bad.
Class Probability Filter will keep only particles which have a total probability, across all input classes, of this value or greater.
For instance, say we have classified three particles into four classes. Classes 1 and 2 are good classes, and we want to keep any particle that has a total probability of being in a good class of 0.6 or better. If we only look at individual probabilities, no particles meet this threshold:
However, if we consider the sum of the probability of all good classes (provided by 3D Class Indexes
), then particles 2 and 3 both clear the threshold of 0.6:
Class Probability Filter will keep only particles which have a probability in their best class of at least this value.
For instance, if the input particles are classified into four classes A, B, C, and D and this parameter was set to 0.9
, a particle would be kept if its probabilities were 0.95, 0.01, 0.01, 0.00
but not 0.4, 0.3, 0.2, 0.0
. Note that there is no way to know whether this high probability comes from a good or bad class. Class Probability Filter selects particles based on the confidence of their assignment, not the quality of the class they are assigned to.
Particles with a total probability greater than or equal to the threshold are in this output group, otherwise unchanged.
Particles with a total probability less than the threshold are in this output group, otherwise unchanged.
Subset Particles by Statistic, released in CryoSPARC v4.7, performs this analysis when Subset by
is set to Class probability - 2D
or Class probability - 3D
. It can operate with a single threshold (like Class Probability Filter does), or with multiple thresholds. Additionally, it can cluster particles by their class probability with a Gaussian mixture model. As such, Class Probability Filter is a legacy job in v4.7, and this type of analysis should be performed with Subset Particles by Statistic instead.
In CryoSPARC v4.7, Class Probability Filter’s functionality was moved to the more-flexible . See for more information.
This job accepts particles which have been classified either in , , or . If particles come from a 2D Classification, it is generally best to select good classes in Select 2D Classes first.
, released in CryoSPARC v4.7, performs this analysis when Subset by
is set to Class probability - 2D
or Class probability - 3D
. It can operate with a single threshold (like Class Probability Filter does), or with multiple thresholds. Additionally, it can cluster particles by their class probability with a Gaussian mixture model. As such, Class Probability Filter is a legacy job in v4.7, and this type of analysis should be performed with Subset Particles by Statistic instead.
This job accepts particles which have been classified either in , , or . If particles come from a 2D Classification, it is generally best to select good classes in Select 2D Classes first.