Recommendation engine in Java. Based on an ALS algorithm (Apache Spark). Including an automatisation of training a new model after N seconds. And an easier interface.
Prerelease stage, you have to get your own build to use the dependency.
- maven
Check out the project with your IDE. Most ide will automatically download your maven dependencies. After this, the project will be ready to be released/modified.
The following example shows, how to init the ch.javarank.service. After training the model will give prediction, which rating the user will likely give for the product.
RecommendationService recommendationService = new RecommendationService(() -> dataProvider(), timeBetweenNewModels, initialDelay);
dataProvider() is a Methode, which returns a Collection. timeBetweenNewModels is the time in seconds between the renewal of the model initialDelay is the time in seconds for the first delay
As soon as the model is ready (see recommendationService.isModelReady()) you can get the prediction like this
Optional<Double> prediction = recommendationService.getPrediction(2, 3);
- Prerelease
- Working prototype
SebastianMue
Distributed under the MIT license. See LICENSE
for more information.
[https://github.com/SebastianMue]
- Fork it (https://github.com/yourname/yourproject/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request