0

I would like to visualize a 2000*100 matrix to find how different variables change based on values. Can you suggest a way doing it using R or Matlab?

I have data from patients who use an ECG device every night and through the night, the machine records several different variables as critical points. So, I would like to see how these variables change between days. I have data for almost 200 days for each patient (200 rows with almost 100 variables accessed every night). And I have 7 different patients.

whuber
  • 281,159
  • 54
  • 637
  • 1,101
Praveen
  • 13
  • 2
  • 1
    What does visualize a matrix mean? – Michael R. Chernick May 04 '17 at 20:43
  • @MichaelChernick: See these numbers in a .csv in a graph or a graphical representation or maybe a sparse matrix?. – Praveen May 04 '17 at 20:47
  • If you could view 200,000 numbers in one view maybe that would be a visualization. But what graphical methods can you use? – Michael R. Chernick May 04 '17 at 20:52
  • @MichaelChernick: Alright. I wanted to cross correlate each variable in the matrix with the other. So, typically, I would like to see how different variables affect the performance of these rows. – Praveen May 04 '17 at 20:58
  • 1
    If you would describe the meaning of this matrix more clearly, and explain how it might be related to "variables" and "values," and tell us what "change" means, we ought to be able to suggest effective ways to visualize it. – whuber May 05 '17 at 01:12
  • @whuber: Thanks for your reply.The data is from ECG machine which has several variables like Tidal Volume, Heart Rate, and almost 50 more variables (Y axis) extracted every night for almost 2 months(X axis). So, I believe I have to build a correlation matrix to find the correlations between different variables. Suggest if you have any better plans. – Praveen May 05 '17 at 01:54
  • It sounds like you have a multivariate time series. The temporal variable is a key component of that, so it's important to include this information in your question. It isn't clear why you feel that visualizing correlations would be helpful. Could you back up a little and explain what you're trying to achieve with your study of these data? – whuber May 05 '17 at 02:15
  • @whuber: Thanks for your insights. So as mentioned, my main aim is to measure the variations of these variables with respect to dates. So I have data from patients who use this ECG device every night and through the night, the machine records several different variables as critical points. So, I would like to see how these variables change between days. I have data for almost 200 days for each patient (200 rows with almost 100 variables accessed every night). And I have 7 different patients. – Praveen May 05 '17 at 12:15
  • @whuber: Any insights? – Praveen May 08 '17 at 20:53

1 Answers1

0

If you are interested in comparing the data variation shape between the different indicators (and lose the benefit of having x and y axes as guides for identifying the individual data points), a good way to visualise such volumes of data is to use sparklines.

However, good luck comparing the shape of 100 sparklines manually per patient, though, if they are well designed and sorted in a meaningful way, you can reduce the manual burden a lot.

This stackoverflow post and this cross-validated post should provide a starting point for an R implementation.

IMO it is best is to use a javascript library such as d3.js (see this example) for this because you can add interaction to the sparklines.

g3o2
  • 506
  • 4
  • 10
  • It looks nice but how does it apply for my big pool of data? My dataset is very large with several rows and columns. Advise. – Praveen May 31 '17 at 18:16
  • Well the way I've understood your data set, each row represents a day of data by patient. Each day per indicator per patient becomes a point in a sparkline. So, one sparkline per indicator per patient, i.e. 50-100 sparklines by patient. That's not really big data. But, you could think about feature aggregation or selection. Sparklines are by design high density data displays. – g3o2 May 31 '17 at 20:32