Open gideonite opened 3 years ago
I should add some unit tests for this as well, but I thought that now might be a good time to get feedback. I can convert this to a github draft if you like.
Note to self: are there places where I could make the code faster? Specifically, but using numba / utils.njit? There aren't any tight loops where I am going over an array. The basic Frank-Wolfe implementation doesn't have numba stuff so maybe we can't either, but I can help thinking that there might be a way to accelerated the main for-loop of the algorithm.
Super, thanks you! I'll do these things and update.
Rather than this clumsy use_eigs
option that was there before, I replaced it with a new lmo, TraceSpectrahedron, which optimizes over the psd matrices with bounded trace norm. This is actually what I originally wanted but I was a bit confused.
Other than that, I added the comments, changed the names, etc. as you requested. @fabianp
Still to do:
_load_dataset
function should be reused. @fabianp No worries about the history, it's fine if there are multiple commits
another option for the dataset is to use something more standard that already includes mnist like tf-datasets, https://www.tensorflow.org/datasets/overview
The only problem with that is that the dataset that we are using are the outputs of a softmax. We could train the simple model dynamically when the dataset is downloaded or download directly what was used in [MVW16]. For now, I decided to download it directly.
Ok, I think it's finally ready for merge! What do you think? @fabianp
[MVW16] D. G. Mixon, S. Villar, and R. Ward, “Clustering subgaussian mixtures by semidefinite programming,” May 2016. http://arxiv.org/abs/1602.06612, GitHub Repo: https://github.com/solevillar/kmeans_sdp
Fixed a small bug and added a unit test to test for it next time. Apparently, this unit test also improves the code coverage above the threshold for coveralls (finally).
thanks @gideonite l it all looks good to me.
@GeoffNN do you mind taking a look a this ? Thanks
I'll look at it ASAP!
Does anyone else have feedback? This has been in purgatory for a while and I'd like to get it merged. @GeoffNN @fabianp
@gideonite quick ping on this, if you want to wrap it up!
Hi @GeoffNN, sorry for the delay. Been caught up with other things and this has fallen by the wayside. I will need some more time to get back to this but if there's still interest in getting this merged, I can probably easily address most of these issues.
The remaining issues should be straightforward / it would also be fine to leave TODO items for a subsequent push :)
This is a first step towards implementing Homotopy CGMs into copt.
Based closely on the existing Frank-Wolfe implementation, this incorporates additional linear constraints into the picture via homotopy smoothing.
In this commit there are element-wise and row-wise constraints.
The next step is to provide randomized versions of this algorithm.