pydbm.clustering.computableclusteringloss package

Submodules

pydbm.clustering.computableclusteringloss.balanced_assignments_loss module

class pydbm.clustering.computableclusteringloss.balanced_assignments_loss.BalancedAssignmentsLoss

Bases: pydbm.clustering.interface.computable_clustering_loss.ComputableClusteringLoss

Balanced Assignments Loss.

References

  • Aljalbout, E., Golkov, V., Siddiqui, Y., Strobel, M., & Cremers, D. (2018). Clustering with deep learning: Taxonomy and new methods. arXiv preprint arXiv:1801.07648.
  • Guo, X., Gao, L., Liu, X., & Yin, J. (2017, June). Improved Deep Embedded Clustering with Local Structure Preservation. In IJCAI (pp. 1753-1759).
  • Xie, J., Girshick, R., & Farhadi, A. (2016, June). Unsupervised deep embedding for clustering analysis. In International conference on machine learning (pp. 478-487).
  • Zhao, J., Mathieu, M., & LeCun, Y. (2016). Energy-based generative adversarial network. arXiv preprint arXiv:1609.03126.
compute_clustering_loss

Compute clustering loss.

Parameters:
  • observed_arrnp.ndarray of observed data points.
  • reconstructed_arrnp.ndarray of reconstructed data.
  • feature_arrnp.ndarray of feature points.
  • delta_arrnp.ndarray of differences between feature points and centroids.
  • p_arrnp.ndarray of result of soft assignment.
  • q_arrnp.ndarray of target distribution.
Returns:

Tuple data. - np.ndarray of delta for the encoder. - np.ndarray of delta for the decoder. - np.ndarray of delta for the centroids.

pydbm.clustering.computableclusteringloss.k_means_loss module

class pydbm.clustering.computableclusteringloss.k_means_loss.KMeansLoss

Bases: pydbm.clustering.interface.computable_clustering_loss.ComputableClusteringLoss

Compute K-Means Loss.

References

  • Aljalbout, E., Golkov, V., Siddiqui, Y., Strobel, M., & Cremers, D. (2018). Clustering with deep learning: Taxonomy and new methods. arXiv preprint arXiv:1801.07648.
  • Guo, X., Gao, L., Liu, X., & Yin, J. (2017, June). Improved Deep Embedded Clustering with Local Structure Preservation. In IJCAI (pp. 1753-1759).
  • Xie, J., Girshick, R., & Farhadi, A. (2016, June). Unsupervised deep embedding for clustering analysis. In International conference on machine learning (pp. 478-487).
  • Zhao, J., Mathieu, M., & LeCun, Y. (2016). Energy-based generative adversarial network. arXiv preprint arXiv:1609.03126.
compute_clustering_loss

Compute clustering loss.

Parameters:
  • observed_arrnp.ndarray of observed data points.
  • reconstructed_arrnp.ndarray of reconstructed data.
  • feature_arrnp.ndarray of feature points.
  • delta_arrnp.ndarray of differences between feature points and centroids.
  • p_arrnp.ndarray of result of soft assignment.
  • q_arrnp.ndarray of target distribution.
Returns:

Tuple data. - np.ndarray of delta for the encoder. - np.ndarray of delta for the decoder. - np.ndarray of delta for the centroids.

pydbm.clustering.computableclusteringloss.reconstruction_loss module

class pydbm.clustering.computableclusteringloss.reconstruction_loss.ReconstructionLoss

Bases: pydbm.clustering.interface.computable_clustering_loss.ComputableClusteringLoss

Reconstruction Loss.

References

  • Aljalbout, E., Golkov, V., Siddiqui, Y., Strobel, M., & Cremers, D. (2018). Clustering with deep learning: Taxonomy and new methods. arXiv preprint arXiv:1801.07648.
  • Guo, X., Gao, L., Liu, X., & Yin, J. (2017, June). Improved Deep Embedded Clustering with Local Structure Preservation. In IJCAI (pp. 1753-1759).
  • Xie, J., Girshick, R., & Farhadi, A. (2016, June). Unsupervised deep embedding for clustering analysis. In International conference on machine learning (pp. 478-487).
  • Zhao, J., Mathieu, M., & LeCun, Y. (2016). Energy-based generative adversarial network. arXiv preprint arXiv:1609.03126.
compute_clustering_loss

Compute clustering loss.

Parameters:
  • observed_arrnp.ndarray of observed data points.
  • reconstructed_arrnp.ndarray of reconstructed data.
  • feature_arrnp.ndarray of feature points.
  • delta_arrnp.ndarray of differences between feature points and centroids.
  • p_arrnp.ndarray of result of soft assignment.
  • q_arrnp.ndarray of target distribution.
Returns:

Tuple data. - np.ndarray of delta for the encoder. - np.ndarray of delta for the decoder. - np.ndarray of delta for the centroids.

pydbm.clustering.computableclusteringloss.repelling_loss module

class pydbm.clustering.computableclusteringloss.repelling_loss.RepellingLoss

Bases: pydbm.clustering.interface.computable_clustering_loss.ComputableClusteringLoss

Repelling Loss.

Note that this class calculates this penalty term for each cluster divided by soft assignments and refers to the sum as a regularizer.

References

  • Aljalbout, E., Golkov, V., Siddiqui, Y., Strobel, M., & Cremers, D. (2018). Clustering with deep learning: Taxonomy and new methods. arXiv preprint arXiv:1801.07648.
  • Guo, X., Gao, L., Liu, X., & Yin, J. (2017, June). Improved Deep Embedded Clustering with Local Structure Preservation. In IJCAI (pp. 1753-1759).
  • Xie, J., Girshick, R., & Farhadi, A. (2016, June). Unsupervised deep embedding for clustering analysis. In International conference on machine learning (pp. 478-487).
  • Zhao, J., Mathieu, M., & LeCun, Y. (2016). Energy-based generative adversarial network. arXiv preprint arXiv:1609.03126.
assign_label
compute_clustering_loss

Compute clustering loss.

Parameters:
  • observed_arrnp.ndarray of observed data points.
  • reconstructed_arrnp.ndarray of reconstructed data.
  • feature_arrnp.ndarray of feature points.
  • delta_arrnp.ndarray of differences between feature points and centroids.
  • p_arrnp.ndarray of result of soft assignment.
  • q_arrnp.ndarray of target distribution.
Returns:

Tuple data. - np.ndarray of delta for the encoder. - np.ndarray of delta for the decoder. - np.ndarray of delta for the centroids.

Module contents