Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1106763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:50:28+00:00 2026-05-17T01:50:28+00:00

I am doing an application that will compute all 2 size frequent itemset from

  • 0

I am doing an application that will compute all 2 size frequent itemset from a set of transactions. That is the application will have as input a data file (space delimited text file – with the items encoded as integers) and a percentage, given as an integer (e.g. input 2 represents 2%). The application will output in a distinct file each pair of numbers that appears together in the same transaction (a transaction is represented by one line in the file) in more than 2% of all transactions (where 2% is the percentage given in the input). The output file will contain each pair of items in a line together with their support (the number of transactions where they appear) also the application will output (on the screen on in a file) the duration (the time needed to execute the task).

the data file will be like

55 22 33 123 231 414

21 43 432 435 231 4324 534

22 21 33 123 231 534 666 222

...

each line is called a transaction and the input file contains thousands of transactions.
I am thinking about using the data mining rule first to find all the single numbers whose appear frequency is larger than 2% in each transaction, and then form pairs for each transaction and at last compare each pair and generate the output file.

anyone has some ideas or code for this please help, if you have code(better in java) for this that will be very helpful Thanks a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:50:28+00:00Added an answer on May 17, 2026 at 1:50 am

    Here’s one way to count the integers.

    public class IntCount {
    
        public static void main(String[] args) {
            count("123 234 456 678 789 234 234 123");
    
        }
    
        public static void count(String transactionLine) {
            String[] parts = transactionLine.split(" ");
    
            Map<String, Integer> hashTable = new HashMap<String, Integer>();
            // Count duplicates
            for (String s : parts) {
                if (hashTable.get(s) == null) hashTable.put(s, 1);
                else hashTable.put(s, hashTable.get(s) + 1);
            }
    
            for (String s : hashTable.keySet()) {
                System.out.println("s: " + s + " count: " + hashTable.get(s));
            }
        }
    }
    

    Now you can start working through determining the 2% part.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a winforms application that is doing the following: on each query: Db
Currently I have an application that takes information from a SQLite database and puts
People always advised me that if I am doing some application that should use
I'm doing a authorization check from a WinForms application with the help of the
I am doing some maintenance on a VB6 Windows application. I have a .Net
I have an application where I have a number of sets. A set might
I have a VB.NET application that crashes on a client's computer with a BSOD
I must build a Application that will use Webclient multiple times to retrieve every
Intro I am doing a kind of OCR application that should recognize characters based
I am trying to write a Java application that will query the WMI on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.