RegressionTree#predict

Parsed documentation:
View on GitHub
/**
*
* Predicts the value of target variable from the `input` using the rules tree generated by
* `learn()`. If the value of a columm in the input data, required for
* the prediction is missing, by defualt it throws an error. If the function
* `fn` is defined then no error is thrown, instead the name of missing column is passed
* to this function; and the function is expected to handle the same.
*
* @method RegressionTree#predict
* @param {object} input data containing column name/value pairs; the column
* names must the same as defined via `defineConfig()`.
* @param {function} [modifier=undefined] is called once
* a leaf node is reached during prediction with the following 5 parameters: **size,**
* **mean** and **stdev** values at the node; an **array** of column names
* navigated to reach the leaf and **column name** for which value is missing
* in the input (`default=undefined`). The value returned from this function becomes  the prediction.
* @return {number} `mean` value or whatever is returned by the `modifier` function, if defined.
* @throws {error} if the `input` is not a javascript object.
* @throws {error} if a value of a column required for prediction is missing in `input`,
* provided `modifier` has not been defined.
* @example
* // Populate sample input
* var input = {
*   model: 'Ford Gran Torino',
*   weight: 'very high weight',
*   displacement: 'very large displacement',
*   horsepower: 'extremely high power',
*   origin: 'US',
*   acceleration: 'slow'
* };
* // Attempt prediction.
* myRT.predict( input );
* // -> 14.3
*/
No suggestions.
Please help! Open an issue on GitHub if this assessment is incorrect.