Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
Returns the upper end of the predicted bucket that is discovered for a discretized column.
The RangeMax function can be used in SELECT DISTINCT FROM <model > (DMX) queries. When used with this type of query, the scalar column reference can contain continuous or discrete columns that are either predictable or input.
When used with SELECT FROM <model> PREDICTION JOIN (DMX), the RangeMin, RangeMid, and RangeMax functions return the actual boundary values of the specified bucket. For example, if you perform a prediction on a discretized column, the query returns the predicted bucket number in the discretized column. The RangeMin, RangeMid, and RangeMax functions describe the bucket that the prediction specifies. When the RangeMax function is used with a PREDICTION JOIN statement, the scalar column reference can only contain discrete, predictable columns.
The following example returns the minimum, maximum, and average values for the Yearly Income continuous column in the Decision Tree mining model.
SELECT DISTINCT RangeMin([Yearly Income]) AS [Bucket Minimum], RangeMid([Yearly Income]) AS [Bucket Average], RangeMax([Yearly Income]) AS [Bucket Maximum] FROM [TM Decision Tree]