All Implemented Interfaces:
Serializable, org.apache.spark.internal.Logging, Params, HasInputCol, HasOutputCol, DefaultParamsWritable, Identifiable, MLWritable

Normalize a vector to have unit norm using the given p-norm.

See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.spark.internal.Logging

    org.apache.spark.internal.Logging.LogStringContext, org.apache.spark.internal.Logging.SparkShellLoggingFilter

  • Constructor Summary

    Constructors

  • Method Summary

    double

    getP()

    p()

    Normalization in L^p^ space.

    read()

    setP(double value)

    toString()

    Check transform validity and derive the output schema from the input schema.

    uid()

    An immutable unique ID for the object and its derivatives.

    Methods inherited from interface org.apache.spark.internal.Logging

    initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, isTraceEnabled, log, logBasedOnLevel, logDebug, logDebug, logDebug, logDebug, logError, logError, logError, logError, logInfo, logInfo, logInfo, logInfo, logName, LogStringContext, logTrace, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, logWarning, MDC, org$apache$spark$internal$Logging$$log_, org$apache$spark$internal$Logging$$log__$eq, withLogContext

    Methods inherited from interface org.apache.spark.ml.util.MLWritable

    save

  • Constructor Details

    • Normalizer

      public Normalizer(String uid)

    • Normalizer

      public Normalizer()

  • Method Details

    • load

    • read

    • uid

      An immutable unique ID for the object and its derivatives.

      Specified by:
      uid in interface Identifiable
      Returns:
      (undocumented)
    • p

      Normalization in L^p^ space. Must be greater than equal to 1. (default: p = 2)

      Returns:
      (undocumented)
    • getP

      public double getP()

    • setP

    • transformSchema

      Check transform validity and derive the output schema from the input schema.

      We check validity for interactions between parameters during transformSchema and raise an exception if any parameter value is invalid. Parameter value checks which do not depend on other parameters are handled by Param.validate().

      Typical implementation should first conduct verification on schema change and parameter validity, including complex parameter interaction checks.

      Overrides:
      transformSchema in class UnaryTransformer<Vector,Vector,Normalizer>
      Parameters:
      schema - (undocumented)
      Returns:
      (undocumented)
    • toString

      Specified by:
      toString in interface Identifiable
      Overrides:
      toString in class Object