@@ -528,7 +528,7 @@ private sealed class Bound : ISchemaBoundRowMapper
528
528
public ISchemaBindableMapper Bindable => _parent ;
529
529
public RoleMappedSchema InputRoleMappedSchema => _predictor . InputRoleMappedSchema ;
530
530
public Schema InputSchema => _predictor . InputSchema ;
531
- public Schema Schema { get ; }
531
+ public Schema OutputSchema { get ; }
532
532
533
533
public Bound ( IHostEnvironment env , SchemaBindableCalibratedPredictor parent , RoleMappedSchema schema )
534
534
{
@@ -537,16 +537,16 @@ public Bound(IHostEnvironment env, SchemaBindableCalibratedPredictor parent, Rol
537
537
_parent = parent ;
538
538
_predictor = _parent . _bindable . Bind ( env , schema ) as ISchemaBoundRowMapper ;
539
539
env . Check ( _predictor != null , "Predictor is not a row-to-row mapper" ) ;
540
- if ( ! _predictor . Schema . TryGetColumnIndex ( MetadataUtils . Const . ScoreValueKind . Score , out _scoreCol ) )
540
+ if ( ! _predictor . OutputSchema . TryGetColumnIndex ( MetadataUtils . Const . ScoreValueKind . Score , out _scoreCol ) )
541
541
throw env . Except ( "Predictor does not output a score" ) ;
542
- var scoreType = _predictor . Schema . GetColumnType ( _scoreCol ) ;
542
+ var scoreType = _predictor . OutputSchema . GetColumnType ( _scoreCol ) ;
543
543
env . Check ( ! scoreType . IsVector && scoreType . IsNumber ) ;
544
- Schema = Schema . Create ( new BinaryClassifierSchema ( ) ) ;
544
+ OutputSchema = Schema . Create ( new BinaryClassifierSchema ( ) ) ;
545
545
}
546
546
547
547
public Func < int , bool > GetDependencies ( Func < int , bool > predicate )
548
548
{
549
- for ( int i = 0 ; i < Schema . ColumnCount ; i ++ )
549
+ for ( int i = 0 ; i < OutputSchema . ColumnCount ; i ++ )
550
550
{
551
551
if ( predicate ( i ) )
552
552
return _predictor . GetDependencies ( col => true ) ;
@@ -562,7 +562,7 @@ public Func<int, bool> GetDependencies(Func<int, bool> predicate)
562
562
public IRow GetRow ( IRow input , Func < int , bool > predicate , out Action disposer )
563
563
{
564
564
Func < int , bool > predictorPredicate = col => false ;
565
- for ( int i = 0 ; i < Schema . ColumnCount ; i ++ )
565
+ for ( int i = 0 ; i < OutputSchema . ColumnCount ; i ++ )
566
566
{
567
567
if ( predicate ( i ) )
568
568
{
@@ -571,17 +571,17 @@ public IRow GetRow(IRow input, Func<int, bool> predicate, out Action disposer)
571
571
}
572
572
}
573
573
var predictorRow = _predictor . GetRow ( input , predictorPredicate , out disposer ) ;
574
- var getters = new Delegate [ Schema . ColumnCount ] ;
575
- for ( int i = 0 ; i < Schema . ColumnCount - 1 ; i ++ )
574
+ var getters = new Delegate [ OutputSchema . ColumnCount ] ;
575
+ for ( int i = 0 ; i < OutputSchema . ColumnCount - 1 ; i ++ )
576
576
{
577
577
var type = predictorRow . Schema . GetColumnType ( i ) ;
578
578
if ( ! predicate ( i ) )
579
579
continue ;
580
580
getters [ i ] = Utils . MarshalInvoke ( GetPredictorGetter < int > , type . RawType , predictorRow , i ) ;
581
581
}
582
- if ( predicate ( Schema . ColumnCount - 1 ) )
583
- getters [ Schema . ColumnCount - 1 ] = GetProbGetter ( predictorRow ) ;
584
- return new SimpleRow ( Schema , predictorRow , getters ) ;
582
+ if ( predicate ( OutputSchema . ColumnCount - 1 ) )
583
+ getters [ OutputSchema . ColumnCount - 1 ] = GetProbGetter ( predictorRow ) ;
584
+ return new SimpleRow ( OutputSchema , predictorRow , getters ) ;
585
585
}
586
586
587
587
private Delegate GetPredictorGetter < T > ( IRow input , int col )
@@ -728,7 +728,7 @@ private static bool NeedCalibration(IHostEnvironment env, IChannel ch, ICalibrat
728
728
729
729
var bindable = ScoreUtils . GetSchemaBindableMapper ( env , predictor ) ;
730
730
var bound = bindable . Bind ( env , schema ) ;
731
- var outputSchema = bound . Schema ;
731
+ var outputSchema = bound . OutputSchema ;
732
732
int scoreCol ;
733
733
if ( ! outputSchema . TryGetColumnIndex ( MetadataUtils . Const . ScoreValueKind . Score , out scoreCol ) )
734
734
{
0 commit comments