MCPcopy Index your code
hub / github.com/PAIR-code/lit / groupExamples

Method groupExamples

lit_nlp/client/modules/dive_module.ts:431–442  ·  view source on GitHub ↗

Groups examples based on the selected row and column features.

(groupingFeatures: [string, string])

Source from the content-addressed store, hash-verified

429
430 /** Groups examples based on the selected row and column features. */
431 private groupExamples(groupingFeatures: [string, string]): GroupedExamples {
432 const configs: FacetingConfig[] = groupingFeatures
433 .filter((featureName) =>
434 this.groupService.numericalFeatureNames.includes(featureName))
435 .map((featureName) => ({
436 featureName,
437 method: FacetingMethod.EQUAL_INTERVAL,
438 }));
439 const numericalBins = this.groupService.numericalFeatureBins(configs);
440 return this.groupService.groupExamplesByFeatures(
441 numericalBins, this.appState.currentInputData, groupingFeatures);
442 }
443
444 /**
445 * Computes the `size` (width of a column, height of a row) and the `sumTo`

Callers 1

configureMethod · 0.95

Calls 3

filterMethod · 0.80
numericalFeatureBinsMethod · 0.80

Tested by

no test coverage detected