Skip to contents

Make a Transformation that computes the number of times each category appears in the data. This assumes that the category set is known.

Usage

make_count_by_categories(
  input_domain,
  input_metric,
  categories,
  null_category = TRUE,
  .MO = "L1Distance<int>",
  .TOA = "int"
)

Arguments

input_domain

undocumented

input_metric

undocumented

categories

The set of categories to compute counts for.

null_category

Include a count of the number of elements that were not in the category set at the end of the vector.

.MO

Output Metric.

.TOA

Atomic Output Type that is numeric.

Value

The carrier type is Vec<TOA>, a vector of the counts (TOA).

Details

Required features: contrib

make_count_by_categories in Rust documentation.

Citations:

Supporting Elements:

  • Input Domain: VectorDomain<AtomDomain<TIA>>

  • Output Domain: VectorDomain<AtomDomain<TOA>>

  • Input Metric: SymmetricDistance

  • Output Metric: MO