lib/tomoto/ct.rb in tomoto-0.1.0 vs lib/tomoto/ct.rb in tomoto-0.1.1

- old
+ new

@@ -5,7 +5,20 @@ model.instance_variable_set(:@min_cf, min_cf) model.instance_variable_set(:@min_df, min_df) model.instance_variable_set(:@rm_top, rm_top) model end + + def correlations(topic_id = nil) + prepare + if topic_id + _correlations(topic_id) + else + k.times.map { |i| _correlations(i) } + end + end + + def prior_cov + _prior_cov.each_slice(k).to_a + end end end