Exemplo n.º 1
0
        public double[][] GenerateInputData()
        {
            var result      = new double[_data.Count][];
            int rawColCount = _config.DetermineRawInputCount();
            int colCount    = _headers.Count;

            for (int row = 0; row < _data.Count; row++)
            {
                result[row] = new double[rawColCount];

                int targetIndex = 0;
                for (int col = 0; col < colCount; col++)
                {
                    string columnName = _headers[col];
                    if (string.Compare(columnName, _config.PredictField, true) != 0)
                    {
                        DataField df = _config.FieldMap[columnName];
                        targetIndex = df.Normalize(result[row], targetIndex, _data[row][col]);
                    }
                }
                Console.WriteLine(targetIndex);
            }

            return(result);
        }