How prepare Query for time series algorithm?

Hi every one, 
i want next 6 month prediction, how prepare the Query ,
I have Date column,Crime column,Incidents Column,I going with next 6 month so how we get date columns month wise or date wise,
if month wise means,How split the Year and month from date colum??
Please i need some help.....waiting for reply.....
pandiyan

Hi Leo,
Thanks a lot for replay.
but using  help of this blog also this problem not solve.
is this problem can we  solve using  "Seasonal Decomposition of Time Series by Loess".
Regards,
Manish

Similar Messages

  • Time Series algorithm problem

    Hi,
    problem-In Time Series Algorithm predication  is wrong if Sales value is negative
    i  have data for more than  3 years  ,
    sample data like
    Year/Month
    Zone-1 Sales
    201001
    -5467.66
    201002
    2345.88
    201003
    -7895.33
    201004
    2345.65
    201005
    120.2333
    Due to negative value my prediction for next month is wrong. Please tell me how I can handle this problem. Negative values come due to sales return in zone.

    Hi Leo,
    Thanks a lot for replay.
    but using  help of this blog also this problem not solve.
    is this problem can we  solve using  "Seasonal Decomposition of Time Series by Loess".
    Regards,
    Manish

  • SAP HANA One and Predictive Analysis Desktop - Time Series Algorithms

    I have been working on a Proof-of-Concept project linking the SAP Predictive Analysis Desktop application to the SAP HANA One environment.
    I have modeled that data using SAP HANA Studio -- created Analytic views, Hierarchies, etc. -- following the HANA Academy videos.  This has worked very well in order to perform the historical analysis and reporting through the Desktop Application. 
    However, I cannot get the Predictive Analysis algorithms -- specifically the Time Series algorithms -- to work appropriately using the Desktop tool. It always errors out and points to the IndexTrace for more information, but it is difficult to pinpoint the exact cause of the issue.  The HANA Academy only has videos on Time Series Algorithms using SQL statements which will not work for my user community since they will have to constantly tweak the data and algorithm configuration. 
    In my experience so far with Predictive Analysis desktop and the Predictive Algorithms, there is a drastic difference between working with Local .CSV / Excel files and connecting to a HANA instance.  The configuration options for using the Time Series Algorithms are different depending upon the data source, which seems to be causing the issue.  For instance, when working with a local file, the Triple Exponential Smoothing configuration allows for the specification of which Date field to use for the calculation.  Once the data source is switched to HANA, it no longer allows for the Date field to be specified.  Using the exact same data set, the Algorithm using the local file works but the HANA one fails. 
    From my research thus far, everyone seems to be using PA for local files or running the Predictive Algorithms directly in HANA using SQL.  I can not find much of anything useful related to combing PA Desktop to HANA. 
    Does anyone have any experience utilizing the Time Series Algorithms in PA Desktop with a HANA instance?   Is there any documentation of how to structure the data in HANA so that it can be properly utilized in PA desktop? 
    HANA Info:
    HANA One Version: Rev 52.1
    HANA Version: 1.00.66.382664
    Predictive Analysis Desktop Info:
    Version: 1.0.11
    Build: 708
    Thanks in advance --
    Brian

    Hi,
    If you use CSV or XLS data source you will be using Native Algorithm or R
    Algorithm in SAP Predictive Analysis.
    When you connect HANA, SAP Predictive Analysis uses PAL Algorithm which runs
    on HANA server.
    Coming to your question regarding difference,
    In SAP PA Native Algorithm, we could provide the Data variable, Algorithm
    picks the seasonal information from the Data column. Both R and SAP HANA PAL
    does not support Date Column. We need configure seasonal information in
    Algorithm properties.
    R Properties
    1) Period : you need to mention the periodicity of the Data
    Monthly : (12)
    Quarter : (4)
    Custom : you can use it for week or Daily or hourly.
    2) Start Year: need to mention Start year.
    Start year is not used by algorithm for calculating Time series, but it helps
    PA to generate Visualization ( Time series chart) by simulating year and
    periodicity information.
    3) Starting Period:
    if your data is Quarterly and you have data recordings from Q2, mention 2 in
    start period.
    Example.
    If the data periodicity is Monthy and my data starts from Feb 1979, we need to provide following information,
    Period: 12
    Start year: 1979
    start Period: 2
    PAL Properties. : Same as properties defined in R.
    Thanks
    Ashok
    [email protected]

  • How can you build time series measures in OBIEE without using TODATE AGO fu

    How can you build time series measures in OBIEE without using TODATE and AGO function?
    Please provide steps to build time series
    measures in OBIEE without using TODATE and
    AGO function. Dashboard results not storing
    in cache when using TODATE and AGO functions.
    eventhough its cached users queries not
    hitting cache because queries doesn't match
    exact date time when using TODATE and AGO
    functions. so I want to build queries using
    sysdate and some simple calculations. Please
    send your inputs/ideas for my questions..
    Thanks in Advance

    This can be using Msum function in answers. Use the following formula, here dollars is my metric. Change the formula based on your metric.
    Msum("Sales Measures".Dollars ,2) - "Sales Measures".Dollars
    the report will be cached and better performed compared with time series. check ti
    - Madan Thota

  • Function returning SQL query for mutiple series in a chart

    Hi,
    I would like to know if there is a way to specify a single PL/SQL function returning the queries for multiple series in a 2D Line Flash Chart. I have multiple series in my chart that has different values in the where clause. I can write a PL/SQL function that can return all these queries in one shot. Is there anyway that I can specify this function as returning the queries for all the series in the chart?
    As an example, assume that I am using the following three queries for the series in my chart:
    select deptno, count(*) from emp where deptno = 10 group by deptno
    select deptno, count(*) from emp where deptno = 20 group by deptno
    select deptno, count(*) from emp where deptno = 30 group by deptno
    I can't write a PL/SQL function that returns a query in the multiple series syntax (SELECT link, label, series_1_value [, series_2_value [, ...]]FROM ...) as I am using an aggregate function and my where clause is different for each series.
    Thanks,
    Rupesh

    Hi Roel,
    Thanks for your reply. I am already using an analytical function (RATIO_TO_REPORT(COUNT(*)) OVER () ) in my actual report. My problem is that the query for one series differs from the other only in one where clause. I will be able to dynamically able to generate all the queries for all the series in one pl/sql function. But the chart definition screen does not allow us to define a single function that returns queries for the all the series - possibly seperated by some seperator like S1: select.... S2:select and so on.
    Regards,
    Rupesh

  • How to build dynamic time series for the time dimension

    I am planning to build dynamic time series using rule file instead of manually.Please let me know if there is any property need to assign to enable DTS property for TIME dimension.
    Edited by: 844104 on Mar 14, 2011 3:37 AM

    In the load rule in the dimension build settings you would need to go to the tab dimension definition, choose the time dimension and right click on it. Select Edit properties. If you have not done so, set the dimension to be the time dimension. Then go to the generations/levels tab and set the generation names you need. For example if you want YTD, you would set the generation name to Year, if you want QTD set it to Quarter. You would set the number to the generation number that coorisponds to the generation. The DBAG has the list of names for all of the DTS members.

  • Next 4 hour prediction in time series algorithm

    I am Sucessed next 7 days prediction,
    but now i need to Create next 24 hour Prediction,
    how to prepare Data, plz kindly give some suggestion.....
    Thanks
    Pandiyan
    pandiyan

    Hi Leo,
    Thanks a lot for replay.
    but using  help of this blog also this problem not solve.
    is this problem can we  solve using  "Seasonal Decomposition of Time Series by Loess".
    Regards,
    Manish

  • Best Partition for Time Series

    Hi All,
    i have the following tables in my DB
    CREATE TABLE READING_DWR (
    ID     VARCHAR(20)     NOT NULL,
    MACHINE_ID     VARCHAR(20),
    DATE_ID     NUMBER,
    TIME_ID NUMBER,
    READING NUMBER
    CREATE TABLE DATE_DIMENSION (
    DATE_ID     NUMBER     NOT NULL,
    DATE_VALUE     DATE     NOT NULL,
    DAY     VARCHAR(10),
    DAY_OF_WEEK     INTEGER,
    DAY_OF_MONTH     INTEGER,
    DAY_OF_YEAR     INTEGER,
    PREVIOUS_DAY     DATE,
    NEXT_DAY     DATE,
    WEEK_OF_YEAR     INTEGER,
    MONTH     VARCHAR(10),
    MONTH_OF_YEAR     INTEGER,
    QUARTER_OF_YEAR     INTEGER,
    YEAR     INTEGER
    CREATE TABLE TIME_DIMENSION (
    TIME_ID     NUMBER     NOT NULL,
    HOUR     VARCHAR(3),
    MINUTE     VARCHAR(3),
    SECOND     VARCHAR(3),
    INTERVAL     NUMBER
    Referential Constrains:-
    STG_READING(DATE_ID)>>>>>DATE_DIMENSION(DATE_ID)
    STG_READING(TIME_ID)>>>>>TIME_DIMENSION(TIME_ID)
    READING_DWR contains the time series data for a particular machine.
    What is the best way to partition the READING_DWR to improve the performance of my select query??

    Thanks for posting the additional information. I think I have a better understanding of what you are trying to do.
    As I suspected partitioning has nothing to do with it.
    >
    Now where the first value is null , i have to get the record from the READING_DWR , where the time is less then 10:00 for a particular machIne
    >
    If I understand what you what you are trying to do correctly it is something like this. Please correct anything that is wrong.
    1. READING_DWR is a history table - for each machine_id there is a datetime value and an amount which represents a 'total_to_date' value
    2. STG_READING is a stage table - this table has new data that will be (but hasn't been) added to the READING_DWR table. All data in this table has a later datetime value than any data in the READING_DWR table. You know what the date cutoff is for each batch; in your example the earliest date is 10:00
    3. You need to report on all records from STG_READING (which has 'total_to_date') and determine the 'incremental-value'; that is, the increase of this value from the preceding value.
    4. For the first record (earliest datetime value) in the record set for each machine_id the preceding value will be the value of the READING_DWR table for that machine_id for the record that has the latest datetime value.
    5. Your problem is how to best meet the requirement of step 4 above: that is, getting and using the proper record from the READING_DWR table.
    If the above is correct then basically you need to optimize the 'getting' since you already posted code that uses the LAG (1 record) function to give you the data you need; you are just missing a record.
    So where you show output that was from only the STG table
    >
    Now the output will be
    =======================
    Time Reading lag
    10:00 200 null
    10:15 220 200
    10:20 225 220
    10:30 230 225
    >
    If you include the DWR record (and no other changes) the output might look like
    >
    Time Reading lag
    08:23 185 null
    10:00 200 185
    10:15 220 200
    10:20 225 220
    10:30 230 225
    >
    The above output is exactly what you want but without the first record. I assume you already know how to eliminate one record from a result set.
    So the process for what you need, in pseudo-code, basically boils down to:
    WITH ALL_RECORDS_NEEDED AS (
    SELECT machine_id, last_record_data FROM READING_DWR
    UNION ALL
    SELECT * FROM STG_READING
    SELECT lag_query_goes_here FROM ALL_RECORDS_NEEDEDThen either ignore or remove the earliest record for each machine_id since it came from READING_DWR and will have a NULL for the lag value. If you add a flag column to each query to indicate where the data came from (e.g. 'R' for READING_DWR and 'S' for STG_READING) then you can just use the records with a flag of 'S' in a report query or outer query.
    So now the problem is reduce to two things:
    1. Efficiently finding the records needed from the READING_DWR table
    2. Combining the one DWR record with the staging records.
    For #1 since you want the latest date for each machine_id then an index COULD help. You said you have an index
    >
    index on READING_DWR---MACHINE_ID,DATE_ID,TIME_ID
    >
    But for a query to find the latest date you want DATE_ID and TIME_ID to be in descending order.
    The problem here is that you have seriously garbaged up your data by using numbers for dates and times - requiring
    >
    TO_DATE(DATE_ID||''||LPAD(time_id,6,0),'YYYYMMDDHH24MISS'))
    >
    to make it useful.
    This is a VERY BAD IDEA. If at all possible you should correct it. The best way to do that is to use a DATE column in both tables and convert the data to the proper date values when you insert it.
    If that is not possible then you should create a VIRTUAL column using your TO_DATE functionality so that you can index and query the virtual column as if it were a date.
    For #2 (Combining the one DWR record with the staging records) you can either just union the two queries together (as in my psuedo-code) or extract a copy of the DWR and insert it into the staging table.
    In short query ALL of the DWR records you need (one for each machine_id) separately as a batch and then combine them with the STG records. Don't look them up one at a time like your posted code is trying to do.
    If your process is something like this and perhaps run every 15 minutes
    1. truncate the stage table
    2. run my report
    3. add stage records to the history table
    Then I would modify the process to use the 15 minutes 'dead' time between batches to extract the DWR records needed for the next batch into a holding table. Once you do step 3 above (update the history table) you can run this query and have the records preprocessed for your next batch and report.
    I would use a new holding table for this purpose rather than have the staging table server a double purpose. You never know when you might need to redo the staging table load; this means truncating the table which would wipe out the DWR staged records.
    Anyway - with all of the above you should be able to get it working and performing.

  • How to use dynamic time series in formula

    I have Time dimension with active Dynamic Time Series for Y-T-D.
    I'd like to use it in member formula - e.g. IF (@ISMBR("Y-T-D(Aug)")) - but this doesn't work as I get error message Unknown variable or member name.
    Any idea how to work with dynamic time series members in formula?
    Still using Essbase 6.5 X-(.

    As Glenn mentioned, I also don't believe you can reference a DTS member in a formula, you would have to calc the YTD. Take a look at the @PTD function to calc Period to date numbers, I believe this function was available in v6.
    Having said that, we're assuming you want to calc a ptd number, but your example was based on an IF @ISMBR(). So the question becomes what are you trying to do? Given what I assume your time dim looks like, what would be the difference between @ISMBR("Y-T-D(Aug)") and @ISMBR("Aug")

  • How to use Dynamic Time Series YTD on a calc script / member formula?

    Hi,
    I activated Dynamic Time Series on Essbase and would like to use the YTD function of a measure for a certain month.
    I tried to use
    MeasureName->YTD(Dec)
    MeasureName->Y-T-D(Dec)
    But couldn't use it to syntax problems. How can I call this function instead of using @Accum or @SumRange?
    Thank you
    Edited by: Icebergue on 10/Ago/2011 11:07

    I could be wrong, but I don't think you can use DTS members in calc scripts or member formulas. As you probably know, they can be used in Financial Reports, SmartView and Excel Add-in.
    You can create an alternate hierarchy in your Time dimension though:
    Jan (YTD): Jan ->Jan is being a shared member
    Feb (YTD): Feb+Jan (YTD) ->Both Feb and Jan (YTD) are being a shared members
    Dec (YTD): Dec+Nov (YTD) ->Both Dec and Nov (YTD) are being a shared members
    Cheers,
    Mehmet

  • SQL for Time Series Functions AGO and YTD

    When we use a time series function such as AGO or TODATE, OBIEE creates 2 physical queries. One query reads the calendar table. The other query reads the fact table without any date filter in the WHERE clause. Then the results of the 2 queries are stitched together. The query on the fact table returns a lot of rows because there is no filter on date.
    Is there a way to force OBIEE to put a filter on the date when performing the physical query on the fact table when using AGO or TODATE?
    Thanks,
    Travis
    v11.1.1.6

    We do have a date filter on the analysis. We need the analysis to show sales for a certain month and sales for that month a year ago, so we use the AGO function. However, it is really slow because it does a physical query on the sales table without filtering on date and then filters the results of that physical query by the dates from the physical query on the calendar table.

  • How to query for unacceptable characters

    Hi there. I can query for acceptable characters but would like to query for unacceptable characters. Please see the below thread. thanks in advance!
    How to find Special Characters in a table ?
    ~Darby

    Sorry, missed it in the other post (already saturday here). So without using regular expressions. I'm a little confused now I must say.
    You want to search for unacceptable characters (I assume those characters are known this time):
    length(the_column) - length(replace(translate(the_column,'UNACEPTBL','*'),'*','')) > 0
    Regards
    Etbin

  • How to set Dynamic Time Series in Planning application

    Dear All,
    I am having an issue by setting up dynamic time series (Y-T-D). I have set up at generation level 4. In our application the hierarchy of dimension Period is as follows.
    Yeartotal -> HY1 -> Q1 -> Jan, Feb, Mar
    Consider the following example
    Jan -> 100
    Feb -> 200
    Mar -> 300
    If I want to retrieve "Y-T-D Feb" the result should show me the sum of Jan & Feb in this case it should be 300. What is the syntax of retrieving YTD in smartview.
    In our application "Year" dimension name is "Year". How can I rename this dimension name if this is the requirement.
    Thanks in advance.
    Regards,
    Sami

    The format in Smart View would be Y-T-D(feb) more info at http://docs.oracle.com/cd/E17236_01/epm.1112/sv_user_11121102/ch17s02s02.html
    you will need to rename Year to something like Years, it depends if it is a classic or EPMA to how you rename it.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to query for two tables

    Hi,
    I have this problem, How can query a two table?
    Table A ->  Table B
    id               table-a_id
    name          table_b_name
    the relationship is one-to-many
    How can I get the result?
    Hope my question make sense
    cheers.
    thanks a lot.

    I bet you have more luck looking for an answer in a SQL forum.

  • How to query for messages on JMS Queue?

    Hi All,
    What is the best way to query on a JMS Queue? I would like to query for messages based on values entered on a screen. Can this be achieved using the JMS Adapter or any other adapter?
    JDev : 11.1.1.4
    Thanks and Regards.

    Hi,
    I am not 100% clear on your requirement and what selection criteria you need. I would be surprised if you need the DB adapter. If you just want to query how much message are in the queue or other related queries for example related to header information then DB adapter can be used. This only works when JMS queue is stored in the database. Personally I have never come across this requirement.
    I suggest to look in more detail of the JMS adapter. The JMS adapter can be used to select (subscribe) to certain messages. Please read the below for more information:
    http://docs.oracle.com/cd/E17904_01/integration.1111/e10231/adptr_jms.htm#CJACBCHJ
    The message is automatically removed from the queue (implicit delete) the moment it is picked-up. I would not recommend deleting a message directly from the queue using DB adapter. What is the point of publishing the message in the first place?
    Thanks
    Sander

Maybe you are looking for

  • Dynamic creation of ComponentUsage

    Hi people, I want to reuse a view (ViewA) in different views (ViewB, ViewC, ViewD).ViewA has a quite complex logic, so it is necessary to outsource this view.  Not only the logic, but also the count of UIElements and contextelements is quite large, f

  • Eraser tool will not work on image

    hi, I am completely new to this. I want to remove some areas of the image with the eraser tool. I don't know whats missing but when I select the eraser tool and hover the mouse pointer over art board, the pointer just changes to a pencil with a can't

  • Time Machine Fails trying to create a backup folder on Lion

    I just got a new 27 In 3.1 Ghz iMac. I've got 16gig of RAM. I purchased a new USB portable drive to use for Time Machine Backups. The system drive is 1TB with about 250 gig free (I moved a bunch of stuff from my old iMac with the Migration Assistant)

  • When i try to rent a MovieTalk on Apple Tv i can't load the film

    Ni everything everyone, Since two days I experienced the same problem : each time I try to rent a movie on the Apple tv, I see the film on the main screen but web I try to watch it, I have an error message saying that the film can't be loaded and tha

  • Where do they go?

    I'm downloading a music vid as we speak and I know that you can't put it on the iPod but I would just like to watch it on my computer. So once its done downloading does it go to the movies section or what?