On Fri, 12 Sep 2003, Ovid wrote:

> We are trying to develop an application that determines for a given movie shown at a 
> particular
> theater how much the surrounding video stores are likely to rent out.
> 
> For the theater, we have its location and gross sales.  For the video stores, we 
> have location,
> demographics from the US Census, school schedules, weather reports, etc.  In other 
> words, we are
> flooded with information and all attempts at going from movie sales to rental 
> projections have
> been a simple ad hoc affair of choosing sets of data and throwing it randomly at the 
> problem to
> see if the results are close to reality.  The result has been a large, hard-coded 
> set of
> properties that is very inflexible and of questionable utility.
> 
> We're doing this in Perl, but I suspect we could might be able to switch languages 
> if that's what
> it takes.  Does anyone know of any similar problems and could you point me in an 
> appropriate
> direction?


Hi Ovid,

You don't say what algorithms you use to transform data into movie
sales, so I'll give some general suggestions.

Your question is really two questions:
1) How do I transform various factors into an output?
2) How do I verify the quality of my fit?

1) For your input, it seems that you have a combination of categorical
variables, e.g. school in session and and numerical variables,
e.g. distance from the theatres. For your output you have a single
numerical variable, sales. So your goal is to fit a multidimensional
scalar function, a common task.

There at least two ways to go about it.

The first is a heuristic method. Identify relevant variables, assign
sales scores to each value of the variables through comapring sales
for each value of a categorical variable and perhaps linear fits for
the numerical values, and combine into a total sales figure. This may
work. If it does, you have not only a sales prediciton, but
understanding of why you predict what you do. But as you say, it might
be brittle and does not take into account interactions between
variable.

The second way is to use a machine learing approach to fit your
multidimensional function. There are myriad approaches to machine
learning. One of the simplest is to train a neural net. You create a
database of training examples with entries consisting of input
variables and known output. Then you plug this into one of the perl ML
packages, eg,  
a) AI::NeuralNet::Mesh - trains up multi-layer perceptrons, a type of
feedforward neural net. It has good documentation. For your problem, I
would reccommend a 3 layer net, with one input, one hidden and one
output layer, with tanh activation fuctions.
b) Algorithm::SVM - trains up a support vector machine, which is a
specialized type of neural net. I haven't used this one.

Training will take a while, but once trained, running data through a
neural net is quite fast.


2) OK, so you have trained an NN -- how good is it? The stanadard
measure of goodness is generalizability. That is, how well does it
perform on data it has never seen? A simple method for testing
generizability is a technique called cross-validation. In
cross-validation, you
a) partition the data into training data and test data. Use the
training data to train your network. Use the test data to see how well
your network does on data it has never seen. Performance on the test
data will tell you how well the network will perform on, say, next
quarter's sales figures. You'll use the test performance to see which
neural acrhitecture is right for you. In a three layer net, the number
of hidden units is variable and you will want to optimize this. The
basic algorithm for doing so is:
for num_hidden = 1 to N {
   train network with num_hidden units
   evaluate network against test data
   If best network, store it
}
What would be a sutiable performance measure for testing? Well, a
common measure is least squares: the error of the netork output is the
square of the difference of the predicted sales and the actual sales.

This has been an extremely terse intro on to how you might solve your
problem :) A book I like on this subject is

Neural Networks for Pattern Recognition, by Chris Bishop

--
Mark Kvale, neurobiophysicist
http://www.keck.ucsf.edu/~kvale/



Reply via email to