tech.v3.dataset.tensor
Conversion mechanisms from dataset to tensor and back.
dataset->tensor
(dataset->tensor dataset datatype)
(dataset->tensor dataset)
Convert a dataset to a tensor. Columns of the dataset will be converted to columns of the tensor. Default datatype is :float64.
mean-center-columns!
(mean-center-columns! tens {:keys [nan-strategy means], :or {nan-strategy :remove}})
(mean-center-columns! tens)
in-place nan-aware mean-center the rows of the tensor. If tensor is writeable then this
writes the result directly to the tensor else it clones the tensor.
Return value is {:means :tensor}
.
Pre-calculated per-column means may be provided.
tensor->dataset
(tensor->dataset dtt & [table-name])
Convert a tensor to a dataset. Columns of the tensor will be converted to columns of the dataset.