Skip to content

Function: splitScale()

ts
function splitScale(
   x, 
   fac, 
   center?, 
   scale?): NeuroVec;

Defined in: src/stats/stats.ts:494

Scale a NeuroVec within factor levels.

Centers and/or scales the data within each level of a factor, returning a new NeuroVec with the transformed data.

Parameters

x

NeuroVec

The 4D data to scale

fac

| Int32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike>

Factor array with length equal to number of volumes

center?

boolean = true

Whether to center (subtract mean) within each level

scale?

boolean = true

Whether to scale (divide by SD) within each level

Returns

NeuroVec

Scaled NeuroVec

Released under the MIT License.