Thursday, May 31, 2018

CsvPredictor: Turns Historical Record Into Mini Prediction System

CsvPredictor turns a historical record in CSV format into a mini prediction system. The program is completely agnostic with respect to the domain knowledge captured in the file (e.g. weather conditions, successful movies, past performances). 
Running CsvPredictor.exe with a valid csv file will result in a QnA session based on the salience of the features (columns), effectively, turning a standard flat file into a data mining classification tree
For example, whether or not to play ball given current weather conditions:
    C:\CsvPredictor>CsvPredictor.exe PlayBall.csv
    CsvPredictor v2.41
    Input File: "PlayBall.csv" (14 records and 4 features)
    Top Features (Salience)
    Outlook   0.46176
    Humidity  0.36618
    Wind      0.11693
    Q. Is Outlook  =  ["Overcast"; "Rainy"; "Sunny"]?  Sunny
    Q. Is Humidity =  ["High"; "Normal"]?  Normal
    A. Predict: PlayBall = True
    C:\CsvPredictor>
or checking the likelihood of a new movie being a blockbuster!
    C:\CsvPredictor>CsvPredictor.exe Movies.csv
    CsvPredictor v2.41
    Input File: "Movies.csv" (2690 records and 5 features)
    Top Features (Salience)
    Budget              0.34871
    Genre               0.26719
    Production Country  0.24084
    Runtime             0.11430
    Q. Is Budget =  ["<=15000000.00"; "<=44263333.33"; "<=380000000.00"]? 
                    <=15000000.00
    Q. Is Genre =  ["Action"; "Adventure"; "Animation"; "Comedy"; "Crime"; 
                    "Documentary"; "Drama"; "Family"; "Fantasy"; "Foreign"; 
                    "History"; "Horror"; "Music"; "Mystery"; "Romance"; 
                    "Science Fiction"; "Thriller"; "War"; "Western"]?  
                    Action
    Q. Is Production Country =  ["Australia"; "Canada"; "Hong Kong"; 
                                 "Ireland"; "United Kingdom";
                                 "United States of America"]?  
                                 United States of America
    Q. Is Runtime =  ["<=99.47"; "<=115.00"; "<=248.00"]?  <=115.00
    Q. Is Release Month =  ["<=5.00"; "<=9.00"; "<=12.00"]?  <=12.00
    A. Predict: Success = True
    C:\CsvPredictor>
Note, it is very important to state that this program is only intended to provide an easy entry-point to data analytics for handicappers and is, in no way, intended to replace the advice and expertise of professional data analysts and statisticians!