Package org.apache.spark.ml.param
Interface Params
- All Superinterfaces:
- Identifiable,- Serializable
- All Known Subinterfaces:
- AFTSurvivalRegressionParams,- ALSModelParams,- ALSParams,- BisectingKMeansParams,- BucketedRandomProjectionLSHParams,- ClassifierParams,- CountVectorizerParams,- CrossValidatorParams,- DecisionTreeClassifierParams,- DecisionTreeParams,- DecisionTreeRegressorParams,- FactorizationMachines,- FactorizationMachinesParams,- FMClassifierParams,- FMRegressorParams,- FPGrowthParams,- GaussianMixtureParams,- GBTClassifierParams,- GBTParams,- GBTRegressorParams,- GeneralizedLinearRegressionBase,- HasAggregationDepth,- HasBlockSize,- HasCheckpointInterval,- HasCollectSubModels,- HasDistanceMeasure,- HasElasticNetParam,- HasFeaturesCol,- HasFitIntercept,- HasHandleInvalid,- HasInputCol,- HasInputCols,- HasLabelCol,- HasLoss,- HasMaxBlockSizeInMB,- HasMaxIter,- HasNumFeatures,- HasOutputCol,- HasOutputCols,- HasParallelism,- HasPredictionCol,- HasProbabilityCol,- HasRawPredictionCol,- HasRegParam,- HasRelativeError,- HasSeed,- HasSolver,- HasStandardization,- HasStepSize,- HasThreshold,- HasThresholds,- HasTol,- HasValidationIndicatorCol,- HasVarianceCol,- HasVarianceImpurity,- HasWeightCol,- IDFBase,- ImputerParams,- IsotonicRegressionBase,- KMeansParams,- LDAParams,- LinearRegressionParams,- LinearSVCParams,- LogisticRegressionParams,- LSHParams,- MaxAbsScalerParams,- MinMaxScalerParams,- MultilayerPerceptronParams,- NaiveBayesParams,- OneHotEncoderBase,- OneVsRestParams,- PCAParams,- PowerIterationClusteringParams,- PredictorParams,- PrefixSpanParams,- ProbabilisticClassifierParams,- QuantileDiscretizerBase,- RandomForestClassifierParams,- RandomForestParams,- RandomForestRegressorParams,- RFormulaBase,- RobustScalerParams,- SelectorParams,- StandardScalerParams,- StringIndexerBase,- TargetEncoderBase,- TrainValidationSplitParams,- TreeClassifierParams,- TreeEnsembleClassifierParams,- TreeEnsembleParams,- TreeEnsembleRegressorParams,- TreeRegressorParams,- UnivariateFeatureSelectorParams,- ValidatorParams,- VarianceThresholdSelectorParams,- VectorIndexerParams,- Word2VecBase
- All Known Implementing Classes:
- AFTSurvivalRegression,- AFTSurvivalRegressionModel,- ALS,- ALSModel,- Binarizer,- BinaryClassificationEvaluator,- BisectingKMeans,- BisectingKMeansModel,- BucketedRandomProjectionLSH,- BucketedRandomProjectionLSHModel,- Bucketizer,- ChiSqSelector,- ChiSqSelectorModel,- ClassificationModel,- Classifier,- ClusteringEvaluator,- ColumnPruner,- CountVectorizer,- CountVectorizerModel,- CrossValidator,- CrossValidatorModel,- DCT,- DecisionTreeClassificationModel,- DecisionTreeClassifier,- DecisionTreeRegressionModel,- DecisionTreeRegressor,- DistributedLDAModel,- ElementwiseProduct,- Estimator,- Evaluator,- FeatureHasher,- FMClassificationModel,- FMClassifier,- FMRegressionModel,- FMRegressor,- FPGrowth,- FPGrowthModel,- GaussianMixture,- GaussianMixtureModel,- GBTClassificationModel,- GBTClassifier,- GBTRegressionModel,- GBTRegressor,- GeneralizedLinearRegression,- GeneralizedLinearRegressionModel,- HashingTF,- IDF,- IDFModel,- Imputer,- ImputerModel,- IndexToString,- Interaction,- IsotonicRegression,- IsotonicRegressionModel,- JavaParams,- KMeans,- KMeansModel,- LDA,- LDAModel,- LinearRegression,- LinearRegressionModel,- LinearSVC,- LinearSVCModel,- LocalLDAModel,- LogisticRegression,- LogisticRegressionModel,- MaxAbsScaler,- MaxAbsScalerModel,- MinHashLSH,- MinHashLSHModel,- MinMaxScaler,- MinMaxScalerModel,- Model,- MulticlassClassificationEvaluator,- MultilabelClassificationEvaluator,- MultilayerPerceptronClassificationModel,- MultilayerPerceptronClassifier,- NaiveBayes,- NaiveBayesModel,- NGram,- Normalizer,- OneHotEncoder,- OneHotEncoderModel,- OneVsRest,- OneVsRestModel,- PCA,- PCAModel,- Pipeline,- PipelineModel,- PipelineStage,- PolynomialExpansion,- PowerIterationClustering,- PredictionModel,- Predictor,- PrefixSpan,- ProbabilisticClassificationModel,- ProbabilisticClassifier,- QuantileDiscretizer,- RandomForestClassificationModel,- RandomForestClassifier,- RandomForestRegressionModel,- RandomForestRegressor,- RankingEvaluator,- RegexTokenizer,- RegressionEvaluator,- RegressionModel,- Regressor,- RFormula,- RFormulaModel,- RobustScaler,- RobustScalerModel,- SQLTransformer,- StandardScaler,- StandardScalerModel,- StopWordsRemover,- StringIndexer,- StringIndexerModel,- TargetEncoder,- TargetEncoderModel,- Tokenizer,- TrainValidationSplit,- TrainValidationSplitModel,- Transformer,- UnaryTransformer,- UnivariateFeatureSelector,- UnivariateFeatureSelectorModel,- VarianceThresholdSelector,- VarianceThresholdSelectorModel,- VectorAssembler,- VectorAttributeRewriter,- VectorIndexer,- VectorIndexerModel,- VectorSizeHint,- VectorSlicer,- Word2Vec,- Word2VecModel
Trait for components that take parameters. This also provides an internal param map to store
 parameter values attached to the instance.
