Note: changes were only made on the pipca.py script
[ ] Initiated new pipca object attributes batch_indices, batch_number, V, U_prev, and S_prev in order to facilitated the updating algorithm for V
[ ] Added the distribute_images_over_batches() function to properly format the batch indices based on the given batch sizes of a run
[ ] Added the update_V() function to properly update V based on the previous model and the updated U and S
[ ] Added V to the return list of the get_model() function
[ ] Incorporated V into the prime_model() function
Algorithm used to update V
Let Ui, Si, and Vii be the matrices obtained from iPCA to model batch Xi.
Also, let Ui+1 and Si+1 be the matrices obtained from the parallel QR algorithm for the next batch Xi+1.
We can find the next Vi+1i+1 with the standard SVD assumption that Xi+1 = Ui+1 Si+1 Vi+1i+1.
And $\forall j \in [0, i]$ we can update the previous Vji+1 batch by defining it to be the matrix that satisfies Xj = Ui+1 Si+1 Vji+1.
Once we have all Vji+1 and Vi+1i+1, we can obtain the overall Vi+1 by simply concatenating the Vji+1 and Vi+1i+1.
So, Vi+1 = [V0i+1 V1i+1 ... Vii+1 Vi+1i+1].
I could make a more formal write-up and attach it here before merging, if you would like.
Future Actions
[ ] Using the newly available V from the pipca model, reconstructed images can finally be displayed on the dashboard
Changes
Note: changes were only made on the pipca.py script
Algorithm used to update V
Let Ui, Si, and Vii be the matrices obtained from iPCA to model batch Xi. Also, let Ui+1 and Si+1 be the matrices obtained from the parallel QR algorithm for the next batch Xi+1. We can find the next Vi+1i+1 with the standard SVD assumption that Xi+1 = Ui+1 Si+1 Vi+1i+1. And $\forall j \in [0, i]$ we can update the previous Vji+1 batch by defining it to be the matrix that satisfies Xj = Ui+1 Si+1 Vji+1. Once we have all Vji+1 and Vi+1i+1, we can obtain the overall Vi+1 by simply concatenating the Vji+1 and Vi+1i+1. So, Vi+1 = [V0i+1 V1i+1 ... Vii+1 Vi+1i+1].
I could make a more formal write-up and attach it here before merging, if you would like.
Future Actions