require.mx('mxjs/base/algorithms/stat_neighbours_3d.js');
Status | Name |
---|---|
statNeighbours3D
(
Object settings
)
This function searches from points in the primary table, finds rows from the foreign table which are in range, then calculates statistics from columns in the foreign table and writes the results to the primary table.
Each variable definition is an object which must have a read property giving a number (or id) column reading function on the foreign table. The variable definition can specify any (or all) of the following properties, which should be write functions on the primary table:
A variable definition can also contain a percentiles property, which is an array of percentile elements, where each percentile element is an array of the form [percentile value, percentile write function]. For example
[0.75, Primary.write_Percentile75] .
|
This function searches from points in the primary table, finds rows from the foreign table which are in range, then calculates statistics from columns in the foreign table and writes the results to the primary table.
You can think of this as a combination of a table map in "map all" mode and an accumulation which calculates stats from the "map all" results by group and then writes the results back to the original primary table.
The settings file has the following properties:
primaryBegin
index to begin reading the primary table (e.g. 0)primaryEnd
index before which to end reading the primary table (e.g. Primary.size())primaryReadLocation
function to read the point from the primary tableforeignBegin
index to begin reading the foreign table (e.g. 0)foreignEnd
index before which to end reading the foreign table (e.g. Foreign.size())foreignReadLocation
function to read the point from the foreign tableR
radius of sphere to search around the primary locationRmax
radius of maximum sphere to search around the primary location (if using an expanding sphere to satisfy minNeighboursRequired)minNeighboursRequired
if R maxNeighboursConsidered
at most this many values from the foreign rows will be used for the statistical analysis of each variable (note that only non-null, non-NaN, finite numbers are considered - all other rows are ignored)variables
an array of variable definitions, each variable has its own statistics calculateddistances
effectively a single variable definition without a read function - statistics are calculated on the distances from the primary point to the neighbouring pointsread
property giving a number (or id) column reading function on the foreign table. The variable definition can specify any (or all) of the following properties, which should be write functions on the primary table:
write_Count
write_Minimum
write_Maximum
write_Range
write_Median
write_StandardDeviation
write_Variance
write_Mean
write_Sum
write_GeometricMean
percentiles
property, which is an array of percentile elements, where each percentile element is an array of the form [percentile value, percentile write function]. For example
[0.75, Primary.write_Percentile75]
.
Parameters: Object
settings