Core functionality for Spark-based Mining & Prediction