Class: Detector
dg.Detector
Constructors
constructor
• new Detector()
Methods
sampleCategories
▸ Static
sampleCategories(column
, check
, min?
, max?
, ratio?
, minStringLength?
): boolean
Calls [check] function against a random subset of the column values, returns true if all checks return true. Useful for the efficient auto-detection of the column semantic type.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
column | Column <any > | undefined | |
check | StringPredicate | undefined | |
min | number | 5 | minimum number of categories. Returns false if less than that. |
max | number | 10 | number of checks to make |
ratio | number | 1 | [0-1] range: minimum allowed number of the success/total checks. |
minStringLength | number | 1 | values shorter than that are not considered checks |
Returns
boolean