public class PolynomialExpansion extends UnaryTransformer<Vector,Vector,PolynomialExpansion> implements DefaultParamsWritable
(x, y)
, if we want to expand it with degree 2, then we get
(x, x * x, y, x * y, y * y)
.Constructor and Description |
---|
PolynomialExpansion() |
PolynomialExpansion(String uid) |
Modifier and Type | Method and Description |
---|---|
PolynomialExpansion |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
IntParam |
degree()
The polynomial degree to expand, which should be greater than equal to 1.
|
int |
getDegree() |
static PolynomialExpansion |
load(String path) |
static MLReader<T> |
read() |
PolynomialExpansion |
setDegree(int value) |
String |
toString() |
String |
uid()
An immutable unique ID for the object and its derivatives.
|
inputCol, outputCol, setInputCol, setOutputCol, transform, transformSchema
transform, transform, transform
params
write
save
getInputCol
getOutputCol
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, onParamChange, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn
$init$, initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, initLock, isTraceEnabled, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning, org$apache$spark$internal$Logging$$log__$eq, org$apache$spark$internal$Logging$$log_, uninitialize
public PolynomialExpansion(String uid)
public PolynomialExpansion()
public static PolynomialExpansion load(String path)
public static MLReader<T> read()
public String uid()
Identifiable
uid
in interface Identifiable
public IntParam degree()
public int getDegree()
public PolynomialExpansion setDegree(int value)
public PolynomialExpansion copy(ParamMap extra)
Params
defaultCopy()
.copy
in interface Params
copy
in class UnaryTransformer<Vector,Vector,PolynomialExpansion>
extra
- (undocumented)public String toString()
toString
in interface Identifiable
toString
in class Object