Module: Supervised_Util

Instance Method Summary collapse

Instance Method Details

#data(instances) ⇒ Object



14
15
16
17
# File 'lib/ruby-band/weka/filters/supervised/supervised_utils.rb', line 14

def data(instances)
  setInputFormat(instances)
  @input = instances
end

#descriptionObject



19
20
21
# File 'lib/ruby-band/weka/filters/supervised/supervised_utils.rb', line 19

def description
  globalInfo
end

#filter_options(options_string) ⇒ Object



9
10
11
12
# File 'lib/ruby-band/weka/filters/supervised/supervised_utils.rb', line 9

def filter_options(options_string)
  options = Utils.splitOptions(options_string)
  setOptions(options)
end

#options_listObject

Instance methods list



5
6
7
# File 'lib/ruby-band/weka/filters/supervised/supervised_utils.rb', line 5

def options_list
  listOptions.map {|key| "#{key.synopsis} #{key.description}"}.join("\n")
end

#set(&block) ⇒ Object



32
33
34
# File 'lib/ruby-band/weka/filters/supervised/supervised_utils.rb', line 32

def set(&block)
  self.instance_eval(&block)
end

#use(*args) ⇒ Object

*args is an optional Instances data object



24
25
26
27
28
29
30
# File 'lib/ruby-band/weka/filters/supervised/supervised_utils.rb', line 24

def use(*args)
  if args[0]
    Filter.useFilter(args[0],self)
  else
    Filter.useFilter(@input,self)
  end
end