Skip to content

Latest commit

 

History

History

datasets-census-income

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Knowm Datasets Census Income

raw data

How to Get the Data

  1. Manually download the database files that have been uploaded to Knowm's Google Drive account here.
  2. Manually copy the DB_CENSUS_INCOME.* files into the /usr/local/Datasets folder. There should be four files.

How to Generate Data

  1. Download raw data from here: http://archive.ics.uci.edu/ml/datasets/Census+Income
  2. put the adult.data and adult.test files in a raw folder in project root
  3. Run RawData2DB.java.
  4. The database containing the data will appear in db.
  5. Manually copy the DB_CENSUS_INCOME.* files into the /usr/local/Datasets folder. There should be 3 files.

How to Use the Data in You App

  1. Put the desired jar on the classpath of your application. This will give you access to the DAO and Bean classes.

  2. Just call init on the DAO class you are using, passing it the path to the database files that you downloaded or generated above. When finished with the data, call release. The following example is for the BreastCancer dataset. For more examples see the datasets-samples module.

    try { BreastCancerDAO.init("/usr/local/Datasets/"); // setup data BreastCancerDemo demo = new BreastCancerDemo(); demo.go(); } catch (Exception e) { e.printStackTrace(); } finally { BreastCancerDAO.release(); // release data resources }