Click here to Skip to main content
16,021,687 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
I am doing a data mining job, but there are many mistakes I don't know how to solve them.
Firstly, I created a mining model: decision tree:
C++
create mining model [DecisionTree_MemberLevelPredict]
(
	stu_ID text key,
	stu_gender text discrete,
	stu_birthyear text discrete,
	stu_education text discrete,
	stu_levels text discrete predict
)
using microsoft_decision_trees (complexity_penalty=0.5)


and then I try to train the model:
C++
Insert into [DecisionTree_MemberLevelPredict]
(stu_ID,stu_gender,stu_birthyear,stu_education)
OPENQUERY([Bookstore],
   'SELECT ID,gender,birthyear,education,levels
    FROM dbo.customer')


and at last I want to use the model to predict the new people in table customer,
and I face the mistakes below:
The predict DMX code
C++
select T1.ID, DecisionTree_MemberLevelPredict.stu_levels, PredictProbability(DecisionTree_MemberLevelPredict) as Proba
from DecisionTree_MemberLevelPredict
prediction join 
OPENQUERY([Bookstore],
   'SELECT ID,gender,birthyear,education,levels
    FROM dbo.customer')as T1
on DecisionTree_MemberLevelPredict.stu_ID=T1.ID and DecisionTree_MemberLevelPredict.stu_gender=T1.gender and DecisionTree_MemberLevelPredict.stu_birthyear=T1.birthyear and DecisionTree_MemberLevelPredict.stu_education=T1.education


it says "T1.ID grammar" is not right, but ID is one column in my table customer and T1, how is that happen? What I did wrong?

Thank you very much !

BTW, after I have created the mining model, it automatically generate one mining structure, but I could not find the mining structure in my bi dev.
Posted
Updated 26-Apr-11 15:48pm
v2

1 solution

logic for query :

SQL
SELECT T1.ID,T1.gender,T1.birthyear,T1.education,T1.levels
    FROM dbo.customer T1


not use as on table name:

exmp:
SQL
select T1.id as idname FROM dbo.customer T1
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900