What is the proper way to do an analysis of a hidden class in Python?

I would like to simulate a dataset using Hidden Class Analysis (LCA) using Python. I found the Factor Analysis class in sklearn, but I'm not sure if this class is equivalent to LCA.

Is there a package or class for LCA in Python?

+5
source share
2 answers

There is currently no package that provides LCA support in python. However, there are many packages that use different algorithms to execute LCA in R (see CRAN for more details):

  • Bayesian Hidden Class Analysis BayesLCA.
  • LCAextend Hidden Class Analysis (LCA) with Family Dependence in Extended Pedigrees
  • poLCA Politomatical variable Hidden class analysis
  • randomLCA Random effects Hidden class analysis

Although this is not the same, there is hierarchical clustering in sklearn, you can check if this is suitable for your needs.

+1
source

Factor analysis is something completely different. In your case, you should try PCA, usually gives good results if your data set is in the correct form. So you should have a lot more instances than variables. Must be at least 10x

Here is a PCA tutorial

You can also try clustering, for example, K-Means or Gausian Mixtures

A good tool to try different methods and visually see the results. Orange Toolbox This is a graphical tool for machine learning and a lot of algorithms use comes from scikit. After you finish prototyping your pipeline, you can create your production program using the same scikit routines.

-3
source

Source: https://habr.com/ru/post/1262366/


All Articles