Results 1 to 4 of 4

Thread: Data Mining

  1. #1
    justOne is offline Member
    Join Date
    Jul 2011
    Posts
    11
    Rep Power
    0

    Default Data Mining

    I need help planning a deceivingly simple data mining program. I need it to take in a file containing strings, compare it to another file, and count the number of occurrences of the string w/in the second file. This needs to be done according to date, and for each date, hours 0-24. The output should go to yet another file, in the following form:

    index, date, hour, string, count

    Now, my original idea is to create a Hashmap<String, Hashmap<Integer, Data>>

    But this is causing me to become easily confused as to what I'm referring to. Any suggestions on how to do this as simply as possible would be greatly appreciated. Also, memory is a concern as this will be running on a server.
    Thanks in advance!

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,008
    Rep Power
    20

    Default Re: Data Mining

    Create a proper class that contains your data.
    That class would (going by the above) contain those 5 attributes.
    You'd have a Map<String, YourClass> where the key (the String) is the String you are searching for.

    Just as an initial thought.

  3. #3
    justOne is offline Member
    Join Date
    Jul 2011
    Posts
    11
    Rep Power
    0

    Default Re: Data Mining

    Well, that's part of the problem. I'm searching for multiple things. I'm searching for the date, the hour, and the String.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,008
    Rep Power
    20

    Default Re: Data Mining

    Um, why?
    You say you are searching for a String in a text file (OK, different ones, but lets take a single cycle).
    You want the date, the hour and the count.
    The first two are defined by the searched in text file, so that's OK, and the last is the search.
    I have no idea where index comes from, but:
    Java Code:
    for each String
       for each File
          count String
          Write entry to output file
    That is your requirement as stated in the OP.
    I just stuck it in a Map because you did, but if I took your requirements as read there is no need to store this locally at all.

Similar Threads

  1. Web Mining
    By ersachinjain in forum Networking
    Replies: 3
    Last Post: 10-29-2010, 08:03 PM
  2. Replies: 0
    Last Post: 05-07-2010, 01:38 PM
  3. need help from experts in data mining area!!!!
    By ŖΫ ỏ Ңόρę in forum Advanced Java
    Replies: 0
    Last Post: 04-28-2010, 08:09 PM
  4. Data Stream Mining
    By YNC in forum New To Java
    Replies: 3
    Last Post: 03-02-2010, 09:15 AM
  5. Java Coding for Machine Learning (Data Mining)
    By tyang in forum New To Java
    Replies: 3
    Last Post: 03-02-2010, 01:27 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •