public class PNormNormalization extends Object implements InPlaceTransform
Constructor and Description |
---|
PNormNormalization()
Creates a new object that normalizes based on the 2-norm
|
PNormNormalization(double p)
Creates a new p norm
|
Modifier and Type | Method and Description |
---|---|
PNormNormalization |
clone() |
void |
fit(DataSet data)
Fits this transform to the given dataset.
|
void |
mutableTransform(DataPoint dp)
Mutates the given data point.
|
boolean |
mutatesNominal()
By default returns
false . |
DataPoint |
transform(DataPoint dp)
Returns a new data point that is a transformation of the original data
point.
|
public PNormNormalization()
public PNormNormalization(double p)
p
- the norm to usepublic 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 void mutableTransform(DataPoint dp)
InPlaceTransform
DataTransform.transform(jsat.classifiers.DataPoint)
.mutableTransform
in interface InPlaceTransform
dp
- the data point to alterpublic boolean mutatesNominal()
InPlaceTransform
false
. Only returns true if this transform
will mutableTransform the nominal feature values of a data point.mutatesNominal
in interface InPlaceTransform
true
if nominal feature values are mutated, false
otherwise.public PNormNormalization clone()
clone
in interface DataTransform
clone
in class Object
Copyright © 2017. All rights reserved.