Accuracy—
Precision—
Recall—
F1 score—
ROC AUC—
Customers flagged—
Confusion matrix
live thresholdRisk score distribution
stayedchurned
Learned feature influence
model coefficientsDecision landscape
usage drop vs probabilityHighest-risk customers
batch predictions| Customer | Risk | Action | Observed | Strongest signal |
|---|
Equivalent PySpark pipeline
copy-ready# The browser calls the same spark-ml estimator compiled to WASM from pyspark.ml import Pipeline from pyspark.ml.feature import VectorAssembler, StandardScaler from pyspark.ml.classification import LogisticRegression assembler = VectorAssembler(inputCols=["tenure", "monthly_spend", "support_calls", "usage_drop", "late_payments"], outputCol="features") scaler = StandardScaler(inputCol="features", outputCol="scaled", withMean=True, withStd=True) lr = LogisticRegression(featuresCol="scaled", labelCol="churned", maxIter=800, threshold=0.50) model = Pipeline(stages=[assembler, scaler, lr]).fit(train_df) predictions = model.transform(customer_batch) predictions.select("customer_id", "probability", "prediction").show()