setWeights will return memorized regularization penality and clear memory