This week we looked into how the algorithms do not update their state properly in each iteration. Due to this we cannot really expect meaningful information during pause since it will just return the initialized values. This will need to be fixed for each algorithm.

That is in each iteration the algorithm needs to update its state so that whenever we pause we get the current values. We have implemented this for perceptron.

Along the way we also wrote a test for hyperparameter initialization of the model as a jump start to it. But this will need to be addressed for all iterative algorithms.

I also refactored the trained model serialization test to include a StoppableObject test that implements a basic test to see algorithms iterative nature. This lead to interesting results. First we cannot use this approach for algorithms that do not need to use the second iteration to converge, we will need to skip there algorithms from testing currently. Second we need to use break instead of continue in the COMPUTATION_CONTROLLERS macro. The second part led to problems with training loops turning into infinite loops as the loop condition is never updated and the while statement never terminates.

This was an easy fix but troublesome to find.

Another task this week was a nice refactor to the progress bar code that changes how its used all over shogun. We now have a prefix like class_name::method_name as default.

This was done by instantiating the progress bar from a macro instead and the using the FUNCTION macro to obtain function name.

We now have a lot broader questions to ask like what will constitute as “state” of the model and how do we plan to update it each iteration.

This week we found a new issue in garbage collection with factory API… or rather the absence of it. I tried adding %newobject to have swig take ownership of the newly created factory object but it is not working. We will need to investigate it further.

Contributions:

Progress bar in iterative algorithms.

Pausing Unit Test.

Garbage collection in swig.

State Update in Perceptron and unit test.