(
        kmeans,
        dataPandas,
        dataset,
        scatters,
        inertia_sor,
        base_clusters)
return plots, plot_names, elbow_cluster_graph(inertia_sor, base_clusters)
plotting function that generates all plots for the clustering algorithm

    :param base_clusters: is the number of clusters testing began at
    :param inertia_sor: the array that has all the inertia values
    :param scatters: which scatter plots you want to generate of columns compared to each other
    :param dataset: is the dataset that you want to generate plots for
    :param dataPandas: a pandas version of that same set
    :param kmeans: is the actual kmeans algorithm you're generating for
    :return an array with all of the plots stored as figures inside of it
plotting function that generates all plots for the clustering algorithm
plotting function that generates all plots for the clustering algorithm
def generate_clustering_plots(
        kmeans,
        dataPandas,
        dataset,
        scatters,
        inertia_sor,
        base_clusters):
    '''
    plotting function that generates all plots for the clustering algorithm

    :param base_clusters: is the number of clusters testing began at
    :param inertia_sor: the array that has all the inertia values
    :param scatters: which scatter plots you want to generate of columns compared to each other
    :param dataset: is the dataset that you want to generate plots for
    :param dataPandas: a pandas version of that same set
    :param kmeans: is the actual kmeans algorithm you're generating for
    :return an array with all of the plots stored as figures inside of it
    '''

    plots = []
    plot_names = []
    # for all of the columns that're present in clustering it plots the
    # columns with each other based on the cluster they're in
    for x in range(len(dataPandas.columns) - 1):
        for y in range(len(dataPandas.columns) - 1):
            if dataPandas.columns[x].replace(
                    " ", "_") + "_vs_" + dataPandas.columns[y].replace(" ", "_") in scatters:
                img = plt.figure()
                plt.scatter(dataset[:, x], dataset[:, y],
                            c=kmeans.labels_, cmap='rainbow')
                plt.xlabel(str(dataPandas.columns[x]))
                plt.ylabel(str(dataPandas.columns[y]))
                plots.append(img)
                plot_names.append(
                    dataPandas.columns[x] +
                    "_vs_" +
                    dataPandas.columns[y])
                plt.close(img)
    return plots, plot_names, elbow_cluster_graph(inertia_sor, base_clusters)
def generate_clustering_plots ( kmeans , dataPandas , dataset , scatters , inertia_sor , base_clusters ) : plots = [ ] plot_names = [ ] # for all of the columns that're present in clustering it plots the # columns with each other based on the cluster they're in for x in range ( len ( dataPandas . columns ) - 1 ) : for y in range ( len ( dataPandas . columns ) - 1 ) : if dataPandas . columns [ x ] . replace ( " " , "_" ) + "_vs_" + dataPandas . columns [ y ] . replace ( " " , "_" ) in scatters : img = plt . figure ( ) plt . scatter ( dataset [ : , x ] , dataset [ : , y ] , c = kmeans . labels_ , cmap = 'rainbow' ) plt . xlabel ( str ( dataPandas . columns [ x ] ) ) plt . ylabel ( str ( dataPandas . columns [ y ] ) ) plots . append ( img ) plot_names . append ( dataPandas . columns [ x ] + "_vs_" + dataPandas . columns [ y ] ) plt . close ( img ) return plots , plot_names , elbow_cluster_graph ( inertia_sor , base_clusters )