Reconstruct data from its PCA coordinates: map the k retained coordinates back to the original feature space and add the mean back, X^=ZV[:,:k]⊤+μ.
Implement solve(Z, components, k, mean).
Returns. Return an n×d NumPy array.
Example 1
Input:
solve([[1.0], [3.0]], [[1.0, 0.0], [0.0, 1.0]], 1, [10.0, 20.0])
Output:
[[11.0, 20.0], [13.0, 20.0]]
Example 2
Input:
solve([[2.0, -1.0]], [[0.0, 1.0], [1.0, 0.0]], 2, [0.0, 0.0])
Output:
[[-1.0, 2.0]]
No results yet
Run your code to check it against the examples, or submit to run every test.