title: empty featureImportances vector for decision tree
body: <p>I have a DecisionTreeClassifier built using pyspark.ml.classification (since i have a pyspark df). When i compute the featureImportances vector i obtain an empty vector. I don't understand why since the model is working and it is making prediciton without any problem. Here the intrested code:</p>
  <pre><code>assembler = VectorAssembler(inputCols = [&quot;BoardPosition&quot;, &quot;AssemblyFormID&quot;, &quot;intBatch&quot;, &quot;intSupplier&quot;],
                              outputCol = &quot;features&quot;)
  modelDF = assembler.transform(Dmatrix).withColumn(&quot;label&quot;, F.col(&quot;ResultFirstPH45&quot;))\
                    .select(&quot;features&quot;, &quot;label&quot;)
  training_df, test_df = modelDF.randomSplit([0.7,0.3])
  classifier = DecisionTreeClassifier(labelCol=&quot;label&quot;, impurity= 'gini').fit(training_df)
  classifier.featureImportances
  </code></pre>
  <p>and the result is:</p>
  <pre><code>SparseVector(4, {})
  </code></pre>
  <p>Have i made any error? or it is correct to obtain an empty vector in some situations.</p>