6
$\begingroup$

This is somewhat vague, but suppose you have a black box function $f(x_1,x_2,\ldots,x_k)$, for which you have code, and you are interested in the behaviour of $f$ when the $x_i$ are i.i.d. standard Gaussian random variables. What are some good ways to visualize this function? To make it easier, we may assume that $k$ is smallish, say less than 10.

One particular relationship of interest is how $f$ varies with one of the input, say $x_i$. An easy way to visualize this relationship would be to sample the function for fixed values of $x_i$ while varying the other input (either in a structured way, or randomly, say), then box-plotting, which could show how the mean trend is affected by $x_i$, but also whether the scatter is affected (i.e. heteroskedasticity). However, interaction between $x_i$ and the levels of the other input might be masked by this approach.

What I am looking for is somewhat open-ended. I do not have a particular hypothesis that I am testing, but rather am looking for new ways of visualizing the response which might reveal peculiarities of the function.

$\endgroup$
9
  • $\begingroup$ p.s. maybe this should be a community wiki? I'm not sure how that works... $\endgroup$
    – shabbychef
    Sep 2, 2010 at 3:32
  • $\begingroup$ if you don't give us more info on $f$ and on what type of characteristic then it seems to be community wiki but I am not sure neither :) $\endgroup$ Sep 2, 2010 at 5:47
  • $\begingroup$ The fact that $f$ in undefined makes it a feed of a different multivariate visualization methods, so it should be CW. And now it is. $\endgroup$
    – user88
    Sep 2, 2010 at 7:20
  • $\begingroup$ it's fairly easy for me to fit $f$ to linear model, so we should assume that has already been done, and we are looking at the residual from that fit. As I mentioned in the question, I am looking for interesting facts about the function, so I don't yet know what I might find. Because of this open-ended nature, I thought maybe it should be a CW. I am still not sure on how one decides whether a Q should be CW. $\endgroup$
    – shabbychef
    Sep 2, 2010 at 17:25
  • $\begingroup$ At first blush this question seems purely mathematical: visualizing the function has nothing to do with the distribution of its arguments. However, the reference to "heteroskedasticity" suggests you're really trying to visualize an object that is more explicitly represented as $f(x_1, ..., x_k) + \epsilon$ or more generally as $g(f(x_1, ..., x_k), \epsilon)$ where $epsilon$ is a zero-mean random variable and $g(z,0) = z$ for all z. Isn't this just a response-surface analysis? $\endgroup$
    – whuber
    Sep 2, 2010 at 19:42

3 Answers 3

4
$\begingroup$

Given that you are at the initial, exploratory stages of the analysis I would start simple. Consider sampling your inputs using a Latin Hypercube strategy. Then, a tornado chart can be used to get a quick assessment of the multiple,one-way sensitivities f() has to the various input variables. Here is an example chart (from here)

alt text

This chart is not that interesting, but an interpretation would be "NPV is most sensitive to Shipments, all other things being equal. But, the sensitivity is mostly on the upside, which is good. The Escalation variable induces sensitivity into NPV, but what looks to be skewed negatively a bit...".

You could do something similar for Mean(f) on the X-axis as well as Var(f)

Given what you find from some first glance visualizations like this, you could then slice and dice more and focus on specific variables or relationships between variables. Maybe you can revisit this thread in coming months and post the visualizations you found useful :)

$\endgroup$
3
$\begingroup$

Just a thought, although I've never tried it.

  • you could obtain a large number of values from the function across different parameter values
  • take a tour of the resulting data in ggobi (check out Mat Kelcey's video)
$\endgroup$
3
  • $\begingroup$ ggobi looks interesting, but I am repelled by the xml data format. maybe I'll get over that, but it is not high priority. $\endgroup$
    – shabbychef
    Sep 2, 2010 at 22:55
  • 1
    $\begingroup$ @shabbychef Then check out the interface from R called rggobi ggobi.org/rggobi $\endgroup$ Sep 3, 2010 at 2:30
  • $\begingroup$ Bump for rggobi. I just downloaded it after reading @shabbychef's comment and it changed/rocked my world. $\endgroup$
    – user1076
    Sep 3, 2010 at 18:39
0
$\begingroup$

You could apply some sort of dimensionality reduction technique like principal components and plot the value of the function as you vary the first, second, third etc. principal components, holding all others fixed. This would show you how the function varies in the directions of the maximal variance of the inputs.

$\endgroup$
1
  • 1
    $\begingroup$ The inputs are assumed to be iid Gaussian, implying there is no direction of maximal variance. But perhaps I have misinterpreted this assumption? $\endgroup$
    – whuber
    Sep 2, 2010 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.