Giter Club home page Giter Club logo

plotmm's Introduction

plotmm Tidy Tools for Visualizing Mixture Models

Project Status: Active โ€“ The project has reached a stable, usable state and is being actively developed. CRAN_Status_Badge Downloads Documentation


lifecycle CRAN_Status_Badge Downloads Documentation


Package authors and contributors:


In collaboration with Fong Chan (Achilles Therapeutics) and Lu Zhang (University of Chicago), we have developed plotmm for tidy visualization of mixture models. This package is a substantial update to the plotGMM package.

Install

Load the latest version:

devtools::install_github("pdwaggoner/plotmm")

library(plotmm)

Load the latest stable (CRAN) version:

install.packages("plotmm")

library(plotmm)

Getting Started

To get started, read the "Getting Started" vignette, which includes a few basic examples.

Contribute

Anyone is welcome to contribute to the package. Before collaborating, please take a look at and abide by the contributor code of conduct. Here's a sampling of how to contribute:

  • Submit an issue reporting a bug, requesting a feature enhancement, etc.

  • Suggest changes directly via pull request

  • Reach out directly with ideas if you're uneasy with public interaction

plotmm's People

Contributors

luzhang0128 avatar pdwaggoner avatar tinyheero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

plotmm's Issues

Next round of additions

TODO for plotGMM:

  • tests for cutpoints
  • plotting options (e.g.. histograms, density plots, etc.)
  • allow for non-mixEM GMM objects (i.e., interface with other packages for fitting GMMs
  • simulations (?)

Incorrect calculation of the cut point

The function plot_cut_point calculates the optimal cut point by taking the mean of the calculated mu of the mixture model. There are two issues:

  • This only makes sense for a 2-component mixture model. However, the function also allows models with k>=3 as argument.
  • Even for a 2-component Gaussian mixture model, this is the optimal threshold only in case of a mixture model with equal priors and equal variances. In all other cases the equation is more complex and also has to take the priors and variances into account.

Issues with next version of ggplot2

Hi

We preparing the next release of ggplot2 and our reverse dependency checks show that your package is failing with the new version. Looking into it we see that the example for plot_gmm() errors because the input to stat_function() returns NULL.

You can install the release candidate of ggplot2 using devtools::install_github('tidyverse/[email protected]') to test this out.

We plan to submit ggplot2 by the end of October and hope you can have a fix ready before then

Kind regards
Thomas

One Bug in plot_mm when visualizing object from mixtools

I was trying to visualize a two-component Gaussian mixture model with unequal covariance matrices for the two components. An error "Error in eigen(sigma) : non-square matrix in 'eigen'" is reported.
I think the reason is that mvnormalmixEM in mixtools gives two types of output for estimated mean and covariance matrix: vector/matrix when arbmean/arbvar is FALSE (i.e. mean and covariance in all components is equal), or list when the arbmean/arbvar is TRUE. So there are three cases: equal mean and unequal covariance, unequal mean and equal covariance, and unequal mean and covariance. The plot_mm could only handle the case with unequal mean and equal covariance.
error
1646928587(1)

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.