public MiningAttributeCollection GetAttributes(MiningFeatureSelection filter) { if (filter == MiningFeatureSelection.All) { return(this.Attributes); } return(new MiningAttributeCollection(this, filter)); }
internal MiningAttribute(MiningModel parentModel) { this.attributeID = -1; this.parentModel = parentModel; this.name = ""; this.shortName = ""; this.valueColumn = null; this.keyColumn = null; this.featureSelection = MiningFeatureSelection.NotSelected; }
private void FilterCollection(MiningAttributeCollection parentCollection, MiningFeatureSelection filter) { MiningAttributeCollection.Enumerator enumerator = parentCollection.GetEnumerator(); while (enumerator.MoveNext()) { MiningAttribute current = enumerator.Current; bool flag = false; switch (filter) { case MiningFeatureSelection.All: flag = true; break; case MiningFeatureSelection.NotSelected: flag = (current.FeatureSelection == MiningFeatureSelection.NotSelected); break; case MiningFeatureSelection.Selected: flag = (current.FeatureSelection == MiningFeatureSelection.Input || current.FeatureSelection == MiningFeatureSelection.Output || current.FeatureSelection == MiningFeatureSelection.InputAndOutput); break; case (MiningFeatureSelection)3: case (MiningFeatureSelection)5: case (MiningFeatureSelection)6: case (MiningFeatureSelection)7: break; case MiningFeatureSelection.Input: flag = (current.FeatureSelection == MiningFeatureSelection.Input); break; case MiningFeatureSelection.Output: flag = (current.FeatureSelection == MiningFeatureSelection.Output); break; default: if (filter == MiningFeatureSelection.InputAndOutput) { flag = (current.FeatureSelection == MiningFeatureSelection.InputAndOutput); } break; } if (flag) { this.arAttributesInternal.Add(current); } } }
internal MiningAttribute(MiningModel parentModel, string attributeDisplayName) { this.attributeID = -1; this.parentModel = parentModel; this.name = attributeDisplayName; this.shortName = ""; this.valueColumn = null; this.keyColumn = null; this.featureSelection = MiningFeatureSelection.NotSelected; this.isInput = false; this.isPredictable = false; this.ParseAttributeName(); if (this.valueColumn != null) { this.isInput = this.valueColumn.IsInput; this.isPredictable = this.valueColumn.IsPredictable; return; } if (this.parentColumn != null) { this.isInput = this.parentColumn.IsInput; this.isPredictable = this.parentColumn.IsPredictable; } }
internal MiningAttributeCollection(MiningModel parentModel, MiningFeatureSelection filter) { this.arAttributesInternal = new ArrayList(); this.FilterCollection(parentModel.Attributes, filter); }