Showing posts with label age. Show all posts
Showing posts with label age. Show all posts

Wednesday, March 21, 2012

dmx query probablity ?

CREATE MINING MODEL mortgage
(
[id] long key,
Edu_Status long DISCRETE,
Work_Status long DISCRETE,
age long CONTINUOUS,
asset_value long CONTINUOUS,
Net_income long CONTINUOUS,
paid_Status long DISCRETE PREDICT
)USING MICROSOFT_DECISION_TREES

i have a mining model above and i am designing a web cross ablication to see probablity of the a costumers' paid status.can you write for me dmx command for selecting paid status that have same criteria(ex;age=30 net income=2000,Edu_status=college) and when i write dxm window(select * from [paid_Status] ) it only shows "4" one row one column why ? as you see i dont know

dmx and datamining well..:)

string dxmcommand = "";

private AdomdCommand ascommand = new AdomdCommand();

private AdomdConnection asconnection=new AdomdConnection();

private AdomdDataReader asreader=new AdomdDataReader();

ascommand.CommandText = dmxcommand;

if I understand your question correctly, then the query would be something like:

SELECT Paid_Status, PredictProbability(Paid_Status)

FROM mortgage NATURAL PREDICTION JOIN

(SELECT 30 AS Age, 2000 as Net_Income ) AS T

This query will return the predicted value for Paid_Status as well as the proability for that prediction. Note that I did not include "College" as Edu_status. The reason is that the Edu_status column of the mining model is defined as "LONG DISCRETE" and "College" is a string, so it cannot be mapped to a long. You will have to convert "College" to the numeric code which I suppose it is used in describing this string, then add "<Numeric_Code_For_College> AS Edu_Status" to the query

Also, in C#, the sequence of operations should be along this line:

AdomdConnection cn = new AdomdConnection();

cn.ConnectionString = "Data Source=localhost; Initial Catalog=<Your Database>";

cn.Open(); // open the connection

AdomdCommand cmd = new AdomdCommand();

cmd.Connection = cn; // associate the command with the current connection

cmd.CommandText = dmxcommand;

AdomdDataReader rdr = cmd.ExecuteReader(); // obtain the reader from the command execution instead of creating it with new

Hope this helps

Friday, March 9, 2012

Dividing lines between questions in report

Hello
I'm using SQL Server Reporting Services 2000. I have a report with the
following details:-
Subtopic Question Answer Total %age Details %age
The query behind the report groups results on subtopic and question.
What I would like to do is put in a dividing line every time the question
changes. This will not be every line, however, since there can be up to 4
answers for each question. I am hiding duplicate questions, so the
question text only shows on the first line, although there may be 4 lines
for each question altogether.
When I try to add a separating line it adds one after every line, so for
each question there will be up to 4 lines. I only want a line to appear
when the question changes.
Can anyone help with this? It's driving me bonkers!
Many thanks
Denise CrawleyIf you include a group footer, you can create the line there.
"Denise" wrote:
> Hello
> I'm using SQL Server Reporting Services 2000. I have a report with the
> following details:-
> Subtopic Question Answer Total %age Details %age
> The query behind the report groups results on subtopic and question.
> What I would like to do is put in a dividing line every time the question
> changes. This will not be every line, however, since there can be up to 4
> answers for each question. I am hiding duplicate questions, so the
> question text only shows on the first line, although there may be 4 lines
> for each question altogether.
> When I try to add a separating line it adds one after every line, so for
> each question there will be up to 4 lines. I only want a line to appear
> when the question changes.
> Can anyone help with this? It's driving me bonkers!
> Many thanks
> Denise Crawley
>|||Thanks very much, that's exactly what I was looking for.
On Wed, 8 Feb 2006 13:07:29 -0800, daw wrote:
> If you include a group footer, you can create the line there.
> "Denise" wrote:
>> Hello
>> I'm using SQL Server Reporting Services 2000. I have a report with the
>> following details:-
>> Subtopic Question Answer Total %age Details %age
>> The query behind the report groups results on subtopic and question.
>> What I would like to do is put in a dividing line every time the question
>> changes. This will not be every line, however, since there can be up to 4
>> answers for each question. I am hiding duplicate questions, so the
>> question text only shows on the first line, although there may be 4 lines
>> for each question altogether.
>> When I try to add a separating line it adds one after every line, so for
>> each question there will be up to 4 lines. I only want a line to appear
>> when the question changes.
>> Can anyone help with this? It's driving me bonkers!
>> Many thanks
>> Denise Crawley