Exemplo n.º 1
0
 //Constructors
 /// <summary>
 /// Creates an unitialized instance
 /// </summary>
 /// <param name="crossvalidationCfg">The crossvalidation configuration.</param>
 /// <param name="clustersCfg">The configuration of the clusters in the chain.</param>
 public TNRNetClusterChainSingleBoolSettings(CrossvalidationSettings crossvalidationCfg,
                                             TNRNetClustersSingleBoolSettings clustersCfg
                                             )
 {
     CrossvalidationCfg = (CrossvalidationSettings)crossvalidationCfg.DeepClone();
     ClustersCfg        = (TNRNetClustersSingleBoolSettings)clustersCfg.DeepClone();
     Check();
     return;
 }
 //Constructors
 /// <summary>
 /// Creates an unitialized instance.
 /// </summary>
 /// <param name="crossvalidationCfg">The crossvalidation configuration.</param>
 /// <param name="clustersCfg">The configuration of the clusters in the chain.</param>
 public TNRNetClusterChainProbabilisticSettings(CrossvalidationSettings crossvalidationCfg,
                                                TNRNetClustersProbabilisticSettings clustersCfg
                                                )
 {
     CrossvalidationCfg = (CrossvalidationSettings)crossvalidationCfg.DeepClone();
     ClustersCfg        = (TNRNetClustersProbabilisticSettings)clustersCfg.DeepClone();
     Check();
     return;
 }
        /// <summary>
        /// Creates an initialized instance.
        /// </summary>
        /// <param name="elem">A xml element containing the configuration data.</param>
        public TNRNetClusterChainProbabilisticSettings(XElement elem)
        {
            //Validation
            XElement settingsElem = Validate(elem, XsdTypeName);

            //Parsing
            CrossvalidationCfg = new CrossvalidationSettings(settingsElem.Element("crossvalidation"));
            ClustersCfg        = new TNRNetClustersProbabilisticSettings(settingsElem.Element("clusters"));
            Check();
            return;
        }
Exemplo n.º 4
0
 //Constructor
 /// <summary>
 /// Creates an initialized instance.
 /// </summary>
 /// <param name="clusterName">The name of the cluster to be built.</param>
 /// <param name="crossvalidationCfg">The crossvalidation configuration.</param>
 /// <param name="clusterCfg">The configuration of the cluster to be built.</param>
 /// <param name="rand">The random generator to be used (optional).</param>
 /// <param name="controller">The network build process controller (optional).</param>
 public TNRNetClusterBuilder(string clusterName,
                             CrossvalidationSettings crossvalidationCfg,
                             ITNRNetClusterSettings clusterCfg,
                             Random rand = null,
                             TNRNetBuilder.BuildControllerDelegate controller = null
                             )
 {
     _clusterName        = clusterName;
     _crossvalidationCfg = crossvalidationCfg;
     _clusterCfg         = clusterCfg;
     _rand       = rand ?? new Random(0);
     _controller = controller;
     ResetProgressTracking();
     return;
 }
Exemplo n.º 5
0
 /// <summary>
 /// The copy constructor.
 /// </summary>
 /// <param name="source">The source instance.</param>
 public CrossvalidationSettings(CrossvalidationSettings source)
     : this(source.FoldDataRatio, source.Folds, source.Repetitions)
 {
     return;
 }