Share via


StatefulCustomMappingEstimator<TSrc,TDst,TState> 類別

定義

將自訂對應函式套用至指定的輸入資料行,同時允許個別資料指標狀態。 結果將會在輸出資料行中。

public sealed class StatefulCustomMappingEstimator<TSrc,TDst,TState> : Microsoft.ML.Data.TrivialEstimator<Microsoft.ML.Transforms.StatefulCustomMappingTransformer<TSrc,TDst,TState>> where TSrc : class, new() where TDst : class, new() where TState : class, new()
type StatefulCustomMappingEstimator<'Src, 'Dst, 'State (requires 'Src : null and 'Src : (new : unit -> 'Src) and 'Dst : null and 'Dst : (new : unit -> 'Dst) and 'State : null and 'State : (new : unit -> 'State))> = class
    inherit TrivialEstimator<StatefulCustomMappingTransformer<'Src, 'Dst, 'State>>
Public NotInheritable Class StatefulCustomMappingEstimator(Of TSrc, TDst, TState)
Inherits TrivialEstimator(Of StatefulCustomMappingTransformer(Of TSrc, TDst, TState))

類型參數

TSrc
TDst
TState
繼承
StatefulCustomMappingEstimator<TSrc,TDst,TState>

備註

估算器特性

此估算器是否需要查看資料來定型其參數?
輸入資料行資料類型 任何
輸出資料行資料類型 任何
可匯出至 ONNX

產生的 StatefulCustomMappingTransformer<TSrc,TDst,TState> 會將使用者定義的對應套用至一或多個輸入資料行,並產生一或多個輸出資料行。 此轉換不會變更資料列數目,而且可視為將使用者的函式套用至輸入資料的每個資料列的結果。

除了輸入和輸出物件之外,提供的自訂函式還會提供可查看和/或修改的狀態物件。

如需使用範例的連結,請參閱另請參閱一節。

方法

Fit(IDataView)

將自訂對應函式套用至指定的輸入資料行,同時允許個別資料指標狀態。 結果將會在輸出資料行中。

(繼承來源 TrivialEstimator<TTransformer>)
GetOutputSchema(SchemaShape)

SchemaShape 回由轉換器產生之架構的 。 用於管線中的架構傳播和驗證。

擴充方法

AppendCacheCheckpoint<TTrans>(IEstimator<TTrans>, IHostEnvironment)

將「快取檢查點」附加至估算器鏈結。 這可確保下游估算器會針對快取的資料定型。 在接受多個資料通過的定型器之前,擁有快取檢查點會很有説明。

WithOnFitDelegate<TTransformer>(IEstimator<TTransformer>, Action<TTransformer>)

假設有估算器,則會傳回包裝物件,一旦 Fit(IDataView) 呼叫委派即可。 估算器通常必須傳回符合專案的相關資訊,這就是方法 Fit(IDataView) 傳回特定型別物件的原因,而不是只傳回一般 ITransformer 。 不過,同時 IEstimator<TTransformer> ,通常會形成具有許多物件的管線,因此我們可能需要透過 EstimatorChain<TLastTransformer> 建置估算器的鏈結,而我們想要取得轉換器的估算器會在此鏈結的某處被隱藏。 在該案例中,我們可以透過此方法附加呼叫一次將會呼叫的委派。

適用於

另請參閱