algorithmsbooks / optimization

Errata for Algorithms for Optimization book
67 stars 16 forks source link

Algorithm 13.8 and Algorithm 13.9 #89

Closed minhnhathcmus closed 2 years ago

minhnhathcmus commented 2 years ago

In algorithm 13.8 (page 245), I think it should be rand(1:len(X)) instead of rand(1:m). And in algorithm 13.9 (page 246), I think it should be StatsBase.sample! or something like the "choices" function in Python that returns a list with a random selection from the 1:len(X) sequence instead of only 1:m sequence. image image

tawheeler commented 2 years ago

Thank you! I am changing them to S = [sample(X)] and S = sample(X, m, replace=false) respectively.