PAMI.extras.graph package

Submodules

PAMI.extras.graph.DF2Fig module

class PAMI.extras.graph.DF2Fig.DF2Fig(dataFrame: DataFrame)[source]

Bases: object

Description:

DataFrameInToFigures is used to convert the given dataframe into figures.

Parameters:
  • dataFrame – Name of the input dataframe

  • algorithm – Specify the column name containing the algorithms

  • xcolumn – Specify the name of the X-axis

  • ycolumn – Specify the name of the Y-axis

Importing this algorithm into a python program

from PAMI.extras.graph import dataframeInToFigures as fig

obj = fig.dataframeInToFigures(idf)

obj.plotGraphsFromDataFrame("minSup", "patterns", "algorithms")

obj.plotGraphsFromDataFrame("minSup", "memory")

obj.plotGraphsFromDataFrame("minSup", "runtime")
plot(xColumn, yColumn, algorithm=None) None[source]

To plot graphs from given dataframe

Parameters:
  • xColumn (str) – Name of the X-axis of the dataframe

  • yColumn (str) – Name of the Y-axis of the dataframe

  • algorithm (str) – Specify the column name containing the algorithms

Returns:

None

PAMI.extras.graph.DF2Tex module

class PAMI.extras.graph.DF2Tex.DF2Tex[source]

Bases: object

About this algorithm

Description:

generateLatexFileFromDataFrame is used to convert the given DataFrame into a LaTeX file.

Reference:

Attributes: - latexCode (str) – Stores the generated LaTeX code.

Methods: - generateLatexCode(result: pd.DataFrame, xColumn, yColumn, algorithmColumn=None)Generates LaTeX code based on DataFrame columns.

  • print_latex()Prints the LaTeX code.

  • save(outputFileName: str)Saves the LaTeX code to a .tex file.

Importing this algorithm into a Python program

from PAMI.extras.graph import DF2Tex

result = Dataframe

obj = DF2Tex()

obj.generateLatexCode(result, "minSup", "runtime", "algorithmColumn")

obj.printLatex()

obj.save("outputFile.tex")
generateLatexCode(result: DataFrame, xColumn, yColumn, algorithmColumn=None) None[source]

Generate LaTeX code from a given DataFrame.

printLatex()[source]

Print the generated LaTeX code.

save(outputFileName)[source]

Save the generated LaTeX code to a file.

Parameters:

outputFileName – The name of the output .tex file.

Raises:

ValueError – If LaTeX code has not been generated.

PAMI.extras.graph.plotLineGraphFromDictionary module

class PAMI.extras.graph.plotLineGraphFromDictionary.plotLineGraphFromDictionary(data: dict, end: int = 100, start: int = 0, title: str = '', xlabel: str = '', ylabel: str = '')[source]

Bases: object

This class plot graph of input data

Attributes:

:param data : dict: store input data as dict

Methods:
plotLineGraph()

draw line graph of input data. input data’s key is x and value is y.

Importing this algorithm into a python program

from PAMI.extras.graph import plotLineGraphFromDictionary as plt

obj = plt.plotLineGraphFromDictionary(idict, 100, 0, " ")

obj.save()

PAMI.extras.graph.plotLineGraphsFromDataFrame module

PAMI.extras.graph.visualizeFuzzyPatterns module

class PAMI.extras.graph.visualizeFuzzyPatterns.visualizeFuzzyPatterns(file: str, topk: int)[source]

Bases: object

Description:

visualizeFuzzyPatterns is used to visualize points produced by pattern miner .

Attributes:

:param file : file: store input data as file :param topk : int: Takes the value int as input

from PAMI.extras.graph import visualizeFuzzyPatterns as viz

obj = viz.visualizeFuzzyPatterns(iFile, topk)

obj.save()
visualize(markerSize: int = 20, zoom: int = 3, width: int = 1500, height: int = 1000) None[source]

Visualize points produced by pattern miner.

Parameters:
  • markerSize (int) – Size of the marker

  • zoom (int) – Zoom level

  • width (int) – Width of the graph

  • height – Height of the graph on the screen

Returns:

None

PAMI.extras.graph.visualizePatterns module

class PAMI.extras.graph.visualizePatterns.visualizePatterns(file: str, topk: int)[source]

Bases: object

Description:

visualizePatterns is used to visualize points produced by pattern miner .

Attributes:
:param filefile

store input data as file

:param topkint

Takes the value int as input

Importing this algorithm into a python program

from PAMI.extras.graph import visualizePatterns as viz

obj = viz.visualizePatterns(iFile, topk)

obj.save()
visualize(markerSize: int = 20, zoom: int = 3, width: int = 1500, height: int = 1000) None[source]

Visualize points produced by pattern miner.

Parameters:
  • markerSize (int) – Size of the marker

  • zoom (int) – Zoom level

  • width (int) – Width of the graph

  • height – Height of the graph on the screen

Returns:

None

Module contents