Code Monkey home page Code Monkey logo

Comments (4)

pbailis avatar pbailis commented on August 16, 2024

My hack was apparently not the biggest hack: "With a singular sample covariance matrix, Mplus automatically does a gentle ridging (adding epsilon to the diagonal)." http://www.statmodel.com/discussion/messages/14/1857.html?1425832063

from macrobase.

pbailis avatar pbailis commented on August 16, 2024

The obvious approach here is to perform dimensionality reduction. However, if we're dealing with a small sample of data, we may not want to go back and perform dimensionality reduction on the entire dataset. This is even harder in a streaming setting.

I'm generally finding three major alternatives referenced in discussions and notes:

  1. "Ridging" the covariance matrix. Add \alpha*I to the covariance matrix, for some small \alpha.
  2. Compute a pseudo-inverse. A common suggestion for use in Mahalanobis distance is the Moore-Penrose inverse
  3. Drop the problematic dimensions and compute covariance/Mahalanobis distance in a subset of dimensions.

There are other, less common measures that don't appear to have been widely used. Here's a survey from someone's class notes: http://webcache.googleusercontent.com/search?q=cache:goB_0E5S-BIJ:www.doc.ic.ac.uk/~dfg/ProbabilisticInference/IDAPILecture17.pdf+&cd=4&hl=en&ct=clnk&gl=us

from macrobase.

pbailis avatar pbailis commented on August 16, 2024

Someone wrote about this in a real textbook: https://books.google.com/books?id=uL6-PKdS0lAC&pg=PA271&lpg=PA271&dq=mahalanobis+generalized+inverse

from macrobase.

pbailis avatar pbailis commented on August 16, 2024

This unblocks us for now, but I'm happy to revisit the ridge technique, especially if SVD proves a bottleneck.

from macrobase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.