All models with predict(RDD) function implemented should be serializable. 

For one, it makes it easier to save & distribute the model.

But more importantly, the predict function implemented here simply won't work because the map closure is referencing this.weights and this.intercept, which means "this" will be part of the closure. And since "this" is not serializable, the predict function can't even run.