You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question on views: I which to build a Matrix view out of an initial DMatrix M, rather large because it contains datapoints.
This view is actually non-regular and non contiguous: it depends on a vector V :Vec<usize> of indexes that contains the columns to select.
I can use the M.select_columns(V.iter()) to obtain the correct matrix, but if I understood correctly, this actually makes a copy of the selected elements, which in my use-case, could be quite large and quite expensive as well.
Is there a way to obtain a view of the data using V ?
context: This would be to compute the regression coefficients of the regression of one column w.r.t. data[V] :
let selected_data = M.select_columns(V.iter());let qr = selected_data.qr();let(q, r) = (qr.q().transpose(), qr.r());let x = r.try_inverse().unwrap()*&q *&data.column(ref_node.to_owned());
Thank you,
D
The text was updated successfully, but these errors were encountered:
Hello,
First of all, thank you for this awesome crate.
I have a question on views: I which to build a Matrix view out of an initial DMatrix
M
, rather large because it contains datapoints.This view is actually non-regular and non contiguous: it depends on a vector
V :Vec<usize>
of indexes that contains the columns to select.I can use the
M.select_columns(V.iter())
to obtain the correct matrix, but if I understood correctly, this actually makes a copy of the selected elements, which in my use-case, could be quite large and quite expensive as well.Is there a way to obtain a view of the data using
V
?context: This would be to compute the regression coefficients of the regression of one column w.r.t. data[V] :
Thank you,
D
The text was updated successfully, but these errors were encountered: