diff --git a/community/mahout-mr/mr/src/main/java/org/apache/mahout/cf/taste/hadoop/als/ParallelALSFactorizationJob.java b/community/mahout-mr/mr/src/main/java/org/apache/mahout/cf/taste/hadoop/als/ParallelALSFactorizationJob.java index 2ce9b61603..65a672add3 100644 --- a/community/mahout-mr/mr/src/main/java/org/apache/mahout/cf/taste/hadoop/als/ParallelALSFactorizationJob.java +++ b/community/mahout-mr/mr/src/main/java/org/apache/mahout/cf/taste/hadoop/als/ParallelALSFactorizationJob.java @@ -392,7 +392,11 @@ static class IDMapReducer extends Reducer ids, Context ctx) throws IOException, InterruptedException { - ctx.write(index, ids.iterator().next()); + if (ids.iterator().hasNext()) { + ctx.write(index, ids.iterator().next()); + } else { + log.debug("Iterator is empty"); + } } } diff --git a/website/documentation/users/classification/bankmarketing-example.md b/website/documentation/users/classification/bankmarketing-example.md index fa55673004..2037a7a420 100644 --- a/website/documentation/users/classification/bankmarketing-example.md +++ b/website/documentation/users/classification/bankmarketing-example.md @@ -1,24 +1,6 @@ - --- layout: default -title: - - +title: Bank Marketing Example --- Notice: Licensed to the Apache Software Foundation (ASF) under one @@ -66,4 +48,4 @@ This example consists of 3 classes: When you run the main method of BankMarketingClassificationMain it parses the dataset using the TelephoneCallParser and trains a logistic regression model with 20 runs and 20 passes. The TelephoneCallParser uses Mahout's feature vector encoder -to encode the features in the dataset into a vector. Afterwards the model is tested and the learning rate and AUC is printed accuracy is printed to standard output. \ No newline at end of file +to encode the features in the dataset into a vector. Afterwards the model is tested and the learning rate and AUC is printed accuracy is printed to standard output.