|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.myra.datamining.data.IntervalBuilder
net.sf.myra.datamining.data.AbstractDistanceBasedBuilder
public abstract class AbstractDistanceBasedBuilder
Nested Class Summary | |
---|---|
protected static class |
AbstractDistanceBasedBuilder.Candidate
Struct-like class to represent the label information of an instance. |
Nested classes/interfaces inherited from class net.sf.myra.datamining.data.IntervalBuilder |
---|
IntervalBuilder.CutPoint, IntervalBuilder.Interval |
Field Summary |
---|
Fields inherited from class net.sf.myra.datamining.data.IntervalBuilder |
---|
BUILDER, DEFAULT_BUILDER, metadata, MINIMUM, minimumLimit |
Constructor Summary | |
---|---|
AbstractDistanceBasedBuilder(Metadata metadata)
Default constructor. |
Method Summary | |
---|---|
protected int |
count(AbstractDistanceBasedBuilder.Candidate[] candidates,
int index,
int length)
Returns the number of different class labels present in the specified distribution. |
int |
count(java.util.List<Instance> instances,
ContinuousAttribute attribute)
Returns the number of candidate threshold values. |
protected abstract IntervalBuilder.CutPoint[] |
create(AbstractDistanceBasedBuilder.Candidate[] candidates,
boolean filter)
Returns candidate cut point(s) given the data distribution. |
IntervalBuilder.Interval[] |
create(java.util.List<Instance> instances,
ContinuousAttribute attribute)
Returns the discrete intervals for the specified continuous attribute. |
IntervalBuilder.Interval |
createSingle(java.util.List<Instance> instances,
ContinuousAttribute attribute)
Returns an interval for the specified continuous attribute tailored for the specified instances. |
IntervalBuilder.Interval |
createSingle(java.util.List<Instance> instances,
ContinuousAttribute attribute,
java.lang.String c)
Returns a discrete interval for the specified continuous attribute tailored for the specified instances and class value. |
double |
variance(AbstractDistanceBasedBuilder.Candidate[] candidates,
int index,
int length)
Returns the variance of the specified class values distribution. |
double |
variance(AbstractDistanceBasedBuilder.Candidate[] candidates,
int index,
int length,
double[] mean)
Returns the variance of the specified class values distribution. |
Methods inherited from class net.sf.myra.datamining.data.IntervalBuilder |
---|
getInstance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractDistanceBasedBuilder(Metadata metadata)
metadata
- the dataset metadata.Method Detail |
---|
public IntervalBuilder.Interval[] create(java.util.List<Instance> instances, ContinuousAttribute attribute)
IntervalBuilder
create
in class IntervalBuilder
instances
- the list of instances.attribute
- the continuous attribute.
public IntervalBuilder.Interval createSingle(java.util.List<Instance> instances, ContinuousAttribute attribute)
IntervalBuilder
createSingle
in class IntervalBuilder
instances
- the list of instances.attribute
- the continuous attribute.
public IntervalBuilder.Interval createSingle(java.util.List<Instance> instances, ContinuousAttribute attribute, java.lang.String c)
IntervalBuilder
createSingle
in class IntervalBuilder
instances
- the list of instances.attribute
- the continuous attribute.c
- the class label.
public int count(java.util.List<Instance> instances, ContinuousAttribute attribute)
IntervalBuilder
count
in class IntervalBuilder
instances
- the list of instances.attribute
- the continuous attribute.
protected abstract IntervalBuilder.CutPoint[] create(AbstractDistanceBasedBuilder.Candidate[] candidates, boolean filter)
candidates
- the data distribution.filter
- indicated if the cut points should be filtered. When
filtering cut points, it is guarenteed that this method will
return 1 or 2 values and when 2 values is returned, the interval
to be selected should be the one between the two values.
protected int count(AbstractDistanceBasedBuilder.Candidate[] candidates, int index, int length)
candidates
- the candidate points distributions.index
- the initial index.length
- the number of candidate points to consider.
public double variance(AbstractDistanceBasedBuilder.Candidate[] candidates, int index, int length)
candidates
- the class values distribution.index
- the start index of the distribution.length
- the number of candidates to be includes in the evaluation.
public double variance(AbstractDistanceBasedBuilder.Candidate[] candidates, int index, int length, double[] mean)
candidates
- the class values distribution.index
- the start index of the distribution.length
- the number of candidates to be includes in the evaluation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |