Class: Tomoto::MGLDA

Inherits:
Object
  • Object
show all
Defined in:
lib/tomoto/mglda.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(tw: :one, min_cf: 0, min_df: 0, rm_top: 0, k_g: 1, k_l: 1, t: 3, alpha_g: 0.1, alpha_l: 0.1, alpha_mg: 0.1, alpha_ml: 0.1, eta_g: 0.01) ⇒ Object

, eta_l: 0.01, gamma: 0.1, seed: nil)



3
4
5
6
7
8
9
# File 'lib/tomoto/mglda.rb', line 3

def self.new(tw: :one, min_cf: 0, min_df: 0, rm_top: 0, k_g: 1, k_l: 1, t: 3, alpha_g: 0.1, alpha_l: 0.1, alpha_mg: 0.1, alpha_ml: 0.1, eta_g: 0.01) #, eta_l: 0.01, gamma: 0.1, seed: nil)
  model = _new(to_tw(tw), k_g, k_l, t, alpha_g, alpha_l, alpha_mg, alpha_ml, eta_g)
  model.instance_variable_set(:@min_cf, min_cf)
  model.instance_variable_set(:@min_df, min_df)
  model.instance_variable_set(:@rm_top, rm_top)
  init_params(model, binding)
end

Instance Method Details

#add_doc(doc, delimiter: ".") ⇒ Object



11
12
13
# File 'lib/tomoto/mglda.rb', line 11

def add_doc(doc, delimiter: ".")
  _add_doc(prepare_doc(doc), delimiter)
end