NCA存储一对距离矩阵,占用了(n_samples ** 2)的内存。时间复杂度取决于优化算法的迭代次数。但是,可以使用参数`max_iter`设置迭代的最大次数。对于每个迭代,时间复杂度为O(n_components x n_samples x min(n_samples, n_features))。
NCA存储一对距离矩阵,占用了(n_samples ** 2)的内存。时间复杂度取决于优化算法的迭代次数。但是,可以使用参数`max_iter`设置迭代的最大次数。对于每个迭代,时间复杂度为`O(n_components x n_samples x min(n_samples, n_features))`。
##### 1.6.6.5.2 变形
这里变形操作返回值为LX<sup>T</sup>,因此它的时间复杂度等于n_components x n_features x n_samples_test。操作中没有增加空间复杂度。
这里变形操作返回值为LX<sup>T</sup>,因此它的时间复杂度等于`n_components x n_features x n_samples_test`。操作中没有增加空间复杂度。
> **参考资料**:
>* [1] [“Neighbourhood Components Analysis”. Advances in Neural Information”](http://www.cs.nyu.edu/~roweis/papers/ncanips.pdf), J. Goldberger, G. Hinton, S. Roweis, R. Salakhutdinov, Advances in Neural Information Processing Systems, Vol. 17, May 2005, pp. 513-520.