public void GenerateOverlapMatrixes(ILogBuilder log, folderNode folder) { List <histogramModel> histograms = new List <histogramModel>(); foreach (Int32 atSize in FSTests.Get1stKeys()) { ConcurrentDictionary <string, FeatureSelectionAnalysis> concurrentDictionary = FSTests[atSize]; String prefix = concurrentDictionary.Keys.toCsvInLine() + "_" + atSize; GenerateOverlapMatrixes(prefix, concurrentDictionary, log, folder); List <histogramModel> models = new List <histogramModel>(); foreach (var selcol in concurrentDictionary.Values) { //histogramModel model = new histogramModel(50, "SelectedDistributionAt" + atSize); var freq = selcol.weightedFeatures.index.Values.OrderByDescending(x => x.weight); histogramModel model = histogramModelExtensions.GetHistogramModel(freq, "Weights", x => x.weight, 20); models.Add(model); } models.BlendHistogramModels(prefix).GetReportAndSave(folder, null, "histogram" + prefix); } }
/// <summary> /// Gets the SVG histogram. /// </summary> /// <param name="model">The histogram model</param> /// <param name="is3D">if set to <c>true</c> it will be 3D</param> /// <param name="depth">The depth.</param> /// <returns></returns> public static String GetSVGHistogram(this histogramModel model, Boolean is3D = false, short depth = 10) { if (!is3D) { HistogramChart output = new HistogramChart(500, 360, model.targetBins); XmlDocument xml = output.GenerateChart(model.GetDataTableForFrequencies(), histogramModel.DEFAULT_COLUMN_NAME, histogramModel.DEFAULT_COLUMN_VALUE); return(xml.OuterXml); } else { Histogram3DChart output = new Histogram3DChart(500, 360, model.targetBins, depth); XmlDocument xml = output.GenerateChart(model.GetDataTableForFrequencies(), histogramModel.DEFAULT_COLUMN_NAME, histogramModel.DEFAULT_COLUMN_VALUE); return(xml.OuterXml); } }
public static histogramModel GetHistogram(this SpaceDocumentModel dictionary, Int32 binCount = 50) { histogramModel model = dictionary.terms.GetRankedTokenFrequency().GetHistogramModel(dictionary.name, x => x.Value, binCount); //new histogramModel(binCount, dictionary.name); return(model); }
public static histogramModel GetHistogram(this WeightDictionary dictionary, Int32 binCount = 50) { histogramModel model = dictionary.index.Values.ToList().GetHistogramModel(dictionary.name, x => x.weight, binCount); //new histogramModel(binCount, dictionary.name); return(model); }