shogun-toolbox / shogun

Shōgun
http://shogun-toolbox.org
BSD 3-Clause "New" or "Revised" License
3.03k stars 1.04k forks source link

Add sparse copy #5147

Closed jonpsy closed 3 years ago

jonpsy commented 3 years ago

5058

A free function which has default flags as mentioned in the issue. Pretty much same as make_clone, but it "motivates" sparse copying.

SGMatrix, and Features.h seems to be potential contenders for this sparse_copy OR make_clone(for entire deep copy), we can handle them both in this PR? @gf712

My thought process is to use make_clone for deep copy only and sparse_copy for if we want to copy only certain component(and therefore I've changed it in RelaxedTree).

gf712 commented 3 years ago

What do you mean with "sparse_copy"? Is this meant to be "shallow_copy"? If so you should rename it, as sparse is usually associated in this library with sparse matrices (the opposite of dense matrix)

jonpsy commented 3 years ago

Re-open when devs are back.