bootstrap method

  1. @override
CategoricColumn bootstrap({
  1. int? seed,
})

A bootstrap sample from this column.

Implementation

@override
CategoricColumn bootstrap({int? seed}) {
  final rand = math.Random(seed);
  return CategoricColumn(
      [for (var _ = 0; _ < length; _++) this[rand.nextInt(length)]])
    ..resetCategories(_categories);
}