66using Microsoft . ML ;
77using Microsoft . ML . CommandLine ;
88using Microsoft . ML . EntryPoints ;
9- using Microsoft . ML . Internal . Internallearn ;
9+ using Microsoft . ML . Trainers . FastTree ;
1010using Float = System . Single ;
1111
1212[ assembly: LoadableClass ( typeof ( TolerantEarlyStoppingCriterion ) , typeof ( TolerantEarlyStoppingCriterion . Options ) , typeof ( SignatureEarlyStoppingCriterion ) , "Tolerant (TR)" , "tr" ) ]
2121[ assembly: EntryPointModule ( typeof ( PQEarlyStoppingCriterion ) ) ]
2222[ assembly: EntryPointModule ( typeof ( UPEarlyStoppingCriterion ) ) ]
2323
24- namespace Microsoft . ML . Internal . Internallearn
24+ namespace Microsoft . ML . Trainers . FastTree
2525{
2626 internal delegate void SignatureEarlyStoppingCriterion ( bool lowerIsBetter ) ;
2727
2828 // These criteria will be used in FastTree and NeuralNets.
29- public interface IEarlyStoppingCriterion
29+ public abstract class IEarlyStoppingCriterion
3030 {
3131 /// <summary>
3232 /// Check if the learning should stop or not.
@@ -35,7 +35,7 @@ public interface IEarlyStoppingCriterion
3535 /// <param name="trainingScore">A non negative number. Higher score means better result unless "_lowerIsBetter" is true.</param>
3636 /// <param name="isBestCandidate">True if the current result is the best ever.</param>
3737 /// <returns>If true, the learning should stop.</returns>
38- bool CheckScore ( Float validationScore , Float trainingScore , out bool isBestCandidate ) ;
38+ public abstract bool CheckScore ( Float validationScore , Float trainingScore , out bool isBestCandidate ) ;
3939 }
4040
4141 [ TlcModule . ComponentKind ( "EarlyStoppingCriterion" ) ]
@@ -69,8 +69,6 @@ internal EarlyStoppingCriterion(TOptions options, bool lowerIsBetter)
6969 _bestScore = LowerIsBetter ? Float . PositiveInfinity : Float . NegativeInfinity ;
7070 }
7171
72- public abstract bool CheckScore ( Float validationScore , Float trainingScore , out bool isBestCandidate ) ;
73-
7472 /// <summary>
7573 /// Check if the given score is the best ever. The best score will be stored at this._bestScore.
7674 /// </summary>
0 commit comments