get_features_3d: Computes event-features

View source: R/event_functions_3d.R

get_features_3dR Documentation

Computes event-features

Description

This function computes event features of 3D events.

Usage

get_features_3d(dat.xyz, res.cluster, normal.stats, win_size, tt)

Arguments

dat.xyz

The data in a cluster friendly format. The first three columns have t,x and y positions with the fourth column having the pixel value of that position.

res.cluster

Cluster details from dbscan.

normal.stats

The background statistics, output from stats_3d.

win_size

The window length of the moving window model.

tt

Related to event ages. For example if tt=10 then the event ages are 10, 20, 30 and 40.

Value

An Nx22x4 array is returned. Here N is the total number of events extracted in all windows. The second dimension has 30 features and the class label for the supervised setting. The third dimension has 4 different event ages : tt, 2tt, 3tt, 4tt. For example, the element at [10,6,3] has the 6th feature, of the 10th extracted event when the age of the event is 3tt. The features are listed below:

cluster_id

An identification number for each event.

pixels

The number of pixels of each event.

length

The length of the event.

width

The width of the event.

total_value

The total value of the pixels.

l2w_ratio

Length to width ratio of event.

centroid_x

x coordinate of event centroid.

centroid_y

y coordinate of event centroid.

centroid_z

z coordinate of event centroid.

mean

Mean value of event pixels.

std_dev

Standard deviation of event pixels.

slope

Slope of a linear model fitted to the event.

quad1

First coefficient of a quadratic model fitted to the event.

quad2

Second coefficient of a quadratic model fitted to the event.

sd_from_mean

Let us denote the 80th percentile of the event pixels value by x. How many standard deviations is x is away from the mean?

Examples

set.seed(1)
arr <- array(rnorm(12000),dim=c(40,25,30))
arr[25:33,12:20, 20:23] <- 10
# getting events
out <- get_clusters_3d(arr, thres=0.985)
mean_sd <- stats_3d(arr[1:20,1:6,1:8])
ftrs <- get_features_3d(out$data, out$cluster$cluster, mean_sd, win_size=40, tt=2 )

sevvandi/eventstream documentation built on May 16, 2022, 11:23 a.m.