Description Usage Arguments Details Value Author(s) See Also Examples
hardclasses
converts the soft class labels in x
into a factor with hard class memberships and
NA
for soft samples.
1 2 3 |
x |
matrix or array holding the class memberships |
classdim |
dimension that holds the classes, default columns |
soft.name |
level for soft samples |
tol |
tolerance: samples with membership >= 1 - tol are considered to be hard samples of the respective class. |
drop |
see |
closed |
logical indicating whether the system should be treated as closed-world (i.e. all memberships add to 1) |
harden
hardens the soft
factor array of shape dim (x) [-classdim]
Claudia Beleites
factor2matrix
for the inverse
1 2 3 4 5 6 7 8 9 10 11 12 13 | softclassval:::pred
harden (softclassval:::pred)
harden (softclassval:::pred, closed = FALSE)
## classical threshold at 0.5
harden (softclassval:::pred, tol = 0.5)
## grey zone: NA for memberships between 0.25 and 0.75
harden (softclassval:::pred, tol = 0.25)
## threshold at 0.7 = 0.5 + 0.2:
harden (softclassval:::pred - 0.2, tol = 0.5)
harden (softclassval:::pred - 0.2, tol = 0.5, closed = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.