public final class LastfmDataConverter extends Object
| Modifier and Type | Method and Description |
|---|---|
static Map<String,List<Integer>> |
convertToItemFeatures(String inputFile,
org.apache.mahout.clustering.minhash.LastfmDataConverter.Lastfm dataSet)
Reads the LastFm dataset and constructs a Map of (item, features).
|
static void |
main(String[] args) |
static boolean |
writeToSequenceFile(Map<String,List<Integer>> itemFeaturesMap,
org.apache.hadoop.fs.Path outputPath)
Converts each record in (item,features) map into Mahout vector format and
writes it into sequencefile for minhash clustering
|
public static Map<String,List<Integer>> convertToItemFeatures(String inputFile, org.apache.mahout.clustering.minhash.LastfmDataConverter.Lastfm dataSet) throws IOException
inputFile - Lastfm dataset file on the local file system.dataSet - Type of dataset - 360K Users or 1K UsersIOExceptionpublic static boolean writeToSequenceFile(Map<String,List<Integer>> itemFeaturesMap, org.apache.hadoop.fs.Path outputPath) throws IOException
IOExceptionCopyright © 2008–2013 The Apache Software Foundation. All rights reserved.