Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Thanks for your answer! Is there a way to cache the the list of model inputs by school(bySchoolArray) and the list of models that stored in bySchoplArrayModels? Commented Aug 30, 2015 at 23:25
  • bySchoolArray in your code if cached in the right way. Think about that caching as effect only after an action, it's a lazy caching. Commented Aug 31, 2015 at 14:56
  • in order to cache models, you can do something like this: val bySchoolArrayModels = bySchoolArray.map(df => trainModel(df).cache()) Commented Aug 31, 2015 at 14:57
  • rdd.cache doesn't return a new rdd but an RDD.this.type Commented Oct 17, 2015 at 18:11