2
$\begingroup$

I've found myself in a situation where I have been given a model that has been developed from what I believe to be the "this seems right" approach. The model in question is very complex but it has no associated error margins or tests of correctness. I.e., there is nothing supporting this model to be good.

To verify the model I've generated 100,000 uniformly distributed data points (the model inputs are all categorical) that I ran through the model (to get the categorical output). I've then started to plot each input variable vs the output variable density. I expect a good model to have plots with varying density for each input value, like this one:

enter image description here
(Note, A,B,C,D,E denotes the different values of a input variable and 1,2,3,4 the different values of the output variable.)

What I found however is that on almost all the input variables I get plots with constant densities for each input value, like this:

enter image description here
(Note, A,B,C,D,E denotes the different values of a input variable and 1,2,3,4 the different values of the output variable.)

My question is simply: am I right to say that variables with densities like the ones plotted in the second graph are not contributing to the model? That they do not have any predictive power? Or am I missing something key here in evaluating this model?

Thanks a bunch for any answers and/or comments regarding my little situation!

P.S. Any hints/tricks on how to further evaluate a model without any validation data would be greatly appreciated!

$\endgroup$
5
  • $\begingroup$ I don't understand your plots. Could you give more info about the data? As to validation data, it doesn't come specially tagged as such, the modeller splits the available data into training, test and validation sets in the model development process (usually repeating many times with different splits). Are you saying that you in fact have no data at all, and your model is built purely from theory rather than built from training data? If so there is no way to evaluate the model performance as such. I think what your plots are showing is that the output doesn't change for different input (cont) $\endgroup$ Commented Aug 9, 2012 at 6:03
  • $\begingroup$ (cont) in which case you are probably right in assuming the model isn't very good, since it doesn't care about the input predictors at all. Then again, maybe this is correct, maybe these are highly uninformative predictors, but without any data you simply don't know. $\endgroup$ Commented Aug 9, 2012 at 6:05
  • $\begingroup$ What you are evaluating in your approach (as far as I can tell, I'm somewhat confused) is model complexity. This can be a useful thing to know about your model, but is a secondary consideration compared with the actual model performance (i.e. does it predict the correct result). If you had two or more models with comparable performance you would generally prefer the less complex model, but you need to know the performance first. There's simply no way to evaluate that without data or a strong theory (from which you might be able to sample reasonable synthetic data). $\endgroup$ Commented Aug 9, 2012 at 6:15
  • $\begingroup$ You say almost all input variables [...] gives you constant densities... What doesn't? $\endgroup$
    – HCAI
    Commented Aug 9, 2012 at 19:10
  • $\begingroup$ About 3-4 out of the 25 predictors in the model have graphs that looks more like the first I posted. The rest have graphs like the second. $\endgroup$
    – Erik
    Commented Aug 9, 2012 at 19:27

3 Answers 3

2
$\begingroup$

Given you have no validation data the best you can do is to look at the sensitivity of the model to input factors and their interactions. I'd recommend having a look at global sensitivity analysis. Depending on how long it takes you to run your model, you could be interested in variance-based techniques.

I. M. Sobol’ : Global sensitivity indices for nonlinear mathematical models and their Monte Carlo estimates. Mathematics and Computers in Simulation, 55:271–280, 2001

You can have a look at this question for a presentation of other sensitivity analysis questions.

$\endgroup$
1
  • $\begingroup$ Thank you I will look into global sensitivity analysis for sure! $\endgroup$
    – Erik
    Commented Aug 9, 2012 at 18:03
1
$\begingroup$

The simple answer is that if varying an input variable to your model yields no variation in the model's output, then those variables are most likely not contributing to the model. Note that there could be complex interactions in the model, such that variation in an input variable only makes a difference under some conditions (e.g., when another variable is set to a specific value) and that you simply didn't test the model under those conditions. However, it is not entirely clear what your situation is (as others have pointed out), so there may be more going on here.

$\endgroup$
5
  • $\begingroup$ This is what I was thinking. With a large sample shouldn't I have been able to capture any complex interactions as well? Is there any additional steps I could take to identify if there is more complex interactions occurring? $\endgroup$
    – Erik
    Commented Aug 9, 2012 at 18:07
  • $\begingroup$ The size of your sample doesn't matter. What matters is how much variation you have in all possible variables. If there's another variable that the model incorporates that interacts w/ this one, then you would need adequate variation in that variable as well when you simulate the model. $\endgroup$ Commented Aug 9, 2012 at 18:18
  • $\begingroup$ I dont have much variation in the variables but what would be the standard approach to deal with the issue you're raising? $\endgroup$
    – Erik
    Commented Aug 9, 2012 at 19:09
  • $\begingroup$ As far as I know, if you can't get any variation in other variables, you are out of luck. Sorry. $\endgroup$ Commented Aug 9, 2012 at 19:47
  • $\begingroup$ I'm gonna have to retract my previous comment, I actually do have good variation in all possible variables. $\endgroup$
    – Erik
    Commented Aug 9, 2012 at 20:13
0
$\begingroup$

I am not sure that

I expect a good model to have plots with varying density for each input value

is generally true.

I assume the model was given to you in the form of a $f(\vec{x})$. I suppose that you have some restrictions / constraints on $\vec{x}$ that is $\vec{x} \in X$ where $X$ is the set of all $\vec{x}$'s that match the constraint.

In this case you could sample N $(\vec{x}_1, \ldots \vec{x}_N)$ from $X$, like what you mentioned, then compute $y^*_i = f(\vec{x_i}) $ this will give you $(y^*_1 \ldots y^*_N)$ sequence. You could then check if the sequence $(y^*_1 \ldots y^*_N)$ is a random or not. For instance if $y$ is binary you could calculate the probability that the sequence $(y^*_1 \ldots y^*_N)$ is drawn from a Bernoulli distribution.

$\endgroup$
7
  • $\begingroup$ I might just have a blank moment but shouldn't the output sequence be random if the input sample is random? What could I learn from this type of analysis? $\endgroup$
    – Erik
    Commented Aug 9, 2012 at 18:08
  • $\begingroup$ If I didn't get this totally wrong, you don't know if from a sequence of random input you will get a sequence of random output. I would exactly test this. Well you could learn if there is any correlation between input and output. $\endgroup$ Commented Aug 9, 2012 at 20:08
  • $\begingroup$ I am still a little unsure about this. What exactly would it mean if the output sequence was random vs if it wasn't. Is it even possible for a random input sequence to produce a non random output sequence ? How would you go from deciding if the output sequence is random to calculating correlation between input and output? Sorry for the lack of understanding, your explanations are much appreciated! $\endgroup$
    – Erik
    Commented Aug 9, 2012 at 20:32
  • $\begingroup$ > Is it even possible for a random input sequence to produce a non random output sequence ? I think so: the extreme case is $f(\vec{x}) = k$ with k constant, but you could think of a model $f(\vec{x})$ that has some state / memory of the sequence of instances it classifies and returns an output value which depends solely on depending only the index or combination of it. Therefore any random input sequence will produce the same output sequence. I can't think of a case where $f(\vec{x})$ acts only on $\vec{x})$ and does not produce a random input, but it might be somehow possible. $\endgroup$ Commented Aug 9, 2012 at 23:20
  • $\begingroup$ However it really depends on your problem settings. Is your model totally a black box or can you look into? >What exactly would it mean if the output sequence was random vs if it wasn't. I am thinking about doing a frequency test or any other test to check statistical randomness en.wikipedia.org/wiki/Statistical_randomness#Tests $\endgroup$ Commented Aug 9, 2012 at 23:20

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.