← Apache Spark learning path
Apache Spark · Module 8 of 10

Machine learning with MLlib

Train scalable ML models on Spark.

📖 Key ideas

  1. MLlib provides algorithms: regression, classification, clustering, recommendation.
  2. Pipelines chain transformers and estimators.
  3. VectorAssembler combines features into a vector.
  4. Evaluate with BinaryClassificationEvaluator etc.
  5. Use when data is too large for single-machine ML.
💡 Real-life example: An MLlib pipeline is an assembly line: clean, convert, assemble, train, in a fixed order.
PipelineSequence of ML stages
TransformerConverts a DataFrame
EstimatorLearns from data to produce a model
VectorAssemblerCombines columns into a feature vector