# Tag Info

## New answers tagged unsupervised-learning

1

Autoencoders are used to reduce the dimensionality of the feature space. They can capture nonlinearities that other dimensionality reduction teqniques like PCA can not. Autoencoders are build by training the model to reproduce the input. In this case you can split the data set into three: training cross validation testing Train you model using the training ...

1

Empty cells can be considered NaN of missing values. There are several ways to work with missing values. You can check this source: Encode NAs as -1 or -9999. This works reasonably well for numerical features that are predominantly positive in value, and for tree-based models in general. This used to be a more common method in the past when the out-of-the ...

0

There is an attribute called as score you can use it as model.predict_score(X) which returns anomaly score based on this you can classify it as inlier or outlier.

1

welcome to the community. There are many criteria on the basis of which you can cluster the recipes. The usual way to do this is to represent recipes in terms of vectors, so each of your 91 recipes can be represented by vectors of 40 dimensions. This means that now the system or machine will identify your recipes as vectors in a 40-dimensional space. Now, ...

0

K-means clustering should be a good solution. Documentation: https://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html However, in k-means clustering one must define "k", the amount of clusters. You should find the optimal "k". One way to do is is to introduce the Elbow Method. More info about the elbow method can be found here: ...

1

Recommendation Systems In recommendation systems the idea of extracting signal and using to make recommendations is very common, e.g, Alternating Least Squares and Singular Value Decomposition approaches. Autoencoder fits quite well, reducing dimensionality (the encoder part) should help extract signal. The weights in the network represent the behavior of ...

0

The presence of variance is very important in your dataset because this will allow the model to learn about the different patterns hidden in the data. But your model must not have a high variance which may cause the model to overfit. So there needs to be a balance maintained. Read about bias-variance tradeoff - Link

2

Variance in a feature (defined as the average of the squared differences from the mean) is important in machine learning because variance impacts the capacity of the model to use that feature. For example, if a feature has no variance (e.g., is not a random variable), the feature has no ability to contribute to task performance. A zero variance feature will ...

0

Most sklearn categorizers have probability outputs. CLF.predict_proba from that you can decide the threshold.

0

A common approach for this is LDA (Latent Dirichlet Allocation), which not only gives you the groups, but also a way to identify the topics of the groups by giving you the most common or distinctive words for each topic.

2

K-means don't modify the underlying structure of your data. K-means will just provide the 'color' part of your graph. To answer the question about why do you get a cuboid, it's because your underlying data are a cuboid. Not necessarily by construction, but that's what happen when you cap your data. As an exemple, look at the following code : X1 = c(rnorm(...

0

How would you know you have to do cluster analysis before looking at your data ? Setting aside data quality questions (which you should never do), a bare minimum of EDA will help you : Know if it's relevant to do a clustering analysis (rarely imo) Know if K-means is the best clustering tool (rarely imo) Get an idea of the number of the clusters Then you ...

1

I did something similar a while ago. We wanted to classify several types of pdf. We first extracted the text of the documents. We created NLP features with the text Then added pdf metadata: size of the file, number of pages, name of the document... We then built a classification model with a few samples and did Active Learning I guess that you could also ...

0

A few observations/questions/considerations: Wikipedia: Unsupervised learning is a type of self-organized Hebbian learning that helps find previously unknown patterns in data set without pre-existing labels. Being an anomaly is a label. Why not just Z-score it? https://en.wikipedia.org/wiki/Standard_score#Z-test . Calculate distribution: $\mu$ and $\sigma$, ...

3

If you expect that all zeros is a result of error in the measuring of the features (i.e. the observations should not be all 0s but they are), then I would say: Keep all the data, but increase k (from k-means) by 1. This extra one will hopefully become the class of all these wrong observations. If you expect that all zeros is correct (i.e. these observations ...

3

It's a matter of data quality so it depends how the dataset was built: Either these instances are meaningful, i.e. it makes sense that an observation would have zeros for all the features and that it would happen that often. Or these are the result of an error, typically the complete absence of measurement for these observations. Naturally one wants to ...

1

The purpose of the test split is normally to evaluate the performance of your model in data it has not seen before. While the available performance measures for GAN generators have their problems, they do exist. For images, you have Inception Score and Frechet Inception Distance. For text, you have quality vs. diversity plots. The evaluation measures ...

0

But can I assign the cluster labels from the pca reduced data to the original data ? would it be a right approach ? I guess not. Yes, that is totally the right approach. Principal components are just the linear combinations of your original features that explain the most variance, so you can definitely use them for clustering. Moreover, since you only kept ...

1

If you want to visualise the data after K-Means, the better approach would be to reduce the dimensionality to two or three dimensions and visualise using a matplotlib 2D or 3D plot. You might also try pair plots but I don't think It would be much helpful from clustering stand point.

Top 50 recent answers are included