public static class PolynomialFunction.Regression extends AbstractCloneableSerializable implements SupervisedBatchLearner<java.lang.Double,java.lang.Double,VectorFunctionLinearDiscriminant<java.lang.Double>>
Constructor and Description |
---|
Regression(double... polynomialExponents)
Creates a new instance of Regression
|
Modifier and Type | Method and Description |
---|---|
ScalarBasisSet<java.lang.Double> |
getPolynomials()
Getter for polynomials
|
VectorFunctionLinearDiscriminant<java.lang.Double> |
learn(java.util.Collection<? extends InputOutputPair<? extends java.lang.Double,java.lang.Double>> data)
The
learn method creates an object of ResultType using
data of type DataType , using some form of "learning" algorithm. |
static VectorFunctionLinearDiscriminant<java.lang.Double> |
learn(int maxOrder,
java.util.Collection<? extends InputOutputPair<java.lang.Double,java.lang.Double>> data)
Performs LinearRegression using all integer-exponent polynomials
less than or equal to the maxOrder
|
void |
setPolynomials(ScalarBasisSet<java.lang.Double> polynomials)
Setter for polynomials
|
clone
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone
public Regression(double... polynomialExponents)
polynomialExponents
- Set of polynomial exponents to use during the regressionpublic static VectorFunctionLinearDiscriminant<java.lang.Double> learn(int maxOrder, java.util.Collection<? extends InputOutputPair<java.lang.Double,java.lang.Double>> data)
maxOrder
- Uses all polynomials below the maxOrder: a0*x^0 + a1*x^1 + ... am*a^mdata
- Data set to use for the LinearRegressionpublic VectorFunctionLinearDiscriminant<java.lang.Double> learn(java.util.Collection<? extends InputOutputPair<? extends java.lang.Double,java.lang.Double>> data)
BatchLearner
learn
method creates an object of ResultType
using
data of type DataType
, using some form of "learning" algorithm.learn
in interface BatchLearner<java.util.Collection<? extends InputOutputPair<? extends java.lang.Double,java.lang.Double>>,VectorFunctionLinearDiscriminant<java.lang.Double>>
data
- The data that the learning algorithm will use to create an
object of ResultType
.public ScalarBasisSet<java.lang.Double> getPolynomials()
public void setPolynomials(ScalarBasisSet<java.lang.Double> polynomials)
polynomials
- Polynomials to use in the regression