- 
Method SummaryModifier and TypeMethodDescriptionClears the user-supplied value for the input param.Creates a copy of this instance with the same UID and some extra params.<T extends Params>
 TcopyValues(T to, ParamMap extra) Copies param values from this instance to another instance for params shared by them.<T extends Params>
 TdefaultCopy(ParamMap extra) Default implementation of copy with extra params.Internal param map for default values.explainParam(Param<?> param) Explains a param.Explains all params of this instance.extractParamMapwith no extra values.extractParamMap(ParamMap extra) Extracts the embedded default param values and user-supplied values, and then merges them with extra values from input into a flat param map, where the latter value is used if there exist conflicts, i.e., with ordering: default param values less than user-supplied values less than extra.<T> scala.Option<T>Optionally returns the user-supplied value of a param.<T> scala.Option<T>getDefault(Param<T> param) Gets the default value of a parameter.<T> TgetOrDefault(Param<T> param) Gets the value of a param in the embedded param map or its default value.Gets a param by its name.<T> booleanhasDefault(Param<T> param) Tests whether the input param has a default value set.booleanTests whether this instance contains a param with a given name.booleanChecks whether a param is explicitly set or has a default value.booleanChecks whether a param is explicitly set.voidonParamChange(Param<?> param) paramMap()Internal param map for user-supplied values.Param<?>[]params()Returns all params sorted by their names.Sets a parameter (by name) in the embedded param map.<T> ParamsSets a parameter in the embedded param map.Sets a parameter in the embedded param map.<T> ParamssetDefault(Param<T> param, T value) Sets a default value for a param.setDefault(scala.collection.immutable.Seq<ParamPair<?>> paramPairs) Sets default values for a list of params.voidValidates that the input param belongs to this instance.Methods inherited from interface org.apache.spark.ml.util.IdentifiabletoString, uid
