vampire.quickstart.fit_model#
- vampire.quickstart.fit_model(img_set_path, output_path, model_name, n_points, n_clusters, n_pcs, filter_info, write_contour=False, random_state=None, savefig=True)[source]#
Fits VAMPIRE model to one image set.
- Parameters:
- img_set_pathstr
Path to the directory containing the image set(s) used to fit model.
- output_pathstr
Path of the directory used to output model and figures. Defaults to
img_set_path.- model_namestr
Name of the model. Defaults to time of function call.
- n_pointsint
Number of sample points of object contour. Defaults to 50.
- n_clustersint
Number of clusters of K-means clustering. Defaults to 5. Recommended range [2, 10].
- n_pcsint or None
Number of principal components kept for analysis. Default to keeping those that explains 95% of total variance. Recommended to adjust after analyzing scree plot.
- write_contourbool, optional
Whether write and save raw contour coordinates.
- filter_infondarray
Regex filter(s) of image filenames to be analyzed. Empty if no filter needed.
- random_stateint, optional
Random state of random processes.
- savefigbool, optional
Whether save distribution contour dendrogram.
See also
fit_modelsFitting multiple models using different images/conditions.