Find The: Approximate Velocity Of 
approximate_velocity_of
A highly accurate approximation of the number of past events matching the criteria. Unlike Velocity Of, the values being counted are not restricted to Identifier and Subject attributes, so the same count can be taken over any attribute, any combination of attributes, or the result of a Query-Language expression.
For example:
- The number of requests carrying this User Agent String in the last hour.
- The number of successful logins from this device in the last 30 minutes.
- The fraction of all events in the last hour that carried this screen resolution.
Configuration
- Feature Name: The "dictionary" name under which the feature value will be stored and referenced by in rules.
- Attributes: Any attribute, or combination of attributes, whose value is counted. Any attribute may be used; unlike Velocity Of this is not restricted to Identifier or Subject attributes.
- Expression: A Query-Language expression, evaluated per event, whose result is counted in place of an attribute value. Used instead of Attributes.
- For Events: All event types, or a specific list of event types. Same as current is not available on this Feature Type.
- Normalize into Fraction of Total: When set, the count is divided by the approximate total count over the same window, returning a value in the range 0..1 instead of a raw count.
Optional Configuration
- Default Value: A value that can be assigned to the feature if the attributes to calculate the features are not present.
- Scope: Can be used to extend the event search from the local node, to all nodes within the same organization all the way to all across customers (global).
- Condition: A Query-Language filter that can be used to refine Features for specific use cases.
- Time Window: Can be used to limit the Feature calculation to a specific time period/window. e.g 1 hour. Default is
all; no time window
A Feature that breaks any of the following is rejected when the journey is deployed. With The Same must be left empty. Include Current Event is not supported. Starting must be Immediately. Attributes and Expression are mutually exclusive, so configure one or the other, never both and never neither.
Adding more than one attribute reduces the accuracy of the approximation, and the Feature Editor shows a note to that effect once a second attribute is selected. Use Approximate Velocity Of where Velocity Of cannot reach, meaning a non-identifier attribute or a value that only exists as an expression. Where an Identifier or Subject is being counted, Velocity Of is exact and should be preferred.
The count belongs to this Feature's definition. Editing the Feature starts a fresh count rather than carrying the old one over, so let it run for a while after a change before reading anything into the value. Renaming it has the same effect. To count against a population that already exists rather than one this Feature builds, see Specificity Of.
Use Case 1
Count the successful account logins carrying the current event's device identifier over the last 30 minutes, normalized into a fraction of the total.
Implementing In The Feature Editor
- name: dvc_login_frac_30min
default_value: -1
time_window:
mins: 30
starting: immediately
find_the:
approximate_velocity_of:
attributes:
- profiling.device.identifier
for_events:
event_type: all
include_current_event: false
with_the_same: []
condition: event_type = 'account_login_success'
normalize: true
with_scope: same_node_instance
Using the Feature in Rules and Investigations
feature('dvc_login_frac_30min') >= 0.25
Use Case 2
The same count over the last hour, taken from an expression rather than an attribute, and returned as a raw count rather than a fraction.
Implementing In The Feature Editor
- name: dvc_events_hour
default_value: -1
time_window:
hours: 1
starting: immediately
find_the:
approximate_velocity_of:
attributes: []
expression: profiling.device.identifier
for_events:
event_type: all
include_current_event: false
with_the_same: []
normalize: false
with_scope: same_node_instance