public Mapper(IHostEnvironment env, SrCnnTransformBase <TInput, TState> parent, DataViewSchema inputSchema)
            {
                Contracts.CheckValue(env, nameof(env));
                _host = env.Register(nameof(Mapper));
                _host.CheckValue(inputSchema, nameof(inputSchema));
                _host.CheckValue(parent, nameof(parent));

                if (!inputSchema.TryGetColumnIndex(parent.InputColumnName, out _inputColumnIndex))
                {
                    throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", parent.InputColumnName);
                }

                var colType = inputSchema[_inputColumnIndex].Type;

                if (colType != NumberDataViewType.Single)
                {
                    throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", parent.InputColumnName, "Single", colType.ToString());
                }

                _parent       = parent;
                _parentSchema = inputSchema;
                _slotNames    = new VBuffer <ReadOnlyMemory <char> >(_parent.OutputLength, new[] { "Alert".AsMemory(), "Raw Score".AsMemory(),
                                                                                                   "Mag".AsMemory() });

                State = (SrCnnStateBase)_parent.StateRef;
            }
 private protected sealed override void InitializeStateCore(bool disk = false)
 {
     Parent = (SrCnnTransformBase <TInput, TState>)ParentTransform;
 }