glimpse.experiment.mf_wkmeans

GetMetaFeatures(prototypes)[source]

Compute “meta-features for a set of prototypes.

Parameters:prototypes – Prototype data.
Returns:Array of meta-features, with one row per prototype.
Return type:array of float
TrainQualityModel(exp, num_regr_samples, pool, progress=None)[source]

Train a patch quality model.

Parameters:
  • num_regr_samples (int) – Number of patches to use for training the model.
  • pool – Worker pool to use when extracting patches.
  • progress – Handler for incremental progress updates.
Returns:

A trained model.

Return type:

sklearn.base.RegressorMixin

LearnPatchesFromImages(exp, num_regr_samples, num_samples, num_prototypes, pool, progress=None)[source]

Learn patch models by meta-feature weighted k-Means clustering.

Weights are given by a feature quality prediction model using prototype “meta-features”.

Parameters:
  • num_regr_samples (int) – Number of patches used to train quality prediction regression model.
  • num_samples (int) – Number of samples used to cluster via k-Means.
  • num_prototypes (int) – Number of centroids used for k-Means.
  • pool – Worker pool to use when extracting patches.
  • progress – Handler for incremental progress updates.
Returns:

Learned patches.

Return type:

array of float

Previous topic

glimpse.experiment

Next topic

glimpse.experiment.om_wkmeans

This Page