public abstract class GlobalDistance
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected LocalDistance |
date_dist
Object to computeDistance the local date computeDistance.
|
protected LocalDistance |
discrete_dist
Object to computeDistance the local discrete computeDistance.
|
protected LocalDistance |
numeric_dist
Object to computeDistance the local numeric computeDistance.
|
protected LocalDistance |
sequence_dist
Object to computeDistance the local sequence computeDistance.
|
protected LocalDistance |
text_dist
Object to computeDistance the local text computeDistance.
|
Constructor and Description |
---|
GlobalDistance()
Void constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract MatriuDistancies |
computeDistance(Population test,
Population train,
java.lang.String classe)
Abstract method to computeDistance the global computeDistance between two populations.
|
protected java.lang.Float[] |
individualDistance(Individual a,
Individual b,
Population p)
Computes local computeDistance between two individuals.
|
void |
setLocalDistances(LocalDistance d_num,
LocalDistance d_disc,
LocalDistance d_text,
LocalDistance d_date,
LocalDistance d_sequencies)
Sets all the local computeDistance methods to the provided specific implementations.
|
protected LocalDistance numeric_dist
protected LocalDistance discrete_dist
protected LocalDistance text_dist
protected LocalDistance date_dist
protected LocalDistance sequence_dist
public void setLocalDistances(LocalDistance d_num, LocalDistance d_disc, LocalDistance d_text, LocalDistance d_date, LocalDistance d_sequencies)
d_num
- LocalDistance computeDistance computing method for continuous numbers.d_disc
- LocalDistance computeDistance computing method for discrete numbers.d_text
- LocalDistance computeDistance computing method for text values.d_date
- LocalDistance computeDistance computing method for date values.d_sequencies
- LocalDistance computeDistance computing method for sequences.public abstract MatriuDistancies computeDistance(Population test, Population train, java.lang.String classe)
test
- Population of test.train
- Population of case base.classe
- String with the attribute id of the value to classify.protected java.lang.Float[] individualDistance(Individual a, Individual b, Population p)
a
- Individual (test).b
- Individual (train).p
- Population with the individuals' attributes.