Skip to content

Commit 6e9f223

Browse files
committed
address doc confusion #1061
1 parent 72d9820 commit 6e9f223

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docs/src/adding_models_for_general_use.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,15 @@ function RidgeRegressor(; lambda=0.0)
155155
end
156156
```
157157

158-
*Important.* The clean method must have the property that
159-
`clean!(clean!(model)) == clean!(model)` for any instance `model`.
158+
*Important.* Performing `clean!(model)` a second time should not mutate `model`. That is,
159+
this test should hold:
160+
161+
```julia
162+
clean!(model)
163+
clone = deepcopy(model)
164+
clean!(model)
165+
@test model == clone
166+
```
160167

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

0 commit comments

Comments
 (0)