Skip to content

outputType functions

Gus-prog edited this page Mar 31, 2022 · 9 revisions

outputType

Output class of pyUDLF. Responsible for handling the result of a UDLF run. This output can be

  • log, which contains values such as (some possible, may have others):
Time       =  0.0061 s
P@4        = {'Before': '0.6518', 'After': '0.7000', 'Gain': '7.3973%'}
P@5        = {'Before': '0.6136', 'After': '0.6671', 'Gain': '8.7311%'}
P@10       = {'Before': '0.5146', 'After': '0.5896', 'Gain': '14.5732%'}
P@15       = {'Before': '0.4650', 'After': '0.5479', 'Gain': '17.8187%'}
P@20       = {'Before': '0.4346', 'After': '0.5130', 'Gain': '18.0362%'}
P@30       = {'Before': '0.3840', 'After': '0.4675', 'Gain': '21.7297%'}
P@50       = {'Before': '0.3241', 'After': '0.4028', 'Gain': '24.2618%'}
P@100      = {'Before': '0.2466', 'After': '0.2875', 'Gain': '16.5991%'}
Recall@4   = {'Before': '0.0652', 'After': '0.0700', 'Gain': '7.3972%'}
Recall@5   = {'Before': '0.0767', 'After': '0.0834', 'Gain': '8.7311%'}
Recall@10  = {'Before': '0.1287', 'After': '0.1474', 'Gain': '14.5732%'}
Recall@20  = {'Before': '0.2173', 'After': '0.2565', 'Gain': '18.0362%'}
Recall@40  = {'Before': '0.3500', 'After': '0.4354', 'Gain': '24.4133%'}
MAP        = {'Before': '0.3725', 'After': '0.4718', 'Gain': '26.6584%'}
  • matrix or ranked list, their formats are in the UDLF FORMATS link.

You can get both types of output, they are not mutually exclusive, you just have to request them through the functions mentioned below and if the result of the operation has been requested in the functions you find on the run_calls page.


Functions


get_matrix

Description:

This function reads the matrix that is saved in the path defined in the configuration file and returns a variable with it.

Prototype:

  • get_matrix()

Parameters:

This function has no parameter.

Return value:

valor de retorno

Example:

EXEMPLO


get_rks

Description:

This function reads the ranked list that is saved in the path defined in the configuration file and returns a variable with it.

Prototype:

  • get_rks(top_k=1000)

Parameters:

top_k -> ?

Return value:

valor de retorno

Example:

EXEMPLO


get_log

Description:

This function reads the output log of the UDLF run and returns a dictionary with the values.

Prototype:

  • get_log()

Parameters:

This function has no parameter.

Return value:

valor de retorno

Example:

EXEMPLO


print_log

Description:

Displays the output log of the UDLF run in a more organized and cleaner way.

Prototype:

  • print_log()

Parameters:

This function has no parameter.

Return value:

valor de retorno

Example:

EXEMPLO


Clone this wiki locally