title: How to load trained RandomForestClassificationModel model?
body: <p>I have trained &amp; tested a ML model (GBTClassificationModel or RandomForestClassificationModel). Then I would like to save the trained model for future use. so I did the following:</p>
  
  <pre><code> model.save("...");
  </code></pre>
  
  <p>Take the GBTClassificationModel for example, after it is saved. the saved file is a directory which contains "data, metadata and treesMetadata". My question is how to use this saved model for future use? for example, I would like to do something like the following:</p>
  
  <pre><code> model = spark.load("...");
   Dataset&lt;Row&gt; predict_data= model_model.transform(dataset_test1)
  </code></pre>
  
  <p>Any suggestion? Thank you.</p>
  
  <p>UPDATE:</p>
  
  <p>it turns out to be very straightforward:</p>
  
  <pre><code> GBTClassificationModel model1 = GBTClassificationModel.load("...");
   Dataset&lt;Row&gt; predict_data= model1.transform(dataset_test)
  </code></pre>