# Variable calc`Const`

calc: { assocationRuleLearning: ((transactions?: never[], options: any) => Promise<unknown>); getTransactions: ((data: any[], options: any) => { transactions: any[][]; values: Set<unknown>; valuesMap: Map<any, any> }) } = ...

#### Type declaration

- ##### assocationRuleLearning: ((transactions?: never[], options: any) => Promise<unknown>)

  - - (transactions?: never[], options: any): Promise<unknown>

    - returns association rule learning results

      ### See

      https://github.com/alexisfacques/Node-FPGrowth

      ### Returns

      Returns the result from Node-FPGrowth or a summary of support and strong associations

      #### Parameters

      - ##### transactions: never[] = []

        sparse matrix of transactions

      - ##### options: any

      #### Returns Promise<unknown>

- ##### getTransactions: ((data: any[], options: any) => { transactions: any[][]; values: Set<unknown>; valuesMap: Map<any, any> })

  - - (data: any[], options: any): { transactions: any[][]; values: Set<unknown>; valuesMap: Map<any, any> }

    - Formats an array of transactions into a sparse matrix like format for Apriori/Eclat

      ### See

      https://github.com/alexisfacques/Node-FPGrowth

      ### Returns

      {values - unique list of all values, valuesMap - map of values and labels, transactions - formatted sparse array}

      #### Parameters

      - ##### data: any[]

        CSV data of transactions

      - ##### options: any

      #### Returns { transactions: any[][]; values: Set<unknown>; valuesMap: Map<any, any> }

      - ##### transactions: any[][]

      - ##### values: Set<unknown>

      - ##### valuesMap: Map<any, any>

- Defined in src/calc.ts:98