I have a large dataset with mixed (numerical, categorical, textual) data that I need to classify. The clusters are well-defined, but multidimensional (i.e. vector-valued) and have a varying structure as follows:

  • Cluster Structure 1: $(x_1, * , * , ... , * )$

  • Cluster Structure 2: $(x_1, x_2, * , ... , * )$

  • Cluster Structure 3: $(x_1, * , x_3, ..., * )$

  • ...

  • Cluster Structure N: $(x_1, x_2, x_3, ... , x_m)$

where asterisks ($*$) indicate missing component entries, and each component, when present, (e.g. $x_2$) is a cluster to be identified. The Cluster Structures are disjoint in the sense that each member of the data set is only assigned to one Cluster Structure, but Cluster Structures can share components. For example, Cluster Structure 1 only consists of one "subcluster" ($x_1$) to be identified, whereas Cluster Structures 2 and 3 have two subclusters to be identified, with one of the clustering subproblems ($x_1$) shared and the other ($x_2$ vs. $x_3$) being different. The subcluster $x_1$ (and only that) is present in all Cluster Structures.

For each member of the dataset, I need to classify both the Cluster Structure and the associated tuplet of component clusters $x_i$, but I am not sure if it is better to treat these clustering problems sequentially (first structure then subclusters) or independently of each other (separate classifier for each structure). I could, of course, also define a "metacluster" as $(S, x_1, x_2, x_3, ..., x_m)$ where $S$ is the Cluster Structure id to be classified, but then I'd be treating each cluster structure identically when in fact classification within Cluster Structure 1 (once identified) is potentially much easier than in Cluster Structure N as there is only one subcluster to be identified (namely $x_1$).

I would be interested in any existing solutions (algorithms, research papers etc) that would apply, even remotely, to this problem.


1 Answer 1


You can pose this as multi-class classification problem (all sub-clusters becomes classes). Since, your input length varies, you should pad your input to get the length equal for all inputs. You can then use neural networks (1D Conv layers followed by Dense and Softmax) to classify this.

An alternate approach to do this would be using tree-based approach where missing values can be handled. Look at CatBoost classifier. This would also require you to pose your problem as multi-class classification.

  • $\begingroup$ Thanks, but could you please elaborate on the first option? Maybe I was not clear enough in the first description, but the clusters $x_i$ are not directly observable from data set. Hence they are not inputs, but outputs (or classification results) stated as a tuplet of varying length and composition. Or did you mean that I should "explode" the universe of all clusters (behind $x_i$) and consider it as a multilabel problem? If so, then I think I'd again be losing information, as explained in the description. $\endgroup$
    – AzizG
    Feb 26, 2021 at 9:09
  • $\begingroup$ Are you trying to say you want to do clustering (since cluster memberships can vary). In that case, create a good embedding for your data and use any clustering algorithm (K-Means, Gaussian Mixture Models etc.) Or directly do it using Euclidean or Cosine distance as a metric. $\endgroup$ Feb 26, 2021 at 9:12
  • $\begingroup$ I'm trying to assign a data sample to one of the cluster structures (classification assignment #1), and I'm trying to find the most likely clusters $x_i$ for that structure and the sample (classification assignment #2). The catch is that the cluster structures are "intertwined", in the sense that they may share subproblems from assignment #2. $\endgroup$
    – AzizG
    Feb 26, 2021 at 9:15
  • $\begingroup$ For instance, classification problem $x_1$ is shared by all solutions of assignment #1. $\endgroup$
    – AzizG
    Feb 26, 2021 at 9:18
  • $\begingroup$ Can you please show your data and what you want to do? It is not getting clear what you want to achieve. Clusters are intrinsically constructed by a neural network to achieve the decision boundaries. If you are talking about want multiple clusters, which I interpret as multi-label then this problem becomes multi-label classification. It is different from multi-class. In multi-class, you will take the max but in multi-label, you will decide a threshold and above it, you will predict all classes. $\endgroup$ Feb 26, 2021 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.