This data container stores a vector as it is in the RAM and makes it accessible for Compboost.
Format
S4 object.
Arguments
- data_mat
(
matrix()
)
The data matrix.- data_identifier
(
character(1)
)
Data id, e.g. a feature name.
Usage
InMemoryData$new()
InMemoryData$new(data_mat, data_identifier)
InMemoryData$new(data_mat, data_identifier, use_sparse)
Examples
# Sample data:
data_mat = cbind(rnorm(10))
# Create new data object:
data_obj = InMemoryData$new(data_mat, "my_data_name")
# Get data and identifier:
data_obj$getData()
#> [,1]
#> [1,] -2.28004414
#> [2,] -0.45540465
#> [3,] 0.18887164
#> [4,] 1.99359733
#> [5,] 0.32309057
#> [6,] -0.25120375
#> [7,] -3.02965071
#> [8,] -1.18984232
#> [9,] -0.06132516
#> [10,] -0.02320217
data_obj$getIdentifier()
#> [1] "my_data_name"