Showing posts with label products. Show all posts
Showing posts with label products. Show all posts

Thursday, March 22, 2012

can use Where in Dts query?

i create a model mining to know percent of product, which is like more by customer is have percent biger than other products that is don't like by customer.

i use DTS to get result to sql server.

select flattened

predict([modelName].[tablePredict],Include_statistic)

from

[modelName]

prediction join

.....

i have result with a table A in sql server:

productid $support ... $adjustedprobability

1 0.0 ...

1 0.0 ...

1 63.3 .....

how can i write in Dts so that table A not have record with value $support=0.0

- second: percent people like that product is knowned by $adjustedprobability or $support and value small or big

1:

SELECT FLATTENED
(SELECT * FROM Predict([modelName.tablePredict,INCLUDE_STATISTICS) WHERE $support > 0) as p
FROM [modelName]
PREDICTION JOIN ....

2: If you want descending, you can just use the column in the query - e.g.
SELECT FLATTENED Predict(model.table, 5, $AdjustedProbability) FROM ...

If you want bottom you need to use BottomCount(Predict(model.table),include_statistics), $support,5)

You should check my syntax - I just typed this from memory

Thx

|||

thank you very much.

you right when tell me check my syntax, there are some mistake.

thank you again

|||

hi, where can i put where in this query. it gives error when i try to use where clause.

i want 5 products but also their $AdjustedProbability should be > 0.36 ex.

SELECT FLATTENED

TopCount(Predict([Customer Products],

INCLUDE_STATISTICS) ,

$AdjustedProbability ,

5)

FROM [Basket Analysis]

NATURAL PREDICTION JOIN

( SELECT (

SELECT 'Product A' AS [Product]

)

AS [Customer Products] ) AS t

can use Where in Dts query?

i create a model mining to know percent of product, which is like more by customer is have percent biger than other products that is don't like by customer.

i use DTS to get result to sql server.

select flattened

predict([modelName].[tablePredict],Include_statistic)

from

[modelName]

prediction join

.....

i have result with a table A in sql server:

productid $support ... $adjustedprobability

1 0.0 ...

1 0.0 ...

1 63.3 .....

how can i write in Dts so that table A not have record with value $support=0.0

- second: percent people like that product is knowned by $adjustedprobability or $support and value small or big

1:

SELECT FLATTENED
(SELECT * FROM Predict([modelName.tablePredict,INCLUDE_STATISTICS) WHERE $support > 0) as p
FROM [modelName]
PREDICTION JOIN ....

2: If you want descending, you can just use the column in the query - e.g.
SELECT FLATTENED Predict(model.table, 5, $AdjustedProbability) FROM ...

If you want bottom you need to use BottomCount(Predict(model.table),include_statistics), $support,5)

You should check my syntax - I just typed this from memory

Thx

|||

thank you very much.

you right when tell me check my syntax, there are some mistake.

thank you again

|||

hi, where can i put where in this query. it gives error when i try to use where clause.

i want 5 products but also their $AdjustedProbability should be > 0.36 ex.

SELECTFLATTENED

TopCount(Predict([Customer Products],

INCLUDE_STATISTICS) ,

$AdjustedProbability ,

5)

FROM [Basket Analysis]

NATURALPREDICTIONJOIN

( SELECT (

SELECT 'Product A' AS [Product]

)

AS [Customer Products] ) AS t

Friday, February 24, 2012

Can someone help explain?

Hi,

I am working with several tables, but for now I just mention 4 : one is fact table (named Usage), and 3 dimensional tables Periods, Products, and Regions. The fact table contains references to the dimensional tables. Table Periods contain two other columns month and year.

I created a cube containing columns from those 4 tables. Deployment was successful. Trouble comes when I want to create a mining structure using Time Series containing these columns :

- Period
- Amount (of money)
- Product name
- Region name

When I choose to use cube (instead of table) as source for mining structure, I'm forced to choose only one dimension (among the Periods, Products, and Regions). Whatever dimension I choose I end up being unable to use the column period as the Time-Key column. Effectively I cannot use Time Series method since I cannot use the column period.

(1) Why is this so [why Visual Studio forced us to use only one dimension from the cube] ?
(2) Why Visual Studio eliminates the column period, column that has relationship with the
time dimension?
(3) What is the use of Cube anyway to the mining? Is there still any use for it?
(4) What is the solution to that kind of problem I face?

Thank you,

Bernaridho
Dear all,

I have not received any answer why can I use only one dimension when using a cube to mine data. Can someone help explain please? The details are ini my previous posting.

Thank you,

Bernaridho
|||

#1. The current design on OLAP-based mining structures requires that case-level columns be member properties of the key - this is a strict way of making sure that the attributes refer to the same entity (the case) and the requirement is met if all the case columns come from the same dimension.

#2. The data mining engine does not have time intelligence in terms of recognizing the special status of the time dimension so unless there is explicit relationship through inclusion of the case dimension and time dimension in a measuregroup, the dimension cannot be included (as a nested table).

#3. Building mining models on top of cubes is useful when you already have the data in that form (and you don't want to or don't have access to the source data) and also for applying the results of data mining back to the cube to slice/dice the fact data with the hierarchies discovered by the model. For instance, you could build a cluster model and slice your facts by the clusters.

#4. In your case, it might be better to build your time series model directly on the source (relational) data since you will have much more flexibility in that case.

|||

You can also use DMX to create the models. DMX allows the form

INSERT INTO <mining model>(<columns>)

<MDX statement>

In this form it uses the flattening semantics of MDX to populate the mining model. This way you can create any arbitrary dataset as input into the mining model.

|||Are there any more details to this question?