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 |
---|---|
static Params |
clear(Param<?> param) |
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.
|
static String |
explainParam(Param<?> param) |
static String |
explainParams() |
static ParamMap |
extractParamMap() |
static ParamMap |
extractParamMap(ParamMap extra) |
static <T> scala.Option<T> |
get(Param<T> param) |
static <T> scala.Option<T> |
getDefault(Param<T> param) |
int |
getDegree() |
static String |
getInputCol() |
static <T> T |
getOrDefault(Param<T> param) |
static String |
getOutputCol() |
static Param<Object> |
getParam(String paramName) |
static <T> boolean |
hasDefault(Param<T> param) |
static boolean |
hasParam(String paramName) |
static Param<String> |
inputCol() |
static boolean |
isDefined(Param<?> param) |
static boolean |
isSet(Param<?> param) |
static PolynomialExpansion |
load(String path) |
static Param<String> |
outputCol() |
static Param<?>[] |
params() |
static void |
save(String path) |
static <T> Params |
set(Param<T> param,
T value) |
PolynomialExpansion |
setDegree(int value) |
static T |
setInputCol(String value) |
static T |
setOutputCol(String value) |
static String |
toString() |
static Dataset<Row> |
transform(Dataset<?> dataset) |
static Dataset<Row> |
transform(Dataset<?> dataset,
ParamMap paramMap) |
static Dataset<Row> |
transform(Dataset<?> dataset,
ParamPair<?> firstParamPair,
ParamPair<?>... otherParamPairs) |
static Dataset<Row> |
transform(Dataset<?> dataset,
ParamPair<?> firstParamPair,
scala.collection.Seq<ParamPair<?>> otherParamPairs) |
static StructType |
transformSchema(StructType schema) |
String |
uid()
An immutable unique ID for the object and its derivatives.
|
static MLWriter |
write() |
setInputCol, setOutputCol, transform, transformSchema
transform, transform, transform
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
write
save
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn
toString
public PolynomialExpansion(String uid)
public PolynomialExpansion()
public static PolynomialExpansion load(String path)
public static String toString()
public static Param<?>[] params()
public static String explainParam(Param<?> param)
public static String explainParams()
public static final boolean isSet(Param<?> param)
public static final boolean isDefined(Param<?> param)
public static boolean hasParam(String paramName)
public static Param<Object> getParam(String paramName)
public static final <T> scala.Option<T> get(Param<T> param)
public static final <T> T getOrDefault(Param<T> param)
public static final <T> scala.Option<T> getDefault(Param<T> param)
public static final <T> boolean hasDefault(Param<T> param)
public static final ParamMap extractParamMap()
public static Dataset<Row> transform(Dataset<?> dataset, ParamPair<?> firstParamPair, scala.collection.Seq<ParamPair<?>> otherParamPairs)
public static Dataset<Row> transform(Dataset<?> dataset, ParamPair<?> firstParamPair, ParamPair<?>... otherParamPairs)
public static final Param<String> inputCol()
public static final String getInputCol()
public static final Param<String> outputCol()
public static final String getOutputCol()
public static T setInputCol(String value)
public static T setOutputCol(String value)
public static StructType transformSchema(StructType schema)
public static void save(String path) throws java.io.IOException
java.io.IOException
public static MLWriter write()
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)