public class PolynomialTransform extends Object implements DataTransform
Constructor and Description |
---|
PolynomialTransform(int degree)
Creates a new polynomial transform of the given degree
|
Modifier and Type | Method and Description |
---|---|
DataTransform |
clone() |
void |
fit(DataSet data)
Fits this transform to the given dataset.
|
int |
getDegree()
Returns the polynomial degree to use
|
void |
setDegree(int degree)
Sets the degree of the polynomial to transform the input vector into
|
DataPoint |
transform(DataPoint dp)
Returns a new data point that is a transformation of the original data
point.
|
public PolynomialTransform(int degree)
degree
- the degree of the polynomialArithmeticException
- if the degree is not greater than 1public void fit(DataSet data)
DataTransform
FailedToFitException
exception may be
thrown.fit
in interface DataTransform
data
- the dataset to fir this transform topublic DataPoint transform(DataPoint dp)
DataTransform
transform
in interface DataTransform
dp
- the data point to apply a transformation topublic DataTransform clone()
clone
in interface DataTransform
clone
in class Object
public void setDegree(int degree)
degree
- the positive degree to usepublic int getDegree()
Copyright © 2017. All rights reserved.