DMX Query, the most influential variable
Yours sincerely.
I'm doing work of data mining using decision trees, and I have the expected result: Predicted probability of dropping out, however I would like the result, by DMX query, throw me the most influential variable in the above probability .
For example if Marco, has a 90% chance of dropping out, tell me what was the most influential variable for this probability, which can be Sex, Age, City, etc..
I have in my data mining model, named Tree, variables such as sex, age, marital status, district, etc., and my view of the data, Vista_Datos, fields such as customer name, phone, email, Prov.; so my query resulted DMX follows.
Select
(T. [CustomerName]) as [Customer]
(T. [date]) as [Date of Appointment]
t. [Department],
t. [Province]
t. [District]
(T. [address]) as [Address],
(T. [telephone]) as [Phone Fixed]
(T. [Cell_Phone]) as [Cell Phone]
(T. [email]) as [E],
PredictProbability ([Tree]. [Desertion], 0) * 100 as [Probability of Defection]
From
[Tree]
PREDICTION JOIN
OPENQUERY ([Source Mining]
'SELECT
[CustomerName]
[Date],
[Department],
[Province]
[District]
[Street address]
[telephone]
[Cell_Phone]
[Email]
FROM
[Dbo]. [Vista_Datos]
') AS t
ON
[Tree]. [Department] = t. [Department] AND
[Tree]. [Province] = t. [Province] AND
[Tree]. [District] = t. [District] AND
where (PredictProbability ([Tree]. [Desertion], 0) * 100)> 50
I need to modify the query to get the most influential variable in the prediction result.
I hope I have been clear so they can help me.
Thank you for your attention.
select * from [Model_Name].content
returns you all the information about the model (all the nodes in the tree).
select NODE_UNIQUE_NAME from [Model_Name].content where NODE_TYPE=2
returns NODE_UNIQUE_NAME of the root node. If you want to find all children of the root node (all the first splits) you can execute query like
select * from [Model_Name].content where [PARENT_UNIQUE_NAME]='000000004'
where '000000004' is NODE_UNIQUE_NAME of the root node.
Tatyana Yakushev [PredixionSoftware.com]
Similar Messages
-
Brbackup - querying the most recent directory
Before I hack my backup script, is there a cli where I can query the most recent
backup directory ? instead of look in initABC.sap for the backup_root etc and
looking for the last backup in the .../sapbackup/backxxx.log ?
For example in the initXXX.sap my backup_root is
/centos1/data2/sap01/PSM_DB_BACKUP
and an example output from a brbackup has in it
BR0106I Files will be saved on disk in directory: /centos1/data2/sap01/PSM_DB_BACKUP/bdushuca
or
BR0058I BRBACKUP action ID: bdushuca
Is there a cli that I can get something with the bdushuca in it ?cli - sorry command line ...
i started looking at that log file, but not sure if the last line would be it,
say if a particular backup failed the subdirectory would not get created.
for now I'm sending the stdout of brbackup to a file, then when brbackup
is finished I'm using awk to find BR0106I then getting the directory from
that line.
by doing that I know that directory xyz is the one associated with this
backup.
works but though there may be a cleaner way.
-pete TOTALLY new to sap -
Questions on the most efficient select query..
What is the difference between the two select query & please explain y is the 2nd select query more efficient??
DATA: MAX_MSGNR type t100-msgnr.
MAX_MSGNR = '000'.
SELECT * FROM T100 INTO T100_WA
WHERE SPRSL = 'D' AND
ARBGB = '00'.
CHECK: T100_WA-MSGNR > MAX_MSGNR.
MAX_MSGNR = T100_WA-MSGNR.
ENDSELECT.
DATA: MAX_MSGNR type t100-msgnr.
SELECT MAX( MSGNR ) FROM T100 INTO max_msgnr
WHERE SPRSL = 'D' AND
ARBGB = '00'.Hi,
First never use Check statement in the Select.
Next thing Select ... end select.
Coming to ur question In case of first select it will fetch each record from the data base and compares that record value with the variable(MAX_MSGNR) and assigns the value to the variable. And this process will continue till the select reads all the records of the data base. Also these operations happens on the data base server. SO this query not only affect ur program but also others who is accessing the same data base.
Second query is most efficient because of the aggregate function MAX. Here it will fetch all the records in single go and checks the max value for that column using
optimising algorithm. So number of checks, assignments(single assignment) and fetches will be less compared to first select. This is the main reason. Hope this clarified ur doubt.
Another thing is in first query we are selecting all the fields where as in second we are selecting only one field(required)
Thanks,
Vinod.
Edited by: Vinod Kumar Vemuru on Mar 13, 2008 4:55 PM -
SSRS 2008 R2 is extremely slow. The query runs in less than a second in the dataset designer but if you try to view the report it takes over 10 minutes. I have read this is a bug in SSRS 2008 R2. We installed the most recent patches and
service packs. Nothing we've done so far has fixed it and I see that I'm not the only person with this problem. However I don't see any answers either.Hi Kim Sharp,
According to your description that when you view the report it is extremely slow in SSRS 2008 R2 but it is very fast when execute the query in dataset designer, right?
I have tested on my local environment and can‘t reproduce the issue. Obviously, it is the performance issue, rendering performance can be affected by a combination of factors that include hardware, number of concurrent users accessing reports, the amount
of data in a report, design of the report, and output format. If you have parameters in your report which contains many values in the list, the bad performance as you mentioned is an known issue on 2008 R2 and already have the hotfix:
http://support.microsoft.com/kb/2276203
Any issue after applying the update, I recommend you that submit a feedback at https://connect.microsoft.com/SQLServer/
If you don’t have, you can do some action to improve the performance when designing the report. Because how you create and update reports affects how fast the report renders.
Actually, the Report Server ExecutionLog2 view contains reports performance data. You could make use of below query to see where the report processing time is being spent:
After you determine whether the delay time is in data retrieval, report processing, or report rendering:
use ReportServer
SELECT TOP 10 ReportPath,parameters,
TimeDataRetrieval + TimeProcessing + TimeRendering as [total time],
TimeDataRetrieval, TimeProcessing, TimeRendering,
ByteCount, [RowCount],Source, AdditionalInfo
FROM ExecutionLog2
ORDER BY Timestart DESC
Use below methods to help troubleshoot issues according to the above query result :
Troubleshooting Reports: Report Performance
Besides this, you could also follow these articles for more information about this issue:
Report Server Catalog Best Practices
Performance, Snapshots, Caching (Reporting Services)
Similar thread for your reference:
SSRS slow
Any problem, please feel free to ask
Regards
Vicky Liu -
How to know the most queried item? (please help me)
I'm doing a library's bookkeeping.
In a report I wanna know what's the book more queried or the most looked. But I dont know how to put the query in SQL.
can you please tell me?
the columns in the table are:
books varchar2(30)
author varchar2 (30)
(THERE's NOT any Book_id) or something.
please help me.That's not a Forms question. Please direct your question to the appropriate forum.
However, using those columns, there is no way to tell the book most queried, unless you store that information yourself, or use some sort of auditing in the database.
Regards,
Robin Zimmermann
Forms Product Management -
What are the basic difference in the putting a variable in Query
what are the basic difference in the putting a variable in
1. Characteristic Restrictions Vs 2. Default ValuesExample - Cost Center Analysis Report - If I have Controlling Area in
Char Restricitons Only - I have restricted it to say ABC Controlling Area or a Variable- Report will be hardcoded to ABC Controlling Area or the Input Value entered during Runtime - After Execution, The Same cannot be changed in the report.
Assuming I will not have Controlling Area in the report means not in Rows n Columns.
You might have seen no change - > Did you place material in Rows or Columns ? -
Hello my friends:
I am wondering what is the most effective way to deal with errors, specifically in a
Stored Procedure.
I wrote something like this:
BEGIN TRY
BEGIN TRANSACTION
/*My statements goes in here*/
IF ERROR_NUMBER() = 0 -- Do I need this line?
COMMIT TRANSACTION;
END TRY
BEGIN CATCH
IF ERROR_NUMBER() > 0 --Do I need this line?
ROLLBACK TRANSACTION;
END CATCH;
It would make sense using the if Statement when attempting to log errors.
Just too many variations.
ThanksAlso read this great article
http://sqlblog.com/blogs/alexander_kuznetsov/archive/2009/05/13/your-try-block-may-fail-and-your-catch-block-may-be-bypassed.aspx
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Can I put a SQL query into a bind variable and then use it to output report
Hi,
Can I put a SQL query into a bind variable and then use it to output report?
I want to create a report and an item "text area" (say P1_TEXT) which can let user to input a SQL query(they are all technical users and knows SQL very well). Then, I use a bind variable (that text area) to store the SQL statement. Then, I add a submit button and I want to use the following to output the report:
select * from (:P1_TEXT);
Do you think it is possible to do that? Any known limitations for APEX in this area?
Thanks a lot,
AngelaYou can, but make sure it's what you really want to do. Make sure you are VERY familiar with SQL Injection. Most people who know what it is, go out of their way to prevent SQL Injection. You're going out of your way to allow it.
You can try using &P1_TEXT. instead of bind variable syntax. Bind variables are one of the best ways to prevent SQL Injection, which is why it's not working for you.
Once again, I strongly urge you to consider the implications of your app, but this suggestion should get it working.
Tyler -
Query Performance - Customer Exit Variable
Hi All,
In the report I am using a customer exit variable on FiscalYear Period. When the user inputs a FiscalYear Period it gets the data for the previous 52 weeks. For ex. If the user inputs 052.2008, then it get the data from 001.2008 - 052.2008 (for 52 weeks).
Here the report takes a significant time to run. I do understand from the high data volume perspective. Here I could not depend much on the aggregates, as the input selection is dynamic.
Are there any ways to improve the performance of the query. If aggregates is a solution, then on what basis should I build the same.
Thanks in advance.Hi ,
You can use OLAP Cache....this will help you improve the performance of the query.
The OLAP cache is architected to store query result sets, and to give all users on an application server access to those result sets. If a user executes a query, the result set for that queryu2019s request can be stored in the OLAP cache. If that same query (or a derivative) is then executed by another user, the subsequent query request can be filled by accessing the result set already stored in the OLAP cache. In most cases, a query request filled from the OLAP cache is significantly faster than queries that receive their result set from database access.
Go to RSRT >> give the query name >> Click on Execute and Debug >> there uncheck the box " Do not use Cache".then execute....
Again execute the query without Cache........just check if it makes any difference.......
Thanks and Regards,
Debjani.. -
How can we find the most usage and lowest usage of table in Sql Server by T-SQL
how can we find the most usage and lowest usage of table in Sql Server by T-SQL
The table has time stamp column
StartedOn datetime
EndedOn datetimeThe Below query has been used , but the textdata column doesnot include the name of the table ServiceLog.
SELECT
FROM
databasename,
duration
fn_trace_gettable('F:\Program
Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\log_148.trc',
default)
WHERE
DATABASENAME='ZTCFUTURE'
AND TEXTDATA
IS
NOT
NULL
--AND TEXTDATA LIKE 'SERVICE%'
order
by cpu
desc; -
Help with getting the most recent transaction
I have a system that keeps track of part repairs. Unfortunately a part my come in for repair multiple times. I want my query to pull back the most recent time/ request id that a part came in. This is my basic query, but it pulls back multiple records for the given part/serial number combo. How can I re-write this? Thanks
SELECT M4OWNER.STOCK_SERIAL_ID.BIN_ID AS "Bin",
M4OWNER.RECEIVING_UNIT.CREATED_DTTM AS "Date Placed in Bin",
M4OWNER.STOCK_SERIAL_ID.SERIAL_ID AS "Serial ID",
M4OWNER.STOCK_SERIAL_ID.PART_ID AS "Part ID",
M4OWNER.STOCK_SERIAL_ID.USEABLE AS "Usable Status",
M4OWNER.RECEIVING_UNIT.REQUEST_ID AS "Request ID",
M4OWNER.RECEIVING_UNIT.REQUEST_LINE AS "Line",
M4OWNER.STOCK_SERIAL_ID.PLACE_ID AS "Warehouse",
M4OWNER.STOCK_SERIAL_ID.LOCATION AS "Location"
FROM M4OWNER.STOCK_SERIAL_ID INNER JOIN
M4OWNER.RECEIVING_UNIT ON M4OWNER.STOCK_SERIAL_ID.SERIAL_ID = M4OWNER.RECEIVING_UNIT.SERIAL_ID AND
M4OWNER.STOCK_SERIAL_ID.PART_ID = M4OWNER.RECEIVING_UNIT.PART_ID INNER JOIN
M4OWNER.RECEIVING ON M4OWNER.RECEIVING_UNIT.RECEIVING_ID = M4OWNER.RECEIVING.RECEIVING_ID INNER JOIN
M4SUPP1.PART ON M4OWNER.STOCK_SERIAL_ID.PART_ID = M4SUPP1.PART.PART_ID
WHERE (M4OWNER.STOCK_SERIAL_ID.BIN_ID = 'LOCATION')
AND (M4OWNER.STOCK_SERIAL_ID.SERIAL_ID = 'ISSUE360')I have a system that keeps track of part repairs. Unfortunately a part my come in for repair multiple times. I want my query to pull back the most recent time/ request id that a part came in. This is my basic query, but it pulls back multiple records for the given part/serial number combo. How can I re-write this? Thanks
SELECT M4OWNER.STOCK_SERIAL_ID.BIN_ID AS "Bin",
M4OWNER.RECEIVING_UNIT.CREATED_DTTM AS "Date Placed in Bin",
M4OWNER.STOCK_SERIAL_ID.SERIAL_ID AS "Serial ID",
M4OWNER.STOCK_SERIAL_ID.PART_ID AS "Part ID",
M4OWNER.STOCK_SERIAL_ID.USEABLE AS "Usable Status",
M4OWNER.RECEIVING_UNIT.REQUEST_ID AS "Request ID",
M4OWNER.RECEIVING_UNIT.REQUEST_LINE AS "Line",
M4OWNER.STOCK_SERIAL_ID.PLACE_ID AS "Warehouse",
M4OWNER.STOCK_SERIAL_ID.LOCATION AS "Location"
FROM M4OWNER.STOCK_SERIAL_ID INNER JOIN
M4OWNER.RECEIVING_UNIT ON M4OWNER.STOCK_SERIAL_ID.SERIAL_ID = M4OWNER.RECEIVING_UNIT.SERIAL_ID AND
M4OWNER.STOCK_SERIAL_ID.PART_ID = M4OWNER.RECEIVING_UNIT.PART_ID INNER JOIN
M4OWNER.RECEIVING ON M4OWNER.RECEIVING_UNIT.RECEIVING_ID = M4OWNER.RECEIVING.RECEIVING_ID INNER JOIN
M4SUPP1.PART ON M4OWNER.STOCK_SERIAL_ID.PART_ID = M4SUPP1.PART.PART_ID
WHERE (M4OWNER.STOCK_SERIAL_ID.BIN_ID = 'LOCATION')
AND (M4OWNER.STOCK_SERIAL_ID.SERIAL_ID = 'ISSUE360') -
How to get the most current file based on date and time stamp using SSIS?
Hello,
Let us assume that files get copied in a specific directory. We need to pick up a file and load data. Can you guys let me know how to get the most current file based on date and time stamp using SSIS?
Thanks
thx regards dinesh vvhi simon
i excuted this script it is giving error..
Microsoft SQL Server Integration Services Script Task
Write scripts using Microsoft Visual C# 2008.
The ScriptMain is the entry point class of the script.
using System;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime;
using System.Windows.Forms;
namespace ST_9a6d985a04b249c2addd766b58fee890.csproj
[System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
#region VSTA generated code
enum ScriptResults
Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
#endregion
The execution engine calls this method when the task executes.
To access the object model, use the Dts property. Connections, variables, events,
and logging features are available as members of the Dts property as shown in the following examples.
To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
To post a log entry, call Dts.Log("This is my log text", 999, null);
To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
To use the connections collection use something like the following:
ConnectionManager cm = Dts.Connections.Add("OLEDB");
cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
To open Help, press F1.
public void Main()
string file = Dts.Variables["User::FolderName"].Value.ToString();
string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::FolderName"].Value.ToString());
System.IO.FileInfo finf;
DateTime currentDate = new DateTime();
string lastFile = string.Empty;
foreach (string f in files)
finf = new System.IO.FileInfo(f);
if (finf.CreationTime >= currentDate)
currentDate = finf.CreationTime;
lastFile = f;
Dts.Variables["User::LastFile"].Value = lastFile;
Dts.TaskResult = (int)ScriptResults.Success;
thx regards dinesh vv -
How to query the database in an Entity Object (EO)
I am using JDeveloper 11.1.2.2.0
I am Forms developer working in a new ADF project and need some help from the ADF gurus, I am just a ADF beginner.
Maybe hits question has a easy solution, but I don't know how to implement this:
I have simplified my scenario, but this is what I Need to do:
One database table DBTABLE with 3 columns (C1,N1,D1) C1-varchar2; N1-Numeric; D1-Date.
In the DBTABLE I have the following data:
ONE; 10; 01/10/2012
ONE; 20; 02/10/2012
TWO; 15; 02/10/2012
ONE; 15; 03/10/2012
I have created an ADF EO for the DBTABLE with all 3 attributes, then I have created another transient numeric attribute T1.
My requirement is when I create a new record and set attribute C1=ONE the transient attribute T1 should show sum(N1) from DBTABLE where D1>= 01/10/2012 and D1 < 03/10/2012.
In this case when I create a new record should the shown in T1 a total of 10+20 = 30.
I know how to use the EOImpl getters and setters, and how to set the T1 attribute when C1 is set. My problem is how to calculate the total T1.
How can I implement this in ADF? It is possible to implement this in the EO? It is possible to make the query select sum(N1) from DBTABLE where D1>= 01/10/2012 and D1 < 03/10/2012 and return the value to the EO attribute?
Thank you in advanceHi Peter
Thank you for your suggestions, both of them are interesting but unfortunately they do not solve my problem, or at least I don’t know how.
I will try to better explain my problem
I have te table DBTABLE and another related table called DBDATES with colums(C1,DT1,DT2,TARGET) where I record periods of time and desired target. For instance my DBDATES table could have the following records
ONE; 01/01/2012; 31/01/2012; 100
ONE; 01/02/2012; 29/02/2012; 90
ONE; 01/03/2012; 31/03/2012; 95
TWO; 01/01/2012; 31/01/2012; 140
Exist a FK between both tables in the C1 column.
I have created an EO for the table DBTABLE with the tree persistent attributes (C1, N1, D1) an transient attribute (T1). The (C1,D1) is my DB primary key.
When I create a new record in the DBTABLE and based in the actual date I need to query the DBDATES table to check which is my TARGET and the valid target dates. For Instance if a record for person ONE is created on February 12, my TARGET is 90 from 01/02/2012 to 29/02/2012.
At the same moment I need to check the total amount of items record to the person ONE during the full target period.
Select sum(N1)
From DBTABLE
Where D1 between V2 and V3
And C1= V1;
Bind variables:
V1 = ‘ONE’;
V2 = ‘01/10/2012’ – queried from DBDATES
V3 = ‘03/10/201’ – queried from DBDATES
In resume, for a determined person when I create a new record in the DBTABLE I need to know their target for the actual period and how much as been record until now.
I don't know if is possible to solve this without using the View Objects, because I need to query the DBTABLE for a time frame and with bind variables.
Thank you in advance for your help. -
How do I check the Oracle enviornment variables for a connection?
I am using Oracle JDBC 10.2.0.4 and trying to output the Oracle enviornment variables for a connection.
I am trying to determine if the values output from sqlplus from the following two SQL select statements are different in the connection object:
SELECT * from NLS_SESSION_PARAMETERS order by 1;
NLS_CALENDAR GREGORIAN
NLS_COMP BINARY
NLS_CURRENCY $
NLS_DATE_FORMAT MM/DD/YYYY HH24:MI:SS
NLS_DATE_LANGUAGE AMERICAN
NLS_DUAL_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_LANGUAGE AMERICAN
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NUMERIC_CHARACTERS .,
NLS_SORT BINARY
NLS_TERRITORY AMERICA
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
SELECT sys_context('userenv','language') from dual;
AMERICAN_AMERICA.WE8ISO8859P1
Is there a way to do this in the API or do I just need to run the SQL statements in a Class and output the values to a log?
Thanks,
--ToddSo try it.
Create a connection with no settings.
Alter all of the (session only)
Query again and see.
Either the query will return the altered values or it won't. -
Issue with the Replacement Path Variable.
Hi,
I have an issue in using the Replacement Path Variable.
Issue: I have Sales information in the Sales Cube and AR information in the Accounts Receivable cube. Now we have a requirement to show the open AR documents with Sales information in it.
Apparently the system generates same number for both AR and Billing document.
So I thought of using the Replacement path variable in the Sales Query on Billing Document, so that it runs the AR query to get the list of open AR documents into the Sales query. But the system is complaining:
"System error in program CL_RSR_OLAP and form IF_RSR_OLAP~MODIFY_VQUERY_SETTINGS-01- (see long text)".
I searched OSS note on this and found the note: 1432062. Implemented, but now it complains:
"Abort Variable XXX cannot be replaced in this query".
I am trying to return the result from Accounting Document to the Billing Document. I know this is an issue, but after implementing the Note, i thought it would be fixed. But no luck.
Did anyone come across this situation. If you have any solution for this, pls let me know.
Thanks.Hello;
Why don't you try to add the billing document in your financial cube;
mapping it with the a ccount document number?
This should make the replacement path work fine.
Maybe you are looking for
-
Bought ram for Macbook 4,1 and wont boot up
Hey guys i just bought some new ram to upgrade my macbook 2.1 Ghz Intel Core 2 Duo running Snow Leopard 10.6.8 and it says its the right ram for it but it doesnt boot up. the RAM i bought is 2GB PC5300/667Mhz DDR2. i bought 2 modules to equal 4GB and
-
Help to reg. crystal report with java
hi friends, I have installed the crystal report and J-Integra also. but I am not able to find the crystl32.ocx in my c:\windows\system32 folder . So I downloaded it separately and use the J-Integra's com2java convertor to generate crystal package. Th
-
Hello, I am attempting to import 3d files into Acrobat 3d, from Blender. I've tried several different export formats from Blender and upon import to Acrobat 3d, I get the message: "The file contains no displayable geometry." Is there a way to get aro
-
BeX Analyzer 7.0 dynamic formatting
Hello, we have the BeX Analyzer 7.0 and want to format the workbook like highliting the Characteristic names. It is okay when the grid stay as during the formatting. But if someone will change the view by adding anothe characteristic the formatting i
-
Custom characteristics and Keyfigures?
Hi all Can any one name possible custom characteristics and keyfigures in SD? THNKS DURAI