3.2. Computing Features from Persistence Images
[2]:
from teaspoon.MakeData.PointCloud import testSetManifolds
from teaspoon.ML import feature_functions as Ff
# generate persistence diagrams
df = testSetManifolds(numDgms=50, numPts=100)
Diagrams_H1 = df['Dgm1'].sort_index().values
PS = 0.01
var = 0.01
feature_PI = Ff.F_Image(Diagrams_H1, PS, var, pers_imager = None,training=True, parallel=True)
# plot example images
Ff.plot_F_Images(feature_PI, num_plots=4, rows=2, cols=2)