vampire.model.Vampire#
- class vampire.model.Vampire(model_name, n_points=50, n_clusters=5, n_pcs=None, random_state=None)[source]#
Visually Aided Morpho-Phenotyping Image Recognition (VAMPIRE) model.
- Attributes:
- model_namestr
Name of the VAMPIRE model.
- n_pointsint
Number of sample points in a contour.
- n_coordsint
Number of coordinates in a contour. n_coords = 2*n_points
- n_clustersint
Number of clusters for K-Means clustering.
- n_pcsint
Number of principal components kept for analysis.
- random_stateint
Random state of random processes.
- mean_registered_contourndarray
Mean registered contour.
- mean_aligned_contourndarray
Mean aligned contour.
- contoursndarray
Raw contours.
- principal_directionsndarray
Principal directions of PCA.
- cluster_id_dfDataFrame
Contour’s cluster id and min distance to centroid.
- labeled_contours_dfDataFrame
Contour coordinates, cluster id, and min distance to centroid.
- centroidsndarray
Coordinate of centroids.
- mean_cluster_contoursndarray
Mean contours of each contour cluster.
- pair_distancendarray
Pair distance between each cluster
- linkage_matrixndarray
Linkage matrix for cluster dendrogram.
- branchesdict
A dictionary of data structures computed to render the dendrogram.
- __init__(model_name, n_points=50, n_clusters=5, n_pcs=None, random_state=None)[source]#
Initialize VAMPIRE model wih hyperparameters.
- Parameters:
- model_namestr
Name of the VAMPIRE model.
- n_pointsint, optional
Number of sample points for contour.
- n_clustersint, optional
Number of cluster for K-Means clustering.
- n_pcsint, optional
Number of principal components to keep in analysis.
- random_stateint or None, optional
Determines random number generation for K-Means clustering. Use an int to make the randomness deterministic.
Methods
__init__(model_name[, n_points, n_clusters, ...])Initialize VAMPIRE model wih hyperparameters.
fit(properties_df)Fit VAMPIRE model to dataset.
fit_transform(properties_df)Fit VAMPIRE model to dataset and transform that dataset.
transform(properties_df)Transforms dataset using the VAMPIRE model.