Module: Nimbus

Defined in:
lib/nimbus.rb,
lib/nimbus/tree.rb,
lib/nimbus/forest.rb,
lib/nimbus/version.rb,
lib/nimbus/exceptions.rb,
lib/nimbus/individual.rb,
lib/nimbus/application.rb,
lib/nimbus/training_set.rb,
lib/nimbus/configuration.rb,
lib/nimbus/loss_functions.rb,
lib/nimbus/regression_tree.rb,
lib/nimbus/classification_tree.rb

Overview

Nimbus module. Used as a namespace containing all the Nimbus code. The module defines a Nimbus::Application and interacts with the user output console.

Defined Under Namespace

Modules: LossFunctions Classes: Application, ClassificationTree, Configuration, ConfigurationError, Error, Forest, ForestError, Individual, IndividualError, InputFileError, InvalidOptionError, RegressionTree, TrainingSet, Tree, TreeError, WrongFormatFileError

Constant Summary collapse

STDERR =
$stderr
STDOUT =
$stdout
VERSION =
"2.4.1"

Class Method Summary collapse

Class Method Details

.applicationObject

Current Nimbus Application



29
30
31
# File 'lib/nimbus.rb', line 29

def application
  @application ||= ::Nimbus::Application.new
end

.application=(app) ⇒ Object

Set the current Nimbus application object.



34
35
36
# File 'lib/nimbus.rb', line 34

def application=(app)
  @application = app
end

.clear_line!Object

Clear current console line



60
61
62
# File 'lib/nimbus.rb', line 60

def clear_line!
  print "\r\e[2K"
end

.error_message(msg) ⇒ Object

Writes message to the error output



50
51
52
# File 'lib/nimbus.rb', line 50

def error_message(msg)
  STDERR.puts msg
end

.message(msg) ⇒ Object

Writes message to the standard output



45
46
47
# File 'lib/nimbus.rb', line 45

def message(msg)
  STDOUT.puts msg
end

.stop(msg = "Error: Nimbus finished.") ⇒ Object

Stops the execution of the Nimbus application.



39
40
41
42
# File 'lib/nimbus.rb', line 39

def stop(msg = "Error: Nimbus finished.")
  self.error_message msg
  exit(false)
end

.write(str) ⇒ Object

Writes to the standard output



55
56
57
# File 'lib/nimbus.rb', line 55

def write(str)
  STDOUT.write str
end