Machine learning is a common use case for a SQL-MapReduce function with multiple inputs. In machine learning, you create or choose a model that takes a data set and predicts an outcome. The model is composed of mathematical and statistical algorithms created through observations of patterns found within a given data set. You typically test the model to determine its accuracy, fine-tuning it until its predictions fall within the desired margin of error.
To test the accuracy of your model, have a human classify a subset of the emails—for example, 1,000 emails—using the desired criteria. (The subset is called the sample data set and the human-generated result is called the known outcome.) You apply the model to the sample data set and compare the results to the known outcome. Now you know the reliability of the model (its margin of error) and can fine-tune it. After fine-tuning the model, you can use it to analyze new sets of emails, with a known margin of error.
For machine learning, the inputs to the SQL-MapReduce function are a predictive model (usually in JSON format) and one or more data sets to be analyzed using the model. The model must be applied to each row of input from the new data set; therefore, it is a dimensional input. The other inputs are partitioned inputs.