Am 30.10.21 um 11:58 schrieb Riccardo (Jack) Lucchetti:
On Sat, 30 Oct 2021, Artur T. wrote:
>> But in fact I think that when argument 3 is non-null, having a matrix
>> as output is preferable aafter all. If we all agree, I can take care
>> of this later today.
>
> I think that's useful.
OK, it's now in git. I also updated the doc file and, while I was at it,
I documented the new features in vech() and unvech().
Hi Jack,
the dimensions are still different to what sklearn returns. See here:
<hansl>
set verbose off
clear
matrix X = {1, 2; 3, 4}
matrix Y = {1, 2; 0, 3}
matrix expected_distances = {0, 2; 4, 4}
print X Y
matrix actual = distance(X, "manhattan", Y)
print actual expected_distances
X (2 x 2)
1 2
3 4
Y (2 x 2)
1 2
0 3
actual (2 x 2)
0 4
2 4
expected_distances (2 x 2)
0 2
4 4
</hansl>
But maybe that's debatable as long as documented.
Artur