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

RFormulaModel always throws Exception on transforming data with NULL or Unseen labels

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.4.0
    • ML
    • None

    Description

      I have trained ML model and big data table in parquet. I want add new column to this table with predicted values. I can't lose any data, but can having null values in it.

      RFormulaModel.fit() method creates new StringIndexer with default (handleInvalid="error") parameter. Also VectorAssembler on NULL values throwing Exception. So I must call df.na.drop() to transform this DataFrame and I don't want to do this.

      Need add to RFormula new parameter like handleInvalid in StringIndexer.

      Or add transform(Seq<Column>): Vector method which user can use as UDF method in df.withColumn("predicted", functions.callUDF(rFormulaModel::transform, Seq<Column>))

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yatsukav Andrei Iatsuk
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: