public class ImplicitDataToRating extends Object implements org.apache.spark.api.java.function.Function<String[],String[]>
Constructor and Description |
---|
ImplicitDataToRating(int userIndex,
int productIndex,
List<Integer> observations,
List<Double> weights)
Constructs the ImplicitDataToRating transformation object.
|
public ImplicitDataToRating(int userIndex, int productIndex, List<Integer> observations, List<Double> weights)
userIndex
- column index containing user_idproductIndex
- column index containing product_idobservations
- list of observation columnsweights
- list of weights to calculate rating scorepublic String[] call(String[] tokens) throws DatasetPreProcessingException
call
in interface org.apache.spark.api.java.function.Function<String[],String[]>
DatasetPreProcessingException
Copyright © 2015 WSO2, Inc.. All Rights Reserved.