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); } } }
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); } }
public BayesianNetwork(DataMining.Data.Metadata metadata, List <Edge> edges) : this(metadata) { foreach (Edge edge in edges) { this.Connect(edge.ParentIndex, edge.ChildIndex); } }
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]; }
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)); } } }
public BayesianMultinetClassifier(DataMining.Data.Metadata metadata) { this._bayesianNetworks = new Dictionary <int, BayesianNetwork>(); this._metadata = metadata; }
private BayesianClusterMultinetClassifier(DataMining.Data.Metadata metadata, ClusteringSolution clusteringSolution) { this._bayesianNetworkClassfiers = new Dictionary <int, BayesianNetworkClassifier>(); this._metadata = metadata; this._clusteringSolution = clusteringSolution; }