예제 #1
0
 //Constructors
 /// <summary>
 /// Creates an initialized instance
 /// </summary>
 /// <param name="classificationNetworksCfg">Default classification networks settings</param>
 /// <param name="forecastNetworksCfg">Default forecast networks settings</param>
 public DefaultNetworksSettings(ClassificationNetworksSettings classificationNetworksCfg = null,
                                ForecastNetworksSettings forecastNetworksCfg             = null
                                )
 {
     ClassificationNetworksCfg = classificationNetworksCfg == null ? new ClassificationNetworksSettings() : (ClassificationNetworksSettings)classificationNetworksCfg.DeepClone();
     ForecastNetworksCfg       = forecastNetworksCfg == null ? new ForecastNetworksSettings() : (ForecastNetworksSettings)forecastNetworksCfg.DeepClone();
     return;
 }
예제 #2
0
 /// <summary>
 /// The deep copy constructor
 /// </summary>
 /// <param name="source">Source instance</param>
 public ClassificationNetworksSettings(ClassificationNetworksSettings source)
     : this()
 {
     foreach (INonRecurrentNetworkSettings netCfg in source.NetworkCfgCollection)
     {
         NetworkCfgCollection.Add((INonRecurrentNetworkSettings)netCfg.DeepClone());
     }
     return;
 }
예제 #3
0
 //Constructors
 /// <summary>
 /// Creates an initialized instance
 /// </summary>
 /// <param name="oneWinnerGroupName">Specifies membership to "one winner" group of given name or no membership if default "NA" name is used</param>
 /// <param name="networksCfg">Classifying networks settings</param>
 public ClassificationTaskSettings(string oneWinnerGroupName = DefaultOneWinnerGroupName,
                                   ClassificationNetworksSettings networksCfg = null
                                   )
 {
     OneWinnerGroupName = oneWinnerGroupName;
     NetworksCfg        = networksCfg == null ? new ClassificationNetworksSettings() : (ClassificationNetworksSettings)networksCfg.DeepClone();
     Check();
     return;
 }
예제 #4
0
        /// <summary>
        /// Creates an initialized instance.
        /// </summary>
        /// <param name="elem">Xml element containing the initialization settings</param>
        public ClassificationTaskSettings(XElement elem)
        {
            //Validation
            XElement settingsElem = Validate(elem, XsdTypeName);

            //Parsing
            OneWinnerGroupName = settingsElem.Attribute("oneWinnerGroupName").Value;
            //Networks
            XElement classificationNetworksSettingsElem = settingsElem.Elements("networks").FirstOrDefault();

            NetworksCfg = classificationNetworksSettingsElem == null ? new ClassificationNetworksSettings() : new ClassificationNetworksSettings(classificationNetworksSettingsElem);
            Check();
            return;
        }