@@ -118,16 +118,16 @@ public void BuildTree_ReturnsNodeWithSingleLabel_WhenAllLabelsZero()
118
118
public void Entropy_ReturnsZero_WhenAllZeroOrAllOne ( )
119
119
{
120
120
var method = typeof ( DecisionTree ) . GetMethod ( "Entropy" , System . Reflection . BindingFlags . NonPublic | System . Reflection . BindingFlags . Static ) ;
121
- Assert . That ( method ! . Invoke ( null , new object [ ] { new int [ ] { 0 , 0 , 0 } } ) , Is . EqualTo ( 0d ) ) ;
122
- Assert . That ( method ! . Invoke ( null , new object [ ] { new int [ ] { 1 , 1 , 1 } } ) , Is . EqualTo ( 0d ) ) ;
121
+ Assert . That ( method ! . Invoke ( null , new [ ] { new int [ ] { 0 , 0 , 0 } } ) , Is . EqualTo ( 0d ) ) ;
122
+ Assert . That ( method ! . Invoke ( null , new [ ] { new int [ ] { 1 , 1 , 1 } } ) , Is . EqualTo ( 0d ) ) ;
123
123
}
124
124
125
125
[ Test ]
126
126
public void MostCommon_ReturnsCorrectLabel ( )
127
127
{
128
128
var method = typeof ( DecisionTree ) . GetMethod ( "MostCommon" , System . Reflection . BindingFlags . NonPublic | System . Reflection . BindingFlags . Static ) ;
129
- Assert . That ( method ! . Invoke ( null , new object [ ] { new int [ ] { 1 , 0 , 1 , 1 , 0 , 0 , 0 } } ) , Is . EqualTo ( 0 ) ) ;
130
- Assert . That ( method ! . Invoke ( null , new object [ ] { new int [ ] { 1 , 1 , 1 , 0 } } ) , Is . EqualTo ( 1 ) ) ;
129
+ Assert . That ( method ! . Invoke ( null , new [ ] { new int [ ] { 1 , 0 , 1 , 1 , 0 , 0 , 0 } } ) , Is . EqualTo ( 0 ) ) ;
130
+ Assert . That ( method ! . Invoke ( null , new [ ] { new int [ ] { 1 , 1 , 1 , 0 } } ) , Is . EqualTo ( 1 ) ) ;
131
131
}
132
132
133
133
[ Test ]
@@ -140,7 +140,7 @@ public void Traverse_FallbacksToZero_WhenChildrenIsNull()
140
140
nodeType ! . GetProperty ( "Label" ) ! . SetValue ( node , null ) ;
141
141
nodeType ! . GetProperty ( "Children" ) ! . SetValue ( node , null ) ;
142
142
var method = typeof ( DecisionTree ) . GetMethod ( "Traverse" , System . Reflection . BindingFlags . NonPublic | System . Reflection . BindingFlags . Static ) ;
143
- Assert . That ( method ! . Invoke ( null , new object [ ] { node ! , new int [ ] { 99 } } ) , Is . EqualTo ( 0 ) ) ;
143
+ Assert . That ( method ! . Invoke ( null , new [ ] { node ! , new int [ ] { 99 } } ) , Is . EqualTo ( 0 ) ) ;
144
144
}
145
145
146
146
[ Test ]
0 commit comments