Currently, the unit of the predicted property is "inferred" by taking the unit of the 0'th element of the target vector. This panics if the vector is empty. See here.
In predict, instead of allocating an array and iterating over the index, we can use iter().map().collect().
Currently, the unit of the predicted property is "inferred" by taking the unit of the 0'th element of the
target
vector. This panics if the vector is empty. See here.In
predict
, instead of allocating an array and iterating over the index, we can useiter().map().collect()
.