Data-mining-dm-query-language
データマイニング-クエリ言語
データマイニングクエリ言語(DMQL)は、Han、Fu、Wangなどによって提案されました。 DBMinerデータマイニングシステム用。 データマイニングクエリ言語は、実際には構造化クエリ言語(SQL)に基づいています。 データマイニングクエリ言語は、アドホックでインタラクティブなデータマイニングをサポートするように設計できます。 このDMQLは、プリミティブを指定するためのコマンドを提供します。 DMQLは、データベースやデータウェアハウスでも機能します。 DMQLを使用して、データマイニングタスクを定義できます。 特に、DMQLでデータウェアハウスとデータマートを定義する方法を調べます。
タスク関連データ仕様の構文
タスク関連データを指定するためのDMQLの構文は次のとおりです-
use database database_name
or
use data warehouse data_warehouse_name
in relevance to att_or_dim_list
from relation(s)/cube(s) [where condition]
order by order_list
group by grouping_list
知識の種類を指定するための構文
ここでは、特徴付け、識別、関連付け、分類、および予測の構文について説明します。
特徴づけ
特徴付けの構文は次のとおりです-
mine characteristics [as pattern_name]
analyze {measure(s) }
analyze句は、count、sum、count%などの集計メジャーを指定します。
たとえば-
Description describing customer purchasing habits.
mine characteristics as customerPurchasing
analyze count%
差別
差別の構文は-
mine comparison [as {pattern_name]}
For {target_class } where {t arget_condition }
{versus {contrast_class_i }
where {contrast_condition_i}}
analyze {measure(s) }
たとえば、ユーザーは、大きな支出者を、平均で100ドル以上かかるアイテムを購入する顧客として定義できます。平均100ドル未満で商品を購入する顧客としての予算支出者。 これらの各カテゴリからの顧客の判別式の説明のマイニングは、DMQLで次のように指定できます-
mine comparison as purchaseGroups
for bigSpenders where avg(I.price) ≥$100
versus budgetSpenders where avg(I.price)< $100
analyze count
協会
関連付けの構文は次のとおりです-
mine associations [ as {pattern_name} ]
{matching {metapattern} }
例-
mine associations as buyingHabits
matching P(X:customer,W) ^ Q(X,Y) ≥ buys(X,Z)
Xは顧客関係のキーです。 PとQは述語変数です。 W、Y、およびZはオブジェクト変数です。
分類
分類の構文は次のとおりです-
mine classification [as pattern_name]
analyze classifying_attribute_or_dimension
たとえば、パターンをマイニングするには、クラスが属性credit_ratingによって決定される顧客の信用格付けを分類し、マイニング分類はclassifyCustomerCreditRatingとして決定されます。
analyze credit_rating
予測
予測の構文は-
mine prediction [as pattern_name]
analyze prediction_attribute_or_dimension
{set {attribute_or_dimension_i= value_i}}
コンセプト階層仕様の構文
概念階層を指定するには、次の構文を使用します-
use hierarchy <hierarchy> for <attribute_or_dimension>
さまざまな構文を使用して、次のようなさまざまな種類の階層を定義します。
-schema hierarchies
define hierarchy time_hierarchy on date as [date,month quarter,year]
-
set-grouping hierarchies
define hierarchy age_hierarchy for age on customer as
level1: {young, middle_aged, senior} < level0: all
level2: {20, ..., 39} < level1: young
level3: {40, ..., 59} < level1: middle_aged
level4: {60, ..., 89} < level1: senior
-operation-derived hierarchies
define hierarchy age_hierarchy for age on customer as
{age_category(1), ..., age_category(5)}
:= cluster(default, age, 5) < all(age)
-rule-based hierarchies
define hierarchy profit_margin_hierarchy on item as
level_1: low_profit_margin < level_0: all
if (price - cost)< $50
level_1: medium-profit_margin < level_0: all
if ((price - cost) > $50) and ((price - cost) ≤ $250))
level_1: high_profit_margin < level_0: all
興味度尺度仕様の構文
興味深い尺度としきい値は、ステートメントでユーザーが指定することができます-
with <interest_measure_name> threshold = threshold_value
例-
with support threshold = 0.05
with confidence threshold = 0.7
パターン表示および視覚化仕様の構文
検出されたパターンの表示を1つ以上のフォームで指定できる構文があります。
display as <result_form>
例-
display as table
DMQLの完全な仕様
企業のマーケットマネージャーとして、100ドル以上の価格で商品を購入できる顧客の購入習慣を特徴付けたいとします。顧客の年齢、購入した商品の種類、商品が購入された場所に関して。 その特性を持っている顧客の割合を知りたいと思います。 特に、あなたはカナダで行われ、American Expressクレジットカードで支払われた購入にのみ興味があります。 結果の説明を表形式で表示します。
use database AllElectronics_db
use hierarchy location_hierarchy for B.address
mine characteristics as customerPurchasing
analyze count%
in relevance to C.age,I.type,I.place_made
from customer C, item I, purchase P, items_sold S, branch B
where I.item_ID = S.item_ID and P.cust_ID = C.cust_ID and
P.method_paid = "AmEx" and B.address = "Canada" and I.price ≥ 100
with noise threshold = 5%
display as table
データマイニング言語の標準化
データマイニング言語の標準化は、次の目的に役立ちます-
- データマイニングソリューションの体系的な開発を支援します。
- 複数のデータマイニングシステムおよび機能間の相互運用性を向上させます。
- 教育と迅速な学習を促進します。
- 産業および社会におけるデータマイニングシステムの使用を促進します。