|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.kpro.algorithm.DistanceMetric
com.kpro.algorithm.Bitmapwithdata
public class Bitmapwithdata
A distance metric that calculates distance based on weighed union of a bit map interception
Field Summary | |
---|---|
private double |
admin
|
private double |
business_practices
|
private double |
contact
|
private double |
current
|
private double |
delivery
|
private double |
develop
|
private double |
historical
|
private double |
indefinitely
|
private double |
individual_analysis
|
private double |
individual_decision
|
private double |
legal_requirement
|
private double |
no_retention
|
private double |
other_purpose
|
private double |
other_recipient
|
private double |
ours
|
private double |
pseudo_analysis
|
private double |
pseudo_decision
|
private double |
pub
|
private double |
same
|
private double |
stated_purpose
|
private double |
tailoring
|
private double |
telemarketing
|
private double |
unrelated
|
Fields inherited from class com.kpro.algorithm.DistanceMetric |
---|
extraArgs, weightsConfig |
Constructor Summary | |
---|---|
Bitmapwithdata(java.util.Properties weights,
java.lang.String[] extraArgs)
|
Method Summary | |
---|---|
private double |
getDistance(PolicyObject a,
PolicyObject b,
int time)
Returns the distance between two PolicyObjects, summing the minimum distance from B to A and then the distance from A to B. |
private double |
getDistData(Case a,
Case b)
|
private double |
getDistPurpose(Case a,
Case b)
Calculates distance in the Purpose field from case a to case b using bit map distance = a interseption b * weight |
private double |
getDistRecip(Case a,
Case b)
Calculates distance in the Recipien field from case a to case b using bit map distance = a interseption b * weight |
private double |
getDistReten(Case a,
Case b)
Calculates distance in the Retention field from case a to case b using bit map distance = a interseption b * weight |
private double |
getSumDistance(Case a,
Case b)
Returns the distance between two cases a and b based on purpose, recipient, retention, and data. |
double |
getTotalDistance(PolicyObject a,
PolicyObject b)
Initializes weights and returns the distance between two PolicyObjects. |
private double[] |
MakePurposeMap(java.util.ArrayList<Purpose> list)
internal method that makes a bit map of 12 doubles each place in an array corresponds to a spesfic value of a Purpose Enum |
private double[] |
MakeRecipMap(java.util.ArrayList<Recipient> list)
internal method that makes a bit map of 6 ints each place in an array corresponds to a spesfic value of a Recipient field |
private double[] |
MakeRetentionMap(java.util.ArrayList<Retention> list)
internal method that makes a bit map of 5 ints each place in an array corresponds to a spesfic value of a Retention Enum |
private void |
setWeights()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private double ours
private double delivery
private double same
private double other_recipient
private double unrelated
private double pub
private double current
private double admin
private double develop
private double tailoring
private double pseudo_analysis
private double pseudo_decision
private double individual_analysis
private double individual_decision
private double contact
private double historical
private double telemarketing
private double other_purpose
private double no_retention
private double stated_purpose
private double legal_requirement
private double business_practices
private double indefinitely
Constructor Detail |
---|
Bitmapwithdata(java.util.Properties weights, java.lang.String[] extraArgs)
Method Detail |
---|
private void setWeights()
private double[] MakeRecipMap(java.util.ArrayList<Recipient> list)
list
- input arraylist of ReciPients for method...
private double[] MakePurposeMap(java.util.ArrayList<Purpose> list)
list
- input arraylist of Purpose for method...
private double[] MakeRetentionMap(java.util.ArrayList<Retention> list)
list
- input arraylist of Purpose for method...
private double getDistRecip(Case a, Case b)
a
- input case.b
- input case.
private double getDistReten(Case a, Case b)
a
- input case.b
- input case.
private double getDistData(Case a, Case b)
private double getDistPurpose(Case a, Case b)
a
- input case.b
- input case.
private double getSumDistance(Case a, Case b)
a
- the 1st caseb
- the 2nd case
private double getDistance(PolicyObject a, PolicyObject b, int time)
a
- the 1st policy objectb
- the second policy objecttime
- the direction to run- if not called from inside method, it should be 0
public double getTotalDistance(PolicyObject a, PolicyObject b)
getTotalDistance
in class DistanceMetric
a
- the 1st policy objectb
- the second policy object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |