Interface DP
public interface DP
Super class/interface for different dynamic programming approaches.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Compute the similarity by performing dp.void
computeSimilarity
(DataObject[] newCaseRes) Compute the similarity by performing dp on the initial query tasks and new case tasks.void
computeSimilarity
(NESTSequentialWorkflowObject newCaseRes) Compute the similarity by performing dp on the initial query tasks and new case tasks.DataObject[][]
Returns the found alignment of the dp algorithm as a 2d array.Returns the found assignments of the dp algorithm.double
Return the normalized similarity.double
Return the found raw similarity.Get the recommendation resulting from the found alignment.getStepVec
(DataObject queryTask, DataObject caseTask) Vector representing DP-specific possibilities associated with each step.void
Remove the curernt case.void
setBindToLastRow
(boolean b) Specify whether to bind alignment to last row of matrix.void
setCase
(DataObject[] caseRes) Set a new case to be compared to the query.void
setCase
(NESTSequentialWorkflowObject caseRes) Set a new case to be compared to the query.void
setDataSimilarityToUse
(String name) Set the similarity measure to be used for data nodes during local node sim calc.void
setHalvingDistancePercentage
(double halvingDistancePercentage) Set the desired halving distance in percentage of the entire query task length.void
Set the similarity measure to be used for task nodes during local node sim calc.void
setLocalSimWeights
(double taskSimWeight, double inputDataSimWeight, double outputDataSimWeight) Set the desired weight distribution for calculation of local node similarities.void
setSimilarityValuator
(SimilarityValuator simValuator) Set a similarity valuator to be used to calculate the local values.
-
Method Details
-
computeSimilarity
void computeSimilarity()Compute the similarity by performing dp. -
computeSimilarity
Compute the similarity by performing dp on the initial query tasks and new case tasks.- Parameters:
newCaseRes
- The new case resource to compare the query to.
-
computeSimilarity
Compute the similarity by performing dp on the initial query tasks and new case tasks.- Parameters:
newCaseRes
- The new case resource to compare the query to.
-
getRawSimilarityScore
double getRawSimilarityScore()Return the found raw similarity.- Returns:
- The raw similarity score.
-
getNormedSimilarityScore
double getNormedSimilarityScore()Return the normalized similarity.- Returns:
- The normalized similarity score.
-
setCase
Set a new case to be compared to the query.- Parameters:
caseRes
- The new de facto instance.
-
setCase
Set a new case to be compared to the query.- Parameters:
caseRes
- The new de facto instance.
-
getAssignments
MatrixPath getAssignments()Returns the found assignments of the dp algorithm.- Returns:
- The found assignments of the dp algorithm.
-
getAlignment
DataObject[][] getAlignment()Returns the found alignment of the dp algorithm as a 2d array. return[0] und return[1] enthalten die alignments.- Returns:
- A 2d array containing the alignment.
-
getRecommendation
DataObject getRecommendation()Get the recommendation resulting from the found alignment.- Returns:
- The data object to recommend.
-
setSimilarityValuator
Set a similarity valuator to be used to calculate the local values.- Parameters:
simValuator
-
-
setHalvingDistancePercentage
void setHalvingDistancePercentage(double halvingDistancePercentage) Set the desired halving distance in percentage of the entire query task length.- Parameters:
halvingDistancePercentage
-
-
setBindToLastRow
void setBindToLastRow(boolean b) Specify whether to bind alignment to last row of matrix.- Parameters:
b
- true or false.
-
removeCase
void removeCase()Remove the curernt case. -
setLocalSimWeights
void setLocalSimWeights(double taskSimWeight, double inputDataSimWeight, double outputDataSimWeight) Set the desired weight distribution for calculation of local node similarities. Only applies if de facto graphs (or lists of task nodes) are being compared.- Parameters:
taskSimWeight
-inputDataSimWeight
-outputDataSimWeight
-
-
getStepVec
Vector representing DP-specific possibilities associated with each step. This function is implemented by DTW and SWA individually.- Returns:
- A vector representing each step's values. (#val diagonal step#, #val horizontal step#, #val vertical step#, 0).
-
setDataSimilarityToUse
Set the similarity measure to be used for data nodes during local node sim calc. Only applies if de facto graphs (or lists of task nodes) are being compared.- Parameters:
name
- Name of the measure.
-
setLocalSimilarityToUse
Set the similarity measure to be used for task nodes during local node sim calc.- Parameters:
name
- Name of the measure.
-