Training an online logistic regression model using Apache Mahout
In this recipe, we will use Apache Mahout to train an online logistic regression model using Apache Mahout Java library.
Getting ready
In Eclipse, create a new Maven project. The author had Eclipse Mars set up. To do so, go to File. Then select New and Other...:
Then, expand Maven from the wizard and select Maven Project. Click on Next until you reach the window where Eclipse prompts you to provide an Artifact Id. Type in
mahout
as Artifact Id, and the grayed out Finish button will become visible. Click on Finish. This will create a Maven project for you named mahout:Double-click on
pom.xml
from your Eclipse Package Explorer to edit:Click on the
pom.xml
tab. You will now see thepom.xml
file on screen. Put the following lines in yourpom.xml
within the<dependencies>...</dependencies>
tags and save it. This will automatically download the dependency JAR files into your project:<dependency> ...