- 
Method Details- 
clearClears the user-supplied value for the input param.- Parameters:
- param- (undocumented)
- Returns:
- (undocumented)
 
- 
copyCreates a copy of this instance with the same UID and some extra params. Subclasses should implement this method and set the return type properly. SeedefaultCopy().- Parameters:
- extra- (undocumented)
- Returns:
- (undocumented)
 
- 
copyValuesCopies param values from this instance to another instance for params shared by them.This handles default Params and explicitly set Params separately. Default Params are copied from and to defaultParamMap, and explicitly set Params are copied from and toparamMap. Warning: This implicitly assumes that thisParamsinstance and the target instance share the same set of default Params.- Parameters:
- to- the target instance, which should work with the same set of default Params as this source instance
- extra- extra params to be copied to the target's- paramMap
- Returns:
- the target instance with param values copied
 
- 
defaultCopyDefault implementation of copy with extra params. It tries to create a new instance with the same UID. Then it copies the embedded and extra parameters over and returns the new instance.- Parameters:
- extra- (undocumented)
- Returns:
- (undocumented)
 
- 
defaultParamMapParamMap defaultParamMap()Internal param map for default values.
- 
explainParamExplains a param.- Parameters:
- param- input param, must belong to this instance.
- Returns:
- a string that contains the input param name, doc, and optionally its default value and the user-supplied value
 
- 
explainParamsString explainParams()Explains all params of this instance. SeeexplainParam().- Returns:
- (undocumented)
 
- 
extractParamMapExtracts the embedded default param values and user-supplied values, and then merges them with extra values from input into a flat param map, where the latter value is used if there exist conflicts, i.e., with ordering: default param values less than user-supplied values less than extra.- Parameters:
- extra- (undocumented)
- Returns:
- (undocumented)
 
- 
extractParamMapParamMap extractParamMap()extractParamMapwith no extra values.- Returns:
- (undocumented)
 
- 
getOptionally returns the user-supplied value of a param.- Parameters:
- param- (undocumented)
- Returns:
- (undocumented)
 
- 
getDefaultGets the default value of a parameter.- Parameters:
- param- (undocumented)
- Returns:
- (undocumented)
 
- 
getOrDefaultGets the value of a param in the embedded param map or its default value. Throws an exception if neither is set.- Parameters:
- param- (undocumented)
- Returns:
- (undocumented)
 
- 
getParamGets a param by its name.
- 
hasDefaultTests whether the input param has a default value set.- Parameters:
- param- (undocumented)
- Returns:
- (undocumented)
 
- 
hasParamTests whether this instance contains a param with a given name.
- 
isDefinedChecks whether a param is explicitly set or has a default value.
- 
isSetChecks whether a param is explicitly set.
- 
onParamChange
- 
paramMapParamMap paramMap()Internal param map for user-supplied values.
- 
paramsParam<?>[] params()Returns all params sorted by their names. The default implementation uses Java reflection to list all public methods that have no arguments and returnParam.- Returns:
- (undocumented)
- Note:
- Developer should not use this method in constructor because we cannot guarantee that this variable gets initialized before other params.
 
- 
setSets a parameter in the embedded param map.- Parameters:
- param- (undocumented)
- value- (undocumented)
- Returns:
- (undocumented)
 
- 
setSets a parameter (by name) in the embedded param map.- Parameters:
- param- (undocumented)
- value- (undocumented)
- Returns:
- (undocumented)
 
- 
setSets a parameter in the embedded param map.- Parameters:
- paramPair- (undocumented)
- Returns:
- (undocumented)
 
- 
setDefaultSets a default value for a param.- Parameters:
- param- param to set the default value. Make sure that this param is initialized before this method gets called.
- value- the default value
- Returns:
- (undocumented)
 
- 
setDefaultSets default values for a list of params.Note: Java developers should use the single-parameter setDefault. Annotating this with varargs can cause compilation failures due to a Scala compiler bug. See SPARK-9268.- Parameters:
- paramPairs- a list of param pairs that specify params and their default values to set respectively. Make sure that the params are initialized before this method gets called.
- Returns:
- (undocumented)
 
- 
shouldOwnValidates that the input param belongs to this instance.
 
-