コード例 #1
0
 def test_performance_spectrum(self):
     log = xes_importer.apply(
         os.path.join("input_data", "running-example.xes"))
     from pm4py.statistics.performance_spectrum import algorithm as pspectrum
     ps = pspectrum.apply(log, ["register request", "decide"])
     df = pd.read_csv(os.path.join("input_data", "running-example.csv"))
     df = dataframe_utils.convert_timestamp_columns_in_df(df)
     ps = pspectrum.apply(df, ["register request", "decide"])
コード例 #2
0
 def test_performance_spectrum(self):
     log = xes_importer.apply(
         os.path.join("input_data", "running-example.xes"))
     from pm4py.statistics.performance_spectrum import algorithm as pspectrum
     ps = pspectrum.apply(log, ["register request", "decide"])
     from pm4py.objects.log.adapters.pandas import csv_import_adapter
     df = csv_import_adapter.import_dataframe_from_path(
         os.path.join("input_data", "running-example.csv"))
     ps = pspectrum.apply(df, ["register request", "decide"])
コード例 #3
0
ファイル: pm1.py プロジェクト: Godcomplex11/DU
median_case_duration = case_statistics.get_median_caseduration(log, parameters={    case_statistics.Parameters.TIMESTAMP_KEY: "time:timestamp"})
median_case_duration

#Case Arrival
from pm4py.statistics.traces.log import case_arrival
case_arrival_ratio = case_arrival.get_case_arrival_avg(log, parameters={    case_arrival.Parameters.TIMESTAMP_KEY: "time:timestamp"})
case_arrival_ratio

from pm4py.statistics.traces.log import case_arrival
case_dispersion_ratio = case_arrival.get_case_dispersion_avg(log, parameters={    case_arrival.Parameters.TIMESTAMP_KEY: "time:timestamp"})
case_dispersion_ratio


#Peformance Spectrum
from pm4py.statistics.performance_spectrum import algorithm as performance_spectrum
ps = performance_spectrum.apply(log, ["register request", "decide"], parameters= {performance_spectrum.Parameters.ACTIVITY_KEY: "concept:name", performance_spectrum.Parameters.TIMESTAMP_KEY: "time:timestamp"})
ps

#Business Hours
from pm4py.util.business_hours import BusinessHours
from datetime import datetime

st = datetime.fromtimestamp(100000000)
et = datetime.fromtimestamp(200000000)
bh_object = BusinessHours(st, et)
worked_time = bh_object.getseconds()
print(worked_time)

#Cycle Time and Waiting Time
from pm4py.objects.log.util import interval_lifecycle
enriched_log = interval_lifecycle.assign_lead_cycle_time(log)