-
Notifications
You must be signed in to change notification settings - Fork 2
More examples
Gus-prog edited this page Jul 20, 2022
·
4 revisions
On this page right below is a short summary of the examples that are listed right after. This page is only meant to contain the examples.
- Basic examples
- Medium examples
-
Complex examples
- Correlation Graph varying the end threshold
'''
EXAMPLE :
Runs Correlation Graph varying the end threshold.
'''
#import numpy as np
from pyUDLF import run_calls
from pyUDLF.utils import inputType
# set UDLF binary and config path
# if not set pyUDLF will automatically download
config_path = "/home/gustavo/Desktop/pyUDLF/examples/bin/config.ini"
bin_path = "/home/gustavo/Desktop/pyUDLF/examples/bin/udlf"
run_calls.setBinaryPath(bin_path)
run_calls.setConfigPath(config_path)
# set execution info
input_data = inputType.InputType()
# DATASET INFORMATION
input_data.set_dataset_size(280)
input_data.set_lists_file(
"/home/gustavo/Desktop/pyUDLF/examples/Soccer/lists.txt")
input_data.set_classes_file(
"/home/gustavo/Desktop/pyUDLF/examples/Soccer/classes.txt")
# INPUT_FILES_INFORMATION
input_data.set_matrix_type("DIST")
input_data.set_input_files(
"/home/gustavo/Desktop/pyUDLF/examples/Soccer/matrices/distance/acc.txt")
input_data.set_ranked_lists_size(280)
# set method
# NONE | CPRR | RLRECOM | RLSIM | CONTEXTRR ...
input_data.set_method_name("CPRR")
input_data.set_param("OUTPUT_FILE", "TRUE")
# EXECUTION INFORMATION
output = run_calls.run(input_data, True)
output.print_log()