Sha256: 6c0a3e84f8c6c5f57a8ed2f99953528ddae6f9c29d1d92806e289af0e4444107

Contents?: true

Size: 578 Bytes

Versions: 2

Compression:

Stored size: 578 Bytes

Contents

module Tomoto
  class GDMR
    def self.new(tw: :one, min_cf: 0, min_df: 0, rm_top: 0, k: 1, degrees: [], alpha: 0.1, eta: 0.01, sigma: 1.0, sigma0: 3.0, alpha_epsilon: 1e-10, seed: nil)
      model = _new(to_tw(tw), k, degrees, alpha, sigma, sigma0, eta, alpha_epsilon, seed || -1)
      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

    def add_doc(doc, metadata: [])
      _add_doc(prepare_doc(doc), metadata)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tomoto-0.1.4 lib/tomoto/gdmr.rb
tomoto-0.1.3 lib/tomoto/gdmr.rb