At the end, it returns the final weight W .
the k-best-list is obtained using H as a feature vector with its weight vector W derived from grouped weights W G through unpacking: if h j ∈ g k , then W j =W G k .