View on GitHub

/** * * Defines the configuration required to read the input data and to generates * the regression tree. * * @method RegressionTree#defineConfig * @param {object[]} inputDataCols each object in this array defines a column of input * data in the same sequence in which data will be supplied to `ingest().` It is * defined in terms of the following details: * @param {string} inputDataCols[].name of the column. * @param {boolean} inputDataCols[].categorical defines column's data type — `true` indicating categorical * **or** `false` indicating numeric; currently numeric data type is not supported. * @param {boolean} [inputDataCols[].exclude=false] used to exclude a column during tree building. * @param {boolean} [inputDataCols[].target=false] is set to `true` only for the target column, whose * value needs to be predicted. Note this column must be a numeric column. * @param {object} tree contains key value pairs of the following regression * tree's parameters: * @param {number} [tree.maxDepth=20] is the maximum depth of the tree after which * learning stops. * @param {number} [tree.minPercentVarianceReduction=10] is the minmum variance reduction * required for a split to occur. * @param {number} [tree.minSplitCandidateItems=50] the minimum items that must be present * at a node for it to be split further, even after the `minPercentVarianceReduction` * target has been achieved. * @param {number} [tree.minLeafNodeItems=10] is the minimum number of items that * must be present at a leaf node to be retained as an independent node. Nodes with * less than this value size are merged together. * @param {number} [tree.minAvgChildrenItems=2] the average number of items * across children must be greater than this number, for a column to become a candidate * for split. A higher number will discourage splits that creates many branches * with each child node containing fewer items. * @return {number} number of columns defined. * @example * // Define each column. * var columns = [ * { name: 'model', categorical: true, exclude: true }, * { name: 'mpg', categorical: false, target: true }, * { name: 'cylinders', categorical: true }, * { name: 'displacement', categorical: true, exclude: false }, * { name: 'horsepower', categorical: true, exclude: false }, * { name: 'weight', categorical: true, exclude: false }, * { name: 'acceleration', categorical: true, exclude: false }, * { name: 'year', categorical: true, exclude: true }, * { name: 'origin', categorical: true, exclude: false } * ]; * // Define parameters to grow the tree. * var treeParams = { * minPercentVarianceReduction: 2.5, * minLeafNodeItems: 10, * minSplitCandidateItems: 30, * minAvgChildrenItems: 3 * }; * // Define the configuration using above 2 variables. * myRT.defineConfig( columns, treeParams ); * // -> 8 */

Please help! Open an issue on GitHub if this assessment is incorrect.