shuim
Note
This document has been machine translated.
Perform frequent itemset extraction using SHUIM.
The execution method is JSON-RPC v2.0.
Example request
shuim is a kind of analysis API, which can be executed by specifying api_method="shuim" to the process method of the Provenance API.
The following is an example of starting a Provenance session, executing shuim, and then exiting the session.
import xdata_prov.client import Api
api = Api()
api.begin_session()
api.process(api_method="shuim", api_params={
"output_ddc": "ddc:shuim_result",
"input_ddc": "ddc:shuim_utility",
"adjacent_ddc": "ddc:shuim_neighbour",
"id_column": "ts",
"item_column": "item",
"utility_column": "utility",
"min_utility": 1500
})
api.commit()
api.end_session()
Parameters.
When calling the process method with api_method="shuim", api_params will take a dict containing the following keys.
Any parameter with a blank default value is a required parameter.
| key | description | default value |
|---|---|---|
| output_ddc | output destination for processing results ddc | |
| output_mode | output mode (overwrite or error) |
error |
| input_ddc | input data ddc | |
| adjacent_ddc | adjacent data ddc | |
| adjoining_ddc | adjacent_ddc | adjacent_ddc |
| item_column | column representing item in input_ddc | |
| utility_column | column representing utility in input_ddc | |
| utility_column | column representing utility in input_ddc |
Input data
utility table
The input ddc specified by input_ddc is a "utility table".
This table must have the following schema.
| column name | data type | description |
|---|---|---|
| (timestep) | (integer or timestamp with time zone) | Information representing the timestep. Column name is optional. |
| (item) | text | A string representing the item. Column name is optional. |
| (utility) | integer | a numeric value representing utility. Column name is optional. |
Adjacent Item Table
The ddc specified by adjacent_ddc is the "adjacent item table".
This table must have the following schema.
| column name | data type | description |
|---|---|---|
| item1 | text | indicating that item1 and item2 are neighbors |
| item2 | text | item1 and item2 are neighbors |
Note on Neighbor Item Table.
In the paper, neighbors (Table 5) are obtained from the location information of each item (Table 3).
In shuim, the information of neighbors is given directly.
Output data.
SHUIs table.
The "SHUIs table" is output to the destination ddc specified by output_ddc.
This table will have the following schema.
| column name | data type | description |
|---|---|---|
| items | text[] | itemset |
| utility | integer | utility |
return value
shuim returns the ddc information of the output destination ddc.
This is the behavior defined by the specification of the process method of the Provenance API.