series_magnitude()
Applies to: ✅ Microsoft Fabric ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Calculates the magnitude of series elements. This is equivalent to the square root of the dot product of the series with itself.
series_magnitude(
series)
Learn more about syntax conventions.
Name | Type | Required | Description |
---|---|---|---|
series | dynamic |
✔️ | Array of numeric values. |
Returns a double type value representing the magnitude of the series.
For enhanced performance and reduced storage requirements when using this function, consider using the Vector16
encoding policy for storing floating-point vectors that don't require 64 bits precision, such as ML vector embeddings. The Vector16
profile, which utilizes the Bfloat16 floating-point representation, can significantly optimize the operation and reduce storage size by a factor of 4. For more details on the Vector16
encoding policy, refer to the Encoding Policy Types.
print arr=dynamic([1,2,3,4])
| extend series_magnitude=series_magnitude(arr)
Output
s1 | s2 | series_magnitude |
---|---|---|
[1,2,3,4] | 5.4772255750516612 |