Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
SQL Server 2019 and earlier Analysis Services
Azure Analysis Services
Fabric/Power BI Premium
Important
Data mining was deprecated in SQL Server 2017 Analysis Services and now discontinued in SQL Server 2022 Analysis Services. Documentation is not updated for deprecated and discontinued features. To learn more, see Analysis Services backward compatibility.
Some algorithms that create data mining models in SQL Server SQL Server Analysis Services require specific content types to function correctly. For example, the Microsoft Naive Bayes algorithm can't use continuous columns as input and can't predict continuous values. Also, some columns contain so many values that the algorithm can't easily identify interesting patterns in the data to create a model from.
In these cases, you can discretize the data in the columns to enable using the algorithms to produce a mining model. Discretization is the process of putting values into buckets so there are a limited number of possible states. The buckets themselves are treated as ordered and discrete values. You can discretize both numeric and string columns.
Several methods are available to discretize data. If your data mining solution uses relational data, you can control the number of buckets to use for grouping data by setting the value of the DiscretizationBucketCount property. The default number of buckets is 5.
If your data mining solution uses data from an Online Analytical Processing (OLAP) cube, the data mining algorithm automatically computes the number of buckets to generate by using the following equation, where n is the number of distinct values of data in the column:
Number of Buckets = sqrt(n)
If you don't want SQL Server Analysis Services to calculate the number of buckets, use the DiscretizationBucketCount property to manually specify the number of buckets.
The following table describes the methods you can use to discretize data in SQL Server Analysis Services.
| Discretization method | Description |
|---|---|
| AUTOMATIC | SQL Server Analysis Services determines which discretization method to use. |
| CLUSTERS | The algorithm divides the data into groups by sampling the training data, initializing to a number of random points, and then running several iterations of the Microsoft Clustering algorithm using the Expectation Maximization (EM) clustering method. The CLUSTERS method is useful because it works on any distribution curve. However, it requires more processing time than the other discretization methods. This method can be used only with numeric columns. |
| EQUAL_AREAS | The algorithm divides the data into groups that contain an equal number of values. This method is best used for normal distribution curves, but doesn't work well if the distribution includes a large number of values in a narrow group in the continuous data. For example, if one-half of the items have a cost of 0, one-half the data occurs under a single point in the curve. In such a distribution, this method breaks up the data in an effort to establish equal discretization into multiple areas. This process produces an inaccurate representation of the data. |
Remarks
Use the EQUAL_AREAS method to discretize strings.
The CLUSTERS method uses a random sample of 1,000 records to discretize data. Use the EQUAL_AREAS method if you don't want the algorithm to sample data.
See also
Content Types (Data Mining)
Content Types (DMX)
Data Mining Algorithms (Analysis Services - Data Mining)
Mining Structures (Analysis Services - Data Mining)
Data Types (Data Mining)
Mining Structure Columns
Column Distributions (Data Mining)