If I have a 1-dimensional array with the following schema
create array features <instance_id:int64, feature 1:double, feature 2:double, … feature 10:double>[i=0:500]
would it be possible to redimension it to a 2-dimensional array where the first dimension would be the instance_id, the second dimension would be the index of the feature, i.e. 1, 2, 3 etc, and the cell value would store the double value of each feature?
I’m trying to do something like the following
store(redimension(features, val:double[instance_id=0:500; feature_id=0:9]), features_2d)
but I do not know how to specify that val takes the value of each of feature1, feature2, etc.
The reason I’d like to do this is that I’d like to filter entire instances based on an attribute in the initial 1-dimensional array and then convert it to a 2-dimensional in order to perform matrix multiplication with another array.
Thank you for your time.