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

Add RandomizedSearch to the CrossValidator API

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Incomplete
    • None
    • None
    • None

    Description

      Hi, I would like to add randomized search support for the Cross-Validator API. It should be quite straightforward to add with the present abstractions.

      Here is the proposed API:
      (Names are up for debate)

      Proposed Classes:
      "ParamSamplerBuilder" or a "ParamRandomizedBuilder" that returns an
      Array of ParamMaps

      Proposed Methods:
      "addBounds"
      "addSampler"
      "setNumIter"

      Code example:

      def sampler(): Double = {
          Math.pow(10.0, -5 + Random.nextFloat * (5 - (-5))
      }
      val paramGrid = new ParamRandomizedBuilder()
        .addSampler(lr.regParam, sampler)
        .addBounds(lr.elasticNetParam, 0.0, 1.0)
        .setNumIter(10)
        .build()
      

      Let me know your thoughts!

      Attachments

        Activity

          People

            Unassigned Unassigned
            MechCoder Manoj Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: