Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

singleton query agains OLAP based model?

 
   Database Help (Home) -> Datamining RSS
Next:  How to do updates upon the query results  
Author Message
Jeje

External


Since: Jan 14, 2008
Posts: 69



(Msg. 1) Posted: Mon Jan 21, 2008 8:12 pm
Post subject: singleton query agains OLAP based model?
Archived from groups: microsoft>public>sqlserver>datamining (more info?)

Hi,

I have created a decision tree DM model from a cube.
now I try the singleton query, but how to create the query????

the only samples I found works against an RDBMS model.
so I'm not sure how to write my query:

SELECT
flattened
[Test Dec Tree].[Performance Levels]
,PredictProbability([?????]) <-- error here
From
[Test Dec Tree]
NATURAL PREDICTION JOIN
(SELECT 'Male' AS [Gender],
'Asian' AS [Race Group]
) AS t

I have tried a lot of different syntaxes in the predictprobabilty function
without success.

because it's OLAP based, I only have "existing" and "missing" in my model
result, while the samples found are differents.

can you point me on a sample anywhere?

thanks.
Jerome.

 >> Stay informed about: singleton query agains OLAP based model? 
Back to top
Login to vote
Dejan Sarka

External


Since: Mar 18, 2004
Posts: 103



(Msg. 2) Posted: Wed Jan 23, 2008 8:33 am
Post subject: Re: singleton query agains OLAP based model? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jeje,

I created a DT model on Adventure Works DW demo cube. I used Number Of Cars
Owned as predictable, Education, Gender and Marital Status as input column.
I checked the content of the predictable column - when it was read from the
cube, it was Continuous; I changed it to Discrete. Deployed the model, and
here is a query that works:

SELECT [Number of Cars Owned],
PredictProbability([Number of Cars Owned], 2)
AS TwoCarsProb
FROM [CubeDT]
NATURAL PREDICTION JOIN
(SELECT 'High School' AS Education,
'Single' AS [Marital Status],
'M' AS [Gender]) AS t

What kind of error do you get? Can you test the way I did?

--
Dejan Sarka
http://blogs.solidq.com/EN/dsarka/default.aspx

"Jeje" wrote in message

> Hi,
>
> I have created a decision tree DM model from a cube.
> now I try the singleton query, but how to create the query????
>
> the only samples I found works against an RDBMS model.
> so I'm not sure how to write my query:
>
> SELECT
> flattened
> [Test Dec Tree].[Performance Levels]
> ,PredictProbability([?????]) <-- error here
> From
> [Test Dec Tree]
> NATURAL PREDICTION JOIN
> (SELECT 'Male' AS [Gender],
> 'Asian' AS [Race Group]
> ) AS t
>
> I have tried a lot of different syntaxes in the predictprobabilty function
> without success.
>
> because it's OLAP based, I only have "existing" and "missing" in my model
> result, while the samples found are differents.
>
> can you point me on a sample anywhere?
>
> thanks.
> Jerome.
>
>
>

 >> Stay informed about: singleton query agains OLAP based model? 
Back to top
Login to vote
Jeje

External


Since: Jan 14, 2008
Posts: 69



(Msg. 3) Posted: Wed Jan 23, 2008 9:26 am
Post subject: Re: singleton query agains OLAP based model? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

this works, only if my predictable content is not a nested table.

I have a survey like cube:
customer dimension, product dimension and evaluation dimension (good, avg,
bad) and #Evaluations.
I have create a decision tree model using the customer key as the key, what
I want to predict is the evaluation (so a nested table) and also I'm using
the product characteristics in my model (color, type, size etc...)
it's ok.
1 thing is missing here: I have to select the tree what I want to track (ie
select bad, avg or good evaluations) and the model just display "existing"
"missing"
I will prefer to have the 3 evaluation types and the probability to fall
into 1 of these, but it's a small issue.

now, the PredictProbability formula...
the formula doesn't works.

in adv. works I can reproduce it:
SELECT [Subcategories]
, PredictProbability([Subcategories], 2) AS TwoCarsProb
FROM [decision]
NATURAL PREDICTION JOIN
(SELECT 'High School' AS Education,
'Single' AS [Marital Status],
'M' AS [Gender]) AS t


The error is:
Error (Data mining): Only a scalar column reference is allowed in the
prediction function at line 2, column 29.

So how to write a singleton query to use it against the Subcategories
prediction?

Thanks.

Jerome.



"Dejan Sarka" wrote in
message
> Jeje,
>
> I created a DT model on Adventure Works DW demo cube. I used Number Of
> Cars Owned as predictable, Education, Gender and Marital Status as input
> column. I checked the content of the predictable column - when it was read
> from the cube, it was Continuous; I changed it to Discrete. Deployed the
> model, and here is a query that works:
>
> SELECT [Number of Cars Owned],
> PredictProbability([Number of Cars Owned], 2)
> AS TwoCarsProb
> FROM [CubeDT]
> NATURAL PREDICTION JOIN
> (SELECT 'High School' AS Education,
> 'Single' AS [Marital Status],
> 'M' AS [Gender]) AS t
>
> What kind of error do you get? Can you test the way I did?
>
> --
> Dejan Sarka
> http://blogs.solidq.com/EN/dsarka/default.aspx
>
> "Jeje" wrote in message
>
>> Hi,
>>
>> I have created a decision tree DM model from a cube.
>> now I try the singleton query, but how to create the query????
>>
>> the only samples I found works against an RDBMS model.
>> so I'm not sure how to write my query:
>>
>> SELECT
>> flattened
>> [Test Dec Tree].[Performance Levels]
>> ,PredictProbability([?????]) <-- error here
>> From
>> [Test Dec Tree]
>> NATURAL PREDICTION JOIN
>> (SELECT 'Male' AS [Gender],
>> 'Asian' AS [Race Group]
>> ) AS t
>>
>> I have tried a lot of different syntaxes in the predictprobabilty
>> function without success.
>>
>> because it's OLAP based, I only have "existing" and "missing" in my model
>> result, while the samples found are differents.
>>
>> can you point me on a sample anywhere?
>>
>> thanks.
>> Jerome.
>>
>>
>>
>
 >> Stay informed about: singleton query agains OLAP based model? 
Back to top
Login to vote
Jeje

External


Since: Jan 14, 2008
Posts: 69



(Msg. 4) Posted: Thu Jan 24, 2008 4:38 pm
Post subject: Re: singleton query agains OLAP based model? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

ok
I have found
I have to use:
PredictAssociation
instead of PredictProbability


"Jeje" wrote in message

> this works, only if my predictable content is not a nested table.
>
> I have a survey like cube:
> customer dimension, product dimension and evaluation dimension (good, avg,
> bad) and #Evaluations.
> I have create a decision tree model using the customer key as the key,
> what I want to predict is the evaluation (so a nested table) and also I'm
> using the product characteristics in my model (color, type, size etc...)
> it's ok.
> 1 thing is missing here: I have to select the tree what I want to track
> (ie select bad, avg or good evaluations) and the model just display
> "existing" "missing"
> I will prefer to have the 3 evaluation types and the probability to fall
> into 1 of these, but it's a small issue.
>
> now, the PredictProbability formula...
> the formula doesn't works.
>
> in adv. works I can reproduce it:
> SELECT [Subcategories]
> , PredictProbability([Subcategories], 2) AS TwoCarsProb
> FROM [decision]
> NATURAL PREDICTION JOIN
> (SELECT 'High School' AS Education,
> 'Single' AS [Marital Status],
> 'M' AS [Gender]) AS t
>
>
> The error is:
> Error (Data mining): Only a scalar column reference is allowed in the
> prediction function at line 2, column 29.
>
> So how to write a singleton query to use it against the Subcategories
> prediction?
>
> Thanks.
>
> Jerome.
>
>
>
> "Dejan Sarka" wrote in
> message
>> Jeje,
>>
>> I created a DT model on Adventure Works DW demo cube. I used Number Of
>> Cars Owned as predictable, Education, Gender and Marital Status as input
>> column. I checked the content of the predictable column - when it was
>> read from the cube, it was Continuous; I changed it to Discrete. Deployed
>> the model, and here is a query that works:
>>
>> SELECT [Number of Cars Owned],
>> PredictProbability([Number of Cars Owned], 2)
>> AS TwoCarsProb
>> FROM [CubeDT]
>> NATURAL PREDICTION JOIN
>> (SELECT 'High School' AS Education,
>> 'Single' AS [Marital Status],
>> 'M' AS [Gender]) AS t
>>
>> What kind of error do you get? Can you test the way I did?
>>
>> --
>> Dejan Sarka
>> http://blogs.solidq.com/EN/dsarka/default.aspx
>>
>> "Jeje" wrote in message
>>
>>> Hi,
>>>
>>> I have created a decision tree DM model from a cube.
>>> now I try the singleton query, but how to create the query????
>>>
>>> the only samples I found works against an RDBMS model.
>>> so I'm not sure how to write my query:
>>>
>>> SELECT
>>> flattened
>>> [Test Dec Tree].[Performance Levels]
>>> ,PredictProbability([?????]) <-- error here
>>> From
>>> [Test Dec Tree]
>>> NATURAL PREDICTION JOIN
>>> (SELECT 'Male' AS [Gender],
>>> 'Asian' AS [Race Group]
>>> ) AS t
>>>
>>> I have tried a lot of different syntaxes in the predictprobabilty
>>> function without success.
>>>
>>> because it's OLAP based, I only have "existing" and "missing" in my
>>> model result, while the samples found are differents.
>>>
>>> can you point me on a sample anywhere?
>>>
>>> thanks.
>>> Jerome.
>>>
>>>
>>>
>>
 >> Stay informed about: singleton query agains OLAP based model? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
model from an OLAP cube, too many cases evaluated... -

Reprocessing a mining model - I'm currently developing a user registration prototype. The aim is to classify certain types of users. However, after the registration I query a decision tree model in Analysis Services with DMX and I want to send the user data into the warehouse to....

Trying to cut down query times - I have a query that is based on two other queries that are based on tables in a database. All of the queries that are used for this final query use grouping and totals. In the application I am making, I need to choose a date range to select the subset....

Help w/query pls - Hi, I need to display on a monthly basis the policies sold showing the results in a row from their start date to the end date based on the following data: policy_cost, date_start and date_end Column one should display the first month (date_start)....

How to do updates upon the query results - Hello, I've run a complex SELECT statement combined of the several tables, which returns me: MemberID MemberName CurrentWeightAvailableOn010108 NeedsToHaveWeightOnDate Modifier(NeedsToHaveWeight-CurrentWeightAvailable) 1 John Doe ...
   Database Help (Home) -> Datamining All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]