Skip to content

Commit

Permalink
address doc confusion #1061
Browse files Browse the repository at this point in the history
  • Loading branch information
ablaom committed Oct 10, 2023
1 parent 72d9820 commit 6e9f223
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docs/src/adding_models_for_general_use.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,15 @@ function RidgeRegressor(; lambda=0.0)
end
```

*Important.* The clean method must have the property that
`clean!(clean!(model)) == clean!(model)` for any instance `model`.
*Important.* Performing `clean!(model)` a second time should not mutate `model`. That is,
this test should hold:

```julia
clean!(model)
clone = deepcopy(model)
clean!(model)
@test model == clone
```

Although not essential, try to avoid `Union` types for model
fields. For example, a field declaration `features::Vector{Symbol}`
Expand Down

0 comments on commit 6e9f223

Please sign in to comment.