/*** * Set the anomaly report ***/ private void setAnomalyReport() { anomalyRepor = new Dictionary <string, List <string> >(); string strAnomalyReport = intPtrToString(getAllAnomalyReport(dataDll, 1, 2)); List <string> lineNumbers = null; string oldColName = ""; foreach (string word in strAnomalyReport.Split('\n')) { //last run if (word.Equals("")) { anomalyRepor.Add(flight_Info.getAttributeFromIndex(Int32.Parse(oldColName)), lineNumbers); break; } string[] tokens = word.Split(' '); string colName = tokens[1]; //if true there no new column to add if (colName.Equals(oldColName)) { lineNumbers.Add(tokens[0]); } else //if false there is new column to add { //if this is the first time don't enter if (!oldColName.Equals("")) { anomalyRepor.Add(flight_Info.getAttributeFromIndex(Int32.Parse(oldColName)), lineNumbers); } lineNumbers = new List <string>(); lineNumbers.Add(tokens[0]); oldColName = tokens[1]; } } foreach (string att in flight_Info.get_attribute_names()) { if (!anomalyRepor.ContainsKey(att)) { List <string> emptyLineNumbers = new List <string>(); anomalyRepor.Add(att, emptyLineNumbers); } } }
/* * Return the most correlated feature to GraphAttribute. */ public string getMostCorraltedFeature() //graph for yair { int index = info.getIndex(GraphAttribute); string correlatedIndex = this.correlatedDll.getPearsonFeature(index); return(info.getAttributeFromIndex(Int32.Parse(correlatedIndex))); }