Basenum2IBM

Overview

This tool converts a .basenum dataset into IBM format.

Synopsis

Usage: ./pre08_basenum2ibm.pl  input.basenum

Parameter:
   input.basenum        the input database in .basenum format

The output is printed to the standard output.

Example

Input (sample/laszlo.basenum):

1 2 4 5
1 3
1 2 3 5
2 3 5
1 2 3 5

Command:

./pre08_basenum2ibm.pl sample/laszlo.basenum

Output:

1 1 4 1 2 4 5
2 2 2 1 3
3 3 4 1 2 3 5
4 4 3 2 3 5
5 5 4 1 2 3 5

Explanation

This script converts a .basenum file to IBM's .ascii format which is often used by other data mining algorithms.

IBM's ascii format:

     <cid> <tid> <numitem> <item list>
     CID TID #ITEMS LIST_OF_ITEMS
e.g. 1   1   4      0 1 4 6
     2   2   3      4 7 9

Note that the basenum format only contains the list of items.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License