Szerkesztés

Megosztás a következőn keresztül:


SELECT FROM <model>.SAMPLE_CASES (DMX)

Applies to: SQL Server Analysis Services

Returns sample cases that are representative of the cases that are used to train the data mining model.

To use this statement, you must enable drillthrough when you create the mining model. For more information about enabling drillthrough, see CREATE MINING MODEL (DMX), SELECT INTO (DMX), and ALTER MINING STRUCTURE (DMX).

Syntax

  
SELECT [FLATTENED] [TOP <n>] <expression list> FROM <model>.SAMPLE_CASES  
[WHERE <condition list>] ORDER BY <expression> [DESC|ASC]]  

Arguments

n
Optional. An integer that specifies how many rows to return.

expression list
A comma-separated list of related column identifiers.

model
A model identifier.

condition list
Optional. Conditions to restrict the values that are returned from the column list.

expression
Optional. An expression that returns a scalar value.

Remarks

Sample cases may be generated and may not actually exist in the training data. The returned case is representative of the specified content node.

Although the Microsoft Sequence Clustering algorithm is the only Microsoft algorithm that supports using SELECT FROM <model>.SAMPLE_CASES, third-party algorithms may also support it.

Examples

The following example returns sample cases that are used to train the Target Mail mining model. Using the IsInNode (DMX) function in the WHERE clause returns only cases that are associated with the '000000003' node. The node string can be found in the NODE_UNIQUE_NAME column of the schema rowset.

Select * from [Sequence Clustering].SAMPLE_Cases  
WHERE IsInNode('000000003')  

See Also

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