The Algorithm class consists of two main methods: Train() and Predict().
The pio train command runs the Train method that is responsible for training a predictive model and the Predict method is responsible for predicting a model. Consider the following diagram:
The sample Java code for the pio train method would look as follows:
@Override public Model train(SparkContext sc, PreparedData preparedData) { TrainingData data = preparedData.getTrainingData(); // user stuff JavaPairRDD<String, Integer> userIndexRDD = data.getUsers().map(new Function<Tuple2<String, User>, String>() { @Override public String call(Tuple2<String, User> idUser) ...