def plot_with_map(currMicroClusters, dataContext, title): p = Plotter(currMicroClusters, dataContext) ax = plt.gca() # we try the one with the mc size # map map = Basemap(projection='cyl', ) map.drawmapboundary(fill_color='aqua') map.fillcontinents(color='gray', lake_color='aqua') map.drawcoastlines() # plot p.plotMicroClustersSize(ax) fig = plt.gcf() fig.canvas.manager.window.showMaximized() fig.suptitle(title, fontweight="bold") # show if not generate_gif: plt.show() # plot figure to see resutls; for testing return fig
dyclee = Dyclee(dataContext=dataContext, relativeSize=relativeSize, uncommonDimensions=uncommonDimensions, closenessThreshold=closenessThreshold) # start X = non_time_series_datasets[datIndx]['dataset'] dName = non_time_series_datasets[datIndx]['name'] k = non_time_series_datasets[datIndx]['k'] baseFolder = getClusteringResultsPath() + dName + '/' # normalize dataset for easier parameter selection X = StandardScaler().fit_transform(X) ac = 0 # processed samples # iterate over the data points for dataPoint in X: # column index ac += 1 dyclee.trainOnElement(dataPoint) currMicroClusters = dyclee.getClusteringResult( ) # we wanna show the clustering at the end, only once res = prepareResultFrom(currMicroClusters) folder = baseFolder + getDycleeName() + '/' # storeNonTimeSeriesResult(res, folder) # FIXME: uncomment! # store algo config algoConfig = dyclee.getConfig() # storeAlgoConfig(algoConfig, folder) # FIXME: uncomment! # IMPORTANT: plotting outside dyclee p = Plotter(currMicroClusters, dataContext) # p.plotClusters() # FIXME: uncomment if you want all 3 plots to be displayed - and comment the whole following block ax = plt.gca() # we try the one with the mc size p.plotMicroClustersSize(ax) plt.show()