Skip to content

Commit

Permalink
Match variable names to docs
Browse files Browse the repository at this point in the history
Update variable name style (and comments) to match docs
  • Loading branch information
abhro committed Jun 28, 2024
1 parent a9442fa commit 08a014e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/machines.jl
Original file line number Diff line number Diff line change
Expand Up @@ -580,10 +580,10 @@ or none of the following apply:
changed since the last time `mach` was trained (ie, the last time
`mach.state` was last incremented).
4. The specified `rows` have changed since the last retraining and
4. The specified `rows` have changed since the last retraining and
`mach.model` does not have `Static` type.
5. `mach.model` is a model and different from the last model used for training, but has
5. `mach.model` is a model and different from the last model used for training, but has
the same type.
6. `mach.model` is a model but has a type different from the last model used for
Expand Down Expand Up @@ -658,7 +658,7 @@ function fit_only!(
rows === nothing && (rows = (:))
rows_is_new = !isdefined(mach, :old_rows) || rows != mach.old_rows

condition_iv = rows_is_new && !(mach.model isa Static)
condition_4 = rows_is_new && !(mach.model isa Static)

upstream_has_changed = mach.old_upstream_state != upstream_state

Expand All @@ -672,16 +672,16 @@ function fit_only!(

# build or update cached `resampled_data` if necessary (`mach.data` is already defined
# above if needed here):
if cache_data && (!data_is_valid || condition_iv)
if cache_data && (!data_is_valid || condition_4)
mach.resampled_data = selectrows(model, rows, mach.data...)
end

# `fit`, `update`, or return untouched:
if mach.state == 0 || # condition (i)
force == true || # condition (ii)
upstream_has_changed || # condition (iii)
condition_iv || # condition (iv)
modeltype_changed # conditions (vi) or (vii)
if mach.state == 0 || # condition (1)
force == true || # condition (2)
upstream_has_changed || # condition (3)
condition_4 || # condition (4)
modeltype_changed # conditions (6) or (7)

isdefined(mach, :report) || (mach.report = LittleDict{Symbol,Any}())

Expand Down Expand Up @@ -709,7 +709,7 @@ function fit_only!(
rethrow()
end

elseif model != mach.old_model # condition (v)
elseif model != mach.old_model # condition (5)

# update the model:
fitlog(mach, :update, verbosity)
Expand Down

0 comments on commit 08a014e

Please sign in to comment.