Skip to main content

Python package for computing diefficiency metrics dief@t and dief@k.

Project description

Build Status Latest Release Python Versions Package Format Package Status Package Version DOI License: MIT

Philipp D. Rohde, Nikoleta Themeliotou

diefpy

Python package for computing diefficiency metrics dief@t and dief@k.

The metrics dief@t and dief@k allow for measuring the diefficiency during an elapsed time period t or while k answers are produced, respectively. dief@t and dief@k rely on the computation of the area under the curve of answer traces, and thus capturing the answer rate concentration over a time interval.

This is a fork of the original diefpy repo providing a complete Python3 version.

Description

Overview of Result Plots Figure 1: Overview of Result Plots.

Fig. 1 gives an overview of the result plots that can be produced using the package. Firstly the overall Execution Time for all the tests and approaches (NotAdaptive, Random and Selective) in the metrics data can be created as a bar plot. For evaluating the input tests an answer trace of each approach (NotAdaptive, Random and Selective) can be created which shows how many answers were produced. Finally two Radar Plots can be created. The Radar Plot on the left compares dief@t with other benchmark metrics in a specific test. The other benchmark metrics being total execution time, time for the first tuple, throughput, and completeness. The Radar Plot on the right compares dief@k at different answer completeness in a specific test by measuring the continuous efficiency of approaches when producing the first 25%, 50%, 75%, and 100% of the answers.

Usage

Compute dief@t and dief@k for the test Q9.rq based on the traces traces.csv and metrics metrics.csv provided as example in the package.

import diefpy
from pkg_resources import resource_filename

# Use answer traces provided in the package: Compare three approaches "Selective", "Not Adaptive", "Random" when executing the test "Q9.rq".
traces = diefpy.load_trace(resource_filename('diefpy', 'data/traces.csv')) 

# Plot answer traces for test "Q9.rq".
diefpy.plot_answer_trace(traces, "Q9.rq", ["#ECC30B","#D56062","#84BCDA"]).show()

# Compute dief@t when t is the time where the slowest approach produced the last answer.
diefpy.dieft(traces, 'Q9.rq')

# Compute dief@t after 7.5 time units (seconds) of execution. 
diefpy.dieft(traces, 'Q9.rq', 7.5)

# Compute dief@k when k is the minimum of retrieved answers across the approaches.
diefpy.diefk(traces, 'Q9.rq')

# Compute dief@k after 10 results.
diefpy.diefk(traces, 'Q9.rq', 10)

# Compute dief@k when k is 50% of the answers retrieved.
diefpy.diefk2(traces, 'Q9.rq', 0.5)

# Load the metrics.
metrics = diefpy.load_metrics(resource_filename('diefpy', 'data/metrics.csv'))

# Compute the metrics for performance analysis with dief@t.
exp1 = diefpy.performance_of_approaches_with_dieft(traces, metrics)

# Plot the metrics for performance analysis with dief@t.
diefpy.plot_performance_of_approaches_with_dieft(exp1, 'Q9.rq', ["#ECC30B","#D56062","#84BCDA"]).show()

# Compute the metrics for continuous efficiency with dief@k.
exp2 = diefpy.continuous_efficiency_with_diefk(traces)

# Plot the metrics for continuous efficiency with dief@k.
diefpy.plot_continuous_efficiency_with_diefk(exp2, 'Q9.rq', ["#ECC30B","#D56062","#84BCDA"]).show()

It is also possible to generate the plots for all the tests and receive a list of plots instead of a single plot by using the following functions:

diefpy.plot_all_answer_traces(traces, ["#ECC30B","#D56062","#84BCDA"])
diefpy.plot_all_performance_of_approaches_with_dieft(exp1, ["#ECC30B","#D56062","#84BCDA"])
diefpy.plot_all_continuous_efficiency_with_diefk(exp2, ["#ECC30B","#D56062","#84BCDA"])

Publications

[1] Maribel Acosta, Maria-Esther Vidal, York Sure-Vetter. Diefficiency Metrics: Measuring the Continuous Efficiency of Query Processing Approaches. In Proceedings of the International Semantic Web Conference, 2017. Nominated to Best Paper Award at the Resource Track. https://doi.org/10.1007/978-3-319-68204-4_1

[2] Maribel Acosta, Maria-Esther Vidal. Measuring the Performance of Continuous Query Processing Approaches with dief@t and dief@k. In the International Semantic Web Conference, Posters and Demos, 2017. online

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diefpy-1.0.1.tar.gz (146.7 kB view details)

Uploaded Source

Built Distribution

diefpy-1.0.1-py3-none-any.whl (147.9 kB view details)

Uploaded Python 3

File details

Details for the file diefpy-1.0.1.tar.gz.

File metadata

  • Download URL: diefpy-1.0.1.tar.gz
  • Upload date:
  • Size: 146.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5

File hashes

Hashes for diefpy-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b10d7cd2190155bcc378f56bddb36c4c703a7ac6897f3342791a5f59dbcccd93
MD5 07fb935891f7baf6072792acf98da989
BLAKE2b-256 d2190b03f04b6f7298327285547a39e617edc19a74ea288b1dd824b6c20f06c8

See more details on using hashes here.

Provenance

File details

Details for the file diefpy-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: diefpy-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 147.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5

File hashes

Hashes for diefpy-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1c6f8f25999f3bf005807cdd976e45ccc144ac4860f0dc58332b0ad0c69b925b
MD5 e4abec7f7642f31b0585fc64ae142c25
BLAKE2b-256 53fc7cb1a5aeda5dc0766f08d451345ad885f6f9cd589a833074033170570f29

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page