ciir.umass.edu.features.Normalizer Maven / Gradle / Ivy
/*===============================================================================
* Copyright (c) 2010-2012 University of Massachusetts. All Rights Reserved.
*
* Use of the RankLib package is subject to the terms of the software license set
* forth in the LICENSE file included with this software, and also available at
* http://people.cs.umass.edu/~vdang/ranklib_license.html
*===============================================================================
*/
package ciir.umass.edu.features;
import java.util.HashSet;
import java.util.List;
import ciir.umass.edu.learning.RankList;
/**
* @author vdang
*
* Abstract class for feature normalization
*/
public class Normalizer {
public void normalize(RankList rl)
{
//need overriding in subclass
}
public void normalize(List samples)
{
for(int i=0;i samples, int[] fids)
{
for(int i=0;i uniqueSet = new HashSet();
for(int i=0;i