Пример #1
0
        /// <summary>
        /// Generate filenames.
        /// </summary>
        ///
        /// <param name="rawFile">The raw filename.</param>
        private void GenerateFilenames(FileInfo rawFile)
        {
            _filenameRaw      = rawFile.Name;
            _filenameNorm     = FileUtil.AddFilenameBase(rawFile, "_norm").Name;
            _filenameRandom   = FileUtil.AddFilenameBase(rawFile, "_random").Name;
            _filenameTrain    = FileUtil.AddFilenameBase(rawFile, "_train").Name;
            _filenameEval     = FileUtil.AddFilenameBase(rawFile, "_eval").Name;
            _filenameEvalNorm = FileUtil.AddFilenameBase(rawFile, "_eval_norm").Name;
            _filenameTrainSet = FileUtil.ForceExtension(_filenameTrain,
                                                        "egb");
            _filenameMl      = FileUtil.ForceExtension(_filenameTrain, "eg");
            _filenameOutput  = FileUtil.AddFilenameBase(rawFile, "_output").Name;
            _filenameBalance = FileUtil.AddFilenameBase(rawFile, "_balance").Name;
            _filenameCluster = FileUtil.AddFilenameBase(rawFile, "_cluster").Name;

            ScriptProperties p = _script.Properties;

            p.SetFilename(FileRaw, _filenameRaw);
            if (_taskNormalize)
            {
                p.SetFilename(FileNormalize, _filenameNorm);
            }

            if (_taskRandomize)
            {
                p.SetFilename(FileRandom, _filenameRandom);
            }

            if (_taskCluster)
            {
                p.SetFilename(FileCluster, _filenameCluster);
            }

            if (_taskSegregate)
            {
                p.SetFilename(FileTrain, _filenameTrain);
                p.SetFilename(FileEval, _filenameEval);
                p.SetFilename(FileEvalNorm, _filenameEvalNorm);
            }

            if (_taskBalance)
            {
                p.SetFilename(FileBalance, _filenameBalance);
            }

            p.SetFilename(FileTrainset, _filenameTrainSet);
            p.SetFilename(FileMl, _filenameMl);
            p.SetFilename(FileOutput, _filenameOutput);
        }