/// <summary>
        /// Loads the specified output filename.
        /// </summary>
        /// <param name="outputFilename">The output filename.</param>
        /// <param name="folder">The folder.</param>
        /// <param name="logger">The logger.</param>
        /// <param name="loadData">if set to <c>true</c> [load data].</param>
        /// <returns></returns>
        public static FeatureWeightModel Load(String outputFilename, folderNode folder, ILogBuilder logger, Boolean loadData = true)
        {
            String p_m = FeatureWeightModel.GetModelDefinitionFilename(outputFilename, folder);

            String p_d = FeatureWeightModel.GetModelDataFilename(outputFilename, folder);

            FeatureWeightModel output = objectSerialization.loadObjectFromXML <FeatureWeightModel>(p_m, logger);

            if (loadData)
            {
                WeightingModelDataSet dataset = objectSerialization.loadObjectFromXML <WeightingModelDataSet>(p_d, logger);
                output.LoadModelDataSet(dataset, logger);
            }

            return(output);
        }
        /// <summary>
        /// Saves the specified output filename.
        /// </summary>
        /// <param name="outputFilename">The output filename.</param>
        /// <param name="folder">The folder.</param>
        /// <param name="logger">The logger.</param>
        public void Save(String outputFilename, folderNode folder, ILogBuilder logger)
        {
            String p_m = FeatureWeightModel.GetModelDefinitionFilename(outputFilename, folder);

            String p_d = FeatureWeightModel.GetModelDataFilename(outputFilename, folder);

            //  String p_f = FeatureWeightModel.GetSelectedFeaturesDataFilename(outputFilename, folder);

            Toolkit.Weighting.Data.WeightingModelDataSet dataset = SaveModelDataSet(logger);

            String xmlModel = objectSerialization.ObjectToXML(this);


            String xmlData = objectSerialization.ObjectToXML(dataset);

            var p_fi = p_m.getWritableFile(imbSCI.Data.enums.getWritableFileMode.existing, logger);

            File.WriteAllText(p_fi.FullName, xmlModel);


            var d_fi = p_d.getWritableFile(imbSCI.Data.enums.getWritableFileMode.existing, logger);

            File.WriteAllText(d_fi.FullName, xmlData);



            //var d_sf = p_f.getWritableFile(imbSCI.Data.enums.getWritableFileMode.existing, logger);

            //File.WriteAllText(d_sf.FullName, xmlData);

            /*
             * corpusOperation.weightModel.saveObjectToXML(
             *  notes.folder.pathFor(setup.OutputFilename.ensureEndsWith("_model.xml"), imbSCI.Data.enums.getWritableFileMode.autoRenameThis, "Weight model [" + corpusOperation.weightModel.shortName + "]"));
             *
             * dataset.saveObjectToXML(notes.folder.pathFor(setup.OutputFilename.ensureEndsWith("_data.xml"), imbSCI.Data.enums.getWritableFileMode.autoRenameThis, "Weight model [" + corpusOperation.weightModel.shortName + "]"));
             */
        }