Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-23824

Make inpurityStats publicly accessible in ml.tree.Node

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 2.1.1
    • None
    • ML
    • None

    Description

      This is minor, but it is also a very easy fix.

      I would like to visualize the structure of a decision tree model, but currently the only means of obtaining the label distribution data at each node of the tree is hidden within each ml.tree.Node inside the impurityStats.

      I'm pretty sure that the fix for this is as easy as removing the private[ml] qualifier from occurrences of

      private[ml] def impurityStats: ImpurityCalculator
      and
      override private[ml] val impurityStats: ImpurityCalculator

       

      As a workaround, I've put my class that needs access into a  org.apache.spark.ml.tree package in my own repository, but I would really like to not have to do that.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              barrybecker4 Barry Becker
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: