GithubHelp home page GithubHelp logo

ibipul / statistical_viz Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 624 KB

This projects focusses on PCA based Statistical Visualization for multivariate large data sets. Popular methods for visualizing PCA transformations are performed in R.

R 100.00%
biplot tsquare-plot svd pca

statistical_viz's Introduction

Authors:

  • Bipul Islam
  • Ritankar Mandal

Statistical Visualization Tools

The R scripts here implement statistical visualization of Multivariate data.

  • Singular Value Decomposition,
  • Principle Component Analysis,
  • Score plot, Loading plot, Biplot,
  • Hotelling plot and Tsquare plots

have been oplemented here. The included scripts need to be parsed with R, then either the following commands could be used to visualize the data with plot commands of R, or, any other plotting devices of user's choice.

*Note: These codes are written as a part of verification of algorithms which had be written in C++ during an internship @strand Life Sciencs *

####File: SVD-MAN.R


Creates the PCA of the mvariate data with Singular Value Decomposition method.

####File: BIPLOT.R


Following command will generate a biplot of the given data

biplot(G,H,expand=1,main="Bi-Plot",xlab="PC1",ylab="PC2")

The Correctness of the method can be validated by the following commands that utilizes PCA routine inbuilt in R:

pc <- prcmop(data)
biplot(pc,main="Biplot by PRCOMP")

The relative orientation of loadings & the scatter of scores will validate the correctness of SVD method.

####File: DMODX.R


R Plot of rowsquared matrix & an overlay of abline at the critical point can point out the required moderate outliers. Following commands will do.

plot(rowsquared, col='red',pch=20,main="DmodX Chart showing both 1% & 5% critical limit", xlab= "Row Index", ylab="Dmodx value")

abline(h=sqrt(6.0005931),col="blue")
abline(h=sqrt(9.22091172),col="black")
text(1000,2," 5% critical limit")
text(1000,3.7," 1% critical limit")

####File: TSQUAREPLOT.R


Following commands can be used to generate the COnfidence ellipseplot,

plot(score,col='red',pch=20,main="Confidence ellipse for 1% and 5%",xlab="PC1 component",ylab="PC2 component")

points(x1,y1,col='black',type='l')
points(x2,y2,col='blue',type='l')
text(4,2.5,"1% limit")
text(-2.5,0,"5% limit")

Following commands can be used to generate the TSquare plot

plot(TSQ,col='red',pch=20,main="T square plot with confidence intervals 1% & 5%",xlab= "Dimension Index",ylab="T square value")

abline(h=five,col='blue')
abline(h=one,col='black')
text(1000,1,"5% confidence limit")
text(1000,20,"1% confidence limit")

statistical_viz's People

Watchers

 avatar  avatar

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.