Changes between Version 1 and Version 2 of Ticket #3030
- Timestamp:
- 09/26/19 12:51:51 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #3030 – Description
v1 v2 5 5 {{{ 6 6 IRandomForestModel clonedModel = null; 7 if (original.actualModel.IsValueCreated) clonedModel = cloner.Clone(original.ActualModel); 8 actualModel = new Lazy<IRandomForestModel>(() => clonedModel ?? RecalculateModel()); 7 if (original.actualModel.IsValueCreated) 8 clonedModel = cloner.Clone(original.ActualModel); 9 actualModel = new Lazy<IRandomForestModel>(() => clonedModel ?? RecalculateModel()); 9 10 }}} 10 11 In case the cloning constructor is called immediately after creation of the surrogate Model, `IsValueCreated` is actually returning false since the Lazy object itself has not yet accessed its `Value` property.