Ejemplo n.º 1
0
        /// <summary>
        /// Generates xml element containing the settings.
        /// </summary>
        /// <param name="rootElemName">Name to be used as a name of the root element.</param>
        /// <param name="suppressDefaults">Specifies whether to ommit optional nodes having set default values</param>
        /// <returns>XElement containing the settings</returns>
        public override XElement GetXml(string rootElemName, bool suppressDefaults)
        {
            XElement rootElem = new XElement(rootElemName, new XAttribute("attemptEpochs", NumOfAttemptEpochs.ToString(CultureInfo.InvariantCulture)));

            if (!suppressDefaults || !IsDefaultLambdaSeeker)
            {
                rootElem.Add(LambdaSeekerCfg.GetXml("lambda", suppressDefaults));
            }
            Validate(rootElem, XsdTypeName);
            return(rootElem);
        }
Ejemplo n.º 2
0
        //Methods
        /// <summary>
        /// See the base.
        /// </summary>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            RidgeRegrTrainerSettings cmpSettings = obj as RidgeRegrTrainerSettings;

            if (NumOfAttemptEpochs != cmpSettings.NumOfAttemptEpochs ||
                !LambdaSeekerCfg.Equals(cmpSettings.LambdaSeekerCfg)
                )
            {
                return(false);
            }
            return(true);
        }