コード例 #1
0
        public BayesianNetworkClassifier(DataMining.Data.Metadata metadata, List <VariableTypeAssignment> variableTypeList)
        {
            this._metadata = metadata;
            List <DataMining.Data.Attribute> attributes = new List <DataMining.Data.Attribute>(this._metadata.Attributes);

            attributes.Add(this._metadata.Target);
            this.SetVariables(attributes);
            this._edges = new bool[this._variables.Length, this._variables.Length];

            int classVariableIndex = this._metadata.Target.Index;

            this._variableTypeAssignments = variableTypeList;

            foreach (VariableTypeAssignment assignment in variableTypeList)
            {
                if (assignment.Type == VariableType.Cause)
                {
                    this.Connect(assignment.VariableIndex, classVariableIndex);
                }
                else if (assignment.Type == VariableType.Effect)
                {
                    this.Connect(classVariableIndex, assignment.VariableIndex);
                }
            }
        }
コード例 #2
0
 public BayesianNetworkClassifier(DataMining.Data.Metadata metadata, List <VariableTypeAssignment> VariableTypeAssignments, List <Edge> edges)
     : this(metadata, VariableTypeAssignments)
 {
     foreach (Edge edge in edges)
     {
         this.Connect(edge.ParentIndex, edge.ChildIndex);
     }
 }
コード例 #3
0
ファイル: BayesianNetwork.cs プロジェクト: skn123/iFourmi
 public BayesianNetwork(DataMining.Data.Metadata metadata, List <Edge> edges)
     : this(metadata)
 {
     foreach (Edge edge in edges)
     {
         this.Connect(edge.ParentIndex, edge.ChildIndex);
     }
 }
コード例 #4
0
ファイル: BayesianNetwork.cs プロジェクト: skn123/iFourmi
        public BayesianNetwork(DataMining.Data.Metadata metasata)
        {
            this._metadata = metasata;
            List <DataMining.Data.Attribute> attributes = new List <DataMining.Data.Attribute>(this._metadata.Attributes);

            this.SetVariables(attributes);
            this._edges = new bool[this._variables.Length, this._variables.Length];
        }
コード例 #5
0
        public BayesianNetworkClassifier(DataMining.Data.Metadata metadata)
        {
            this._metadata = metadata;
            List <DataMining.Data.Attribute> attributes = new List <DataMining.Data.Attribute>(this._metadata.Attributes);

            attributes.Add(this._metadata.Target);
            this.SetVariables(attributes);
            this._edges = new bool[this._variables.Length, this._variables.Length];

            this._variableTypeAssignments = new List <VariableTypeAssignment>();

            for (int childIndex = 0; childIndex < this._edges.GetLength(1); childIndex++)
            {
                if (childIndex != this._metadata.Target.Index)
                {
                    this.Connect(this._metadata.Target.Index, childIndex);
                    this._variableTypeAssignments.Add(new VariableTypeAssignment(childIndex, VariableType.Effect));
                }
            }
        }
コード例 #6
0
 public BayesianMultinetClassifier(DataMining.Data.Metadata metadata)
 {
     this._bayesianNetworks = new Dictionary <int, BayesianNetwork>();
     this._metadata         = metadata;
 }
コード例 #7
0
 private BayesianClusterMultinetClassifier(DataMining.Data.Metadata metadata, ClusteringSolution clusteringSolution)
 {
     this._bayesianNetworkClassfiers = new Dictionary <int, BayesianNetworkClassifier>();
     this._metadata           = metadata;
     this._clusteringSolution = clusteringSolution;
 }