ALTER MINING STRUCTURE (DMX)

Creates a new mining model that is based on an existing mining structure. This statement is different from the CREATE MINING MODEL statement, in that a structure must already exist in order for the ALTER statement to create a new mining model.

Syntax

ALTER MINING STRUCTURE <structure>
ADD MINING MODEL <model>
(
    [(<column definition list>)]
)
USING <algorithm> [(<parameter list>)] [WITH DRILLTHROUGH]

Arguments

  • structure
    The name of the mining structure to which the model will be added.
  • model
    A unique name for the model.
  • column definition list
    A comma-separated list of column definitions.
  • algorithm
    The provider-defined name of a data mining provider.
  • parameter list
    Optional. A comma-separated list of provider-defined parameters for the algorithm.

Remarks

If the mining structure contains composite keys, the mining model must include all the key columns that are defined in the structure.

If the model does not require a predictable column, for example models that are built by using the Microsoft Clustering and Microsoft Sequence Clustering algorithms, you do not have to include a column definition in the statement. All the attributes in the resulting model will be treated as inputs.

The WITH DRILLTHROUGH clause enables drillthrough on the new mining model. Drillthrough can only be enabled when you create the model.

Column Definition List

You define the structure of a model that uses the column definition list by including the following information for each column:

  • Name (mandatory)
  • Modeling flags
  • Prediction request, which indicates to the algorithm to predict this column, indicated by the PREDICT or PREDICT_ONLY clause

Use the following syntax for the column definition list, to define a single column:

<column name>    [<modeling flags>]    [<prediction>]

You can define multiple modeling flags for a column. For a description of the mining model flags that you can define on a mining model column, see Mining Model Columns.

Use a prediction clause to describe how the prediction column is used. The following table describes the two possible clauses.

PREDICT

This column can be predicted by the model, and it can be supplied in input cases to predict the value of other predictable columns.

PREDICT_ONLY

This column can be predicted by the model, but its values cannot be used in input cases to predict the value of other predictable columns.

Parameter Definition List

You can adjust the performance and functionality of a model by using the parameter list. The syntax of the parameter list is as follows:

[<parameter> = <value>, <parameter> = <value>,…]

For a list of parameters that are associated with each algorithm, see Data Mining Algorithms.

Examples

The following example adds a Naive Bayes mining model to the New Mailing mining structure.

ALTER MINING STRUCTURE [New Mailing]
ADD MINING MODEL [Naive Bayes]
(
    CustomerKey, 
    Gender,
    [Number Cars Owned],
    [Bike Buyer] PREDICT
)
Using Microsoft_Naive_Bayes

See Also

Reference

Data Mining Extensions (DMX) Data Definition Statements
Data Mining Extensions (DMX) Data Manipulation Statements
Data Mining Extensions (DMX) Statement Reference

Help and Information

Getting SQL Server 2005 Assistance