Skip to main content

Multi-view Classification framework based on Consensus Matrix Decomposition developed by Shubham Sharma at QUT

Project description

MCMD

MCMD (Multi-view Classification framework based on Consensus Matrix Decomposition) is a Multiview algorithm for a joint Scale-Invariant (SI) and Scale-Variant (SV) classification of multiple related datasets. The algorithm is computationally robust to missing information (NaN) in the input datasets, can cluster both single and multiple datasets together, finds clusters based on how similar the shapes of classification objects are (SI classification), identifies the objects which have anomalous shapes and classifies them as "shape-based outliers," mines clusters having both shape and scale similarity, and classifies the scale-based outliers in the dataset. The algorithm is based on a Multi-view Uni-orthogonal Non-negative Matrix Factorization (MUNMF) algorithm combined with an OPTICS-based algorithm.

Developed by: Shubham Sharma

Parameters

  • datasets : A list of one or more datasets to be jointly clustered, inputted in pandas data frame format with common indices.
  • rank: Rank of factorization, i.e., the number of Scale-Invariant clusters to be mined in the multi-view datasets.
  • classification_object: An index common in all datasets on the basis of which classification is to be done. For example: date
  • custom_beta: A list of weightages assigned to each dataset within "Datasets" in the feature engineering stage. The length of "Datasets" and custom_beta should be the same.
  • e: A small number, default value is 1e-07.
  • n_iter: Number of iterations in the feature engineering process (MUNMF).
  • eps: Epsilon parameter of OPTICS, default value is set at 2000.
  • min_pts: min_pts parameter of OPTICS, i.e., the minimum number of points for a group of points to be considered a cluster.
  • delta: delta is a list of reachability thresholds (DSSIM metric that ranges from 0 to 1) for mining variable density clusters in the data.
  • sparsity: sparsity is the weightage of the L2 norm for different factor matrices in MUNMF.
  • alpha: alpha is the weight parameter for orthogonality constraint in MUNMF. Default value is set at "number of views (or dataframes in Datasets) / rank.
  • n_views_outlier: Minimum number of views in which an object should be classified as a "shape-based outlier" to be considered as an overall "shape-based" outlier in multi-view classification
  • y_lim: range of y-axis in chart. Default is (0,1), i.e. 0 to 1

Outputs (dictionary)

  • A: basis matrix
  • B: A list of coefficient matrices. The number of coefficient matrices in B is equal to the number of dataframes in Datasets. Each B represents the latent representation of each view in the transformed space.
  • consensus_scaled_A: Consensus scaled basis matrix.
  • overall_clustering: A data frame that contains various calculations performed in the clustering process.
  • labels_SI: Scale Invariant (SI) classification labels. -2 indicates a shape-based outlier.
  • labels_SV: Scale-Variant (SV) Classification labels. -1 indicates a scale-based outlier.
  • outliers_shape: Dataframe comprising information about which object was classified as an outlier in which view.
  • results_convergence: Reconstruction errors for individual datasets and orthogonality condition.

Installation

  pip install mcmd

Usage/Examples

from mcmd import MCMD

mcmd = MCMD()

res_dict = mcmd.run(
    [dataset_1, dataset_2], # datasets should have a common index, for example: dates
    rank = 8,
    custom_beta = [1,2],
    delta = [0.1, 0.02],
    n_iter = 4000,
    n_views_outlier = 2,
)

Dependencies

  • numpy
  • pandas
  • matplotlib
  • seaborn
  • tqdm

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcmd-1.0.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcmd-1.0.1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file mcmd-1.0.1.tar.gz.

File metadata

  • Download URL: mcmd-1.0.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for mcmd-1.0.1.tar.gz
Algorithm Hash digest
SHA256 68ae3f3a2f5b59b491d8c3392fb265ffb55e43c2ff04ee7d8a3e942f36bc2f1a
MD5 cb7ea7a4f7e2f75d4b2d39d2afa89e5f
BLAKE2b-256 05ec78cff9d23d37f72db3b3a954672fc0b23c1082869683ee0a6d31ab4aea9d

See more details on using hashes here.

File details

Details for the file mcmd-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: mcmd-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for mcmd-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 09066c611244c2f9017b468a70c5345ff15e62a0edc88ed23a56010de1f70944
MD5 0d1ee9da51e7e6d4a00adc42422d106e
BLAKE2b-256 c5dbac682c2060a6780da979f6ae92efb3278b575564451ab4ed45c656cd2c65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page