6.40

Load small sample of SP into HBase via Eclipse
o Open a new Terminal and start up Eclipse
su poulin
eclipse
o Run->Run Configurations…
o Java Application-> (right click) -> New
o Click on the New_configuration to edit its settings on the right
o Configure the runtime options as:
• Name: SpLoad
• Main->Project: bcounts
• Main->Main class: com.cloudera.bayesiancounters.util.Driver
• Arguments->Program arguments: loader /tmp/sp-training.small sp
• Arguments->VM arguments: -Dlog4j.configuration=file:debug-log4j.properties
o Click on Apply, then Click on Run and then view the Console tab of the parent window

6.41

Perform NB inference on the SP dataset
Run->Run Configurations…
o Java Application-> (right click) -> New
o Click on the New_configuration to edit its settings on the right
o Configure the runtime options as:
• Name: SpInference
• Main->Project: bcounts
• Main->Main class: com.cloudera.bayesiancounters.util.Driver
• Arguments->Program arguments: nb sp 604800 “sepal_length=5;petal_length=1.4″ class=2
• Arguments->VM arguments: -Dlog4j.configuration=file:debug-log4j.properties
o Click on Apply, then Click on Run and then view the Console tab of the parent window
o Wait for results in the Console tab and execution to complete.
o Close eclipse
Note: These results are from bcounts on 2 lines of the input data only. Recommend using small or medium sized cluster for processing the entire ad.data file. See Cloudera Manager Documentation for cluster size specifications.

In this example B-counts can be used for predicting an effect of the news on stock market movements
(US Patent No. 7,516,050)