IRowToRowMapper Interface

Definition

This interface maps an input DataViewRow to an output DataViewRow. Typically, the output contains both the input columns and new columns added by the implementing class, although some implementations may return a subset of the input columns. This interface is similar to Microsoft.ML.Data.ISchemaBoundRowMapper, except it does not have any input role mappings, so to rebind, the same input column names must be used. Implementations of this interface are typically created over defined input DataViewSchema.

public interface IRowToRowMapper
type IRowToRowMapper = interface
Public Interface IRowToRowMapper

Properties

InputSchema

Mappers are defined as accepting inputs with this very specific schema.

OutputSchema

Gets an instance of DataViewSchema which describes the columns' names and types in the output generated by this mapper.

Methods

GetDependencies(IEnumerable<DataViewSchema.Column>)

Given a set of columns, return the input columns that are needed to generate those output columns.

GetRow(DataViewRow, IEnumerable<DataViewSchema.Column>)

Get an DataViewRow with the indicated active columns, based on the input input. Getting values on inactive columns of the returned row will throw.

The Schema of input should be the same object as InputSchema. Implementors of this method should throw if that is not the case. Conversely, the returned value must have the same schema as OutputSchema.

This method creates a live connection between the input DataViewRow and the output DataViewRow. In particular, when the getters of the output DataViewRow are invoked, they invoke the getters of the input row and base the output values on the current values of the input DataViewRow. The output DataViewRow values are re-computed when requested through the getters. Also, the returned DataViewRow will dispose input when it is disposed.

Applies to