reeb module
- class reeb.Reeb(intervals, overlap=0.2, max_k=5)
Bases:
objectA class to generate a Reeb graph for a given dataset and projection function
- Parameters
intervals – The amount of intervals the Reeb-algorithm will divide the range of points in.
overlap – Optional, default 0.2 - The overlap of the intervals, in percentages (1 = 100%, .5 = 50%, etc.)
max_k – The maximum amount of clusters per interval that are tested. Limits nodes per interval to the range 1 to max_k.
- fit(data, function=<function second_dimension>)
Fit the Reeb class to the data, and set a projection function.
- Parameters
data – A list of data-points before they are passed through the projection function.
function – Optional, default second_dimension() - A function that maps a datapoint to a number.
- Returns
This class instance.
- rearrange_nodes()
Rearrange the nodes in the graph of this instance to make it a bit easier to look at when visualizing.
- Returns
None.
- transform(data)
Generate a Reeb-graph for a given dataset using the pre-defined projection function.
- Parameters
data – A list of data-points before they are passed through the projection function.
- Returns
A Reeb-graph fitted to the given dataset with given parameters.
- reeb.first_dimension(x)
Get the value of the first dimension of x. Can be used as projection function for reeb graphs.
- Parameters
x – A datapoint
- Returns
the value of the first dimension of x - (x[0])
- reeb.second_dimension(x)
Get the value of the second dimension of x. Can be used as projection function for reeb graphs.
- Parameters
x – A datapoint
- Returns
the value of the second dimension of x - (x[1])