public Row GetRow(Row input, Func <int, bool> predicate) { Contracts.AssertValue(input); Contracts.AssertValue(predicate); var getters = new Delegate[1]; if (predicate(0)) { getters[0] = _parent.GetPredictionGetter(input, InputRoleMappedSchema.Feature.Value.Index); } return(new SimpleRow(OutputSchema, input, getters)); }
DataViewRow ISchemaBoundRowMapper.GetRow(DataViewRow input, IEnumerable <DataViewSchema.Column> activeColumns) { Contracts.AssertValue(input); Contracts.AssertValue(activeColumns); var getters = new Delegate[1]; if (activeColumns.Select(c => c.Index).Contains(0)) { getters[0] = _parent.GetPredictionGetter(input, InputRoleMappedSchema.Feature.Value.Index); } return(new SimpleRow(OutputSchema, input, getters)); }