Vectorize weighting loop
Reduce default number of iterations
Rename k to n_features