Class: FsrsRuby::Parameters
- Inherits:
-
Object
- Object
- FsrsRuby::Parameters
- Defined in:
- lib/fsrs_ruby/models.rb
Overview
Parameters class for FSRS parameters
Instance Attribute Summary collapse
-
#enable_fuzz ⇒ Object
Returns the value of attribute enable_fuzz.
-
#enable_short_term ⇒ Object
Returns the value of attribute enable_short_term.
-
#learning_steps ⇒ Object
Returns the value of attribute learning_steps.
-
#maximum_interval ⇒ Object
Returns the value of attribute maximum_interval.
-
#relearning_steps ⇒ Object
Returns the value of attribute relearning_steps.
-
#request_retention ⇒ Object
Returns the value of attribute request_retention.
-
#w ⇒ Object
Returns the value of attribute w.
Instance Method Summary collapse
-
#initialize(request_retention: Constants::DEFAULT_REQUEST_RETENTION, maximum_interval: Constants::DEFAULT_MAXIMUM_INTERVAL, w: Constants::DEFAULT_WEIGHTS.dup, enable_fuzz: Constants::DEFAULT_ENABLE_FUZZ, enable_short_term: Constants::DEFAULT_ENABLE_SHORT_TERM, learning_steps: Constants::DEFAULT_LEARNING_STEPS.dup, relearning_steps: Constants::DEFAULT_RELEARNING_STEPS.dup) ⇒ Parameters
constructor
A new instance of Parameters.
- #to_h ⇒ Object
Constructor Details
#initialize(request_retention: Constants::DEFAULT_REQUEST_RETENTION, maximum_interval: Constants::DEFAULT_MAXIMUM_INTERVAL, w: Constants::DEFAULT_WEIGHTS.dup, enable_fuzz: Constants::DEFAULT_ENABLE_FUZZ, enable_short_term: Constants::DEFAULT_ENABLE_SHORT_TERM, learning_steps: Constants::DEFAULT_LEARNING_STEPS.dup, relearning_steps: Constants::DEFAULT_RELEARNING_STEPS.dup) ⇒ Parameters
Returns a new instance of Parameters.
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/fsrs_ruby/models.rb', line 176 def initialize( request_retention: Constants::DEFAULT_REQUEST_RETENTION, maximum_interval: Constants::DEFAULT_MAXIMUM_INTERVAL, w: Constants::DEFAULT_WEIGHTS.dup, enable_fuzz: Constants::DEFAULT_ENABLE_FUZZ, enable_short_term: Constants::DEFAULT_ENABLE_SHORT_TERM, learning_steps: Constants::DEFAULT_LEARNING_STEPS.dup, relearning_steps: Constants::DEFAULT_RELEARNING_STEPS.dup ) @request_retention = request_retention @maximum_interval = maximum_interval @w = w @enable_fuzz = enable_fuzz @enable_short_term = enable_short_term @learning_steps = learning_steps @relearning_steps = relearning_steps end |
Instance Attribute Details
#enable_fuzz ⇒ Object
Returns the value of attribute enable_fuzz.
173 174 175 |
# File 'lib/fsrs_ruby/models.rb', line 173 def enable_fuzz @enable_fuzz end |
#enable_short_term ⇒ Object
Returns the value of attribute enable_short_term.
173 174 175 |
# File 'lib/fsrs_ruby/models.rb', line 173 def enable_short_term @enable_short_term end |
#learning_steps ⇒ Object
Returns the value of attribute learning_steps.
173 174 175 |
# File 'lib/fsrs_ruby/models.rb', line 173 def learning_steps @learning_steps end |
#maximum_interval ⇒ Object
Returns the value of attribute maximum_interval.
173 174 175 |
# File 'lib/fsrs_ruby/models.rb', line 173 def maximum_interval @maximum_interval end |
#relearning_steps ⇒ Object
Returns the value of attribute relearning_steps.
173 174 175 |
# File 'lib/fsrs_ruby/models.rb', line 173 def relearning_steps @relearning_steps end |
#request_retention ⇒ Object
Returns the value of attribute request_retention.
173 174 175 |
# File 'lib/fsrs_ruby/models.rb', line 173 def request_retention @request_retention end |
#w ⇒ Object
Returns the value of attribute w.
173 174 175 |
# File 'lib/fsrs_ruby/models.rb', line 173 def w @w end |
Instance Method Details
#to_h ⇒ Object
194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/fsrs_ruby/models.rb', line 194 def to_h { request_retention: @request_retention, maximum_interval: @maximum_interval, w: @w, enable_fuzz: @enable_fuzz, enable_short_term: @enable_short_term, learning_steps: @learning_steps, relearning_steps: @relearning_steps } end |