Classes
Methods
free()
Returns:
Frees the memory allocated on the Wasm heap for this object. This invalidates this object and all references to it.
numberOfCells() → {number}
Returns:
Number of cells used to compute these results.
- Type
- number
numberOfPCs() → {number}
Returns:
Number of PCs available in these results.
- Type
- number
principalComponents(optionsopt) → (nullable) {Float64Array|Float64Wasmarray}
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
Array containing the principal components for all cells.
This should be treated as a column-major array where the rows are the PCs and columns are the cells.
Alternatively null
, if fillable = false
and the array was not already filled.
- Type
- Float64Array | Float64Wasmarray
setTotalVariance(total)
Parameters:
Name | Type | Description |
---|---|---|
total |
number | Total variance in the dataset, equal to the sum of the variances across all PCs (including those that were not explicitly computed). |
Returns:
Total varaiance in this object is set to total
.
This is primarily intended for use with emptyRunPcaResults
.
totalVariance() → (nullable) {number}
Returns:
The total variance in the dataset,
typically used with varianceExplained
to compute the proportion of variance explained.
Alternatively null
, if this value has not been filled by setTotalVariance
.
- Type
- number
varianceExplained(optionsopt) → (nullable) {Float64Array|Float64WasmArray}
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
Array containing the variance explained for each requested PC.
Alternatively null
, if fillable = false
and the array was not already filled.
- Type
- Float64Array | Float64WasmArray