The PSM allows to use other classifiers besides the quartile-based and median-proportional. That can be done by injecting a jar file with the custom classifier inplementation into Java classpath.
- Create a new Java or Scala project
- Add the PSM jar as a dependency
- Implement your own classifier by extending
org.processmining.scala.log.common.enhancment.segments.common.AbstractDurationClassifier
- Build a jar file
- Add the jar file to the PSM class path
- Run the PSM
- Provide the fully qualified class name of your custom classifier in the pre-processing dialog
- Extend your class with
AbstractDurationClassifier
:public class SegmentClassifierExample extends AbstractDurationClassifier
- Define a constructor as follows:
public SegmentClassifierExample(final String path)
.path
is a full path to the event log file or file description, or an empty string in case of running in ProM mode. - Implement method
classify
, which provides segment attributes and segment descriptove statistics as arguments - Implement
legend
to return a legend with the classifier name and class names separated by%
, e.g."Example%Class_0%Class_1"
- Specify class number in
classCount
- If required show a UI dialog in method
initialize
to configure classifier parameters.
A working example can be found here: org.processmining.scala.viewers.spectrum.view.SegmentClassifierExample
.