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
No comments:
Post a Comment