from crosscat.LocalEngine import LocalEngine
import crosscat.utils.data_utils as data_utils


data_filename = 'T.csv'
inference_seed = 0
num_full_transitions = 10

data_table, row_metadata, column_metadata, header = \
        data_utils.read_data_objects(data_filename)

engine = LocalEngine(seed=inference_seed)
initial_latent_state, initial_latent_state_clustering = \
        engine.initialize(column_metadata, row_metadata, data_table)
latent_state, latent_state_clustering = engine.analyze(column_metadata,
        data_table, initial_latent_state, initial_latent_state_clustering,
        n_steps=num_full_transitions)


@@ -157,16 +157,72 @@
 s = 10%0A%0A
+# read the data table into internal json representation%0A
 data_tab
@@ -320,16 +320,62 @@
 ename)%0A%0A
+# create an engine to run analysis, inference%0A
 engine =
@@ -407,16 +407,51 @@
 ce_seed)
+%0A%0A# initialize markov chain samples
 %0Ainitial
@@ -497,24 +497,24 @@
 stering = %5C%0A
-
         engi
@@ -569,16 +569,66 @@
 a_table)
+%0A%0A# run markov chain transition kernels on samples
 %0Alatent_

add comments describing what each step is doing