• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Predictive Analysis in SAP HANA

Predictive Analysis

SAP HANA offers a radical new approach to predictive analytic where by the volume of data that may be analyzed and the speed of the analysis bring a new perspective to predicate analysis

In database predictive analysis coupled with a modern user interface to define the analysis process and support – the embedding of analysis process in applications, is a powerful combination

Overview of predictive analysis

Datamining is the exploration and analysis by automatic or semi auto matic means, of layer quantities of data in order to discover meaningful patterns and rules

The process of data access, data exploration, data prep action, modeling model deployment

In- Memory data mining & statistical analysis

In there ways to implement in – memory data mining & statistical analysis

(a) SQL Scripts

SQL script is asset of SQL extrusions which allow developers to push data – intensive logic into the database in order to avoid massive data copies to the application server and to leverage sophisticated parallel execution strategies of the database

The set of SQL extensions for the SAP HANA databases which allow developers to push data intensive logic into the database is called SQL script

These extensions are keys to avoiding massive data copies to the application server and to leverage sophisticated parallel execution strategies of the database.

SQL script V2 supports stored procedures, which provides enhanced control flow capabilities and is positioned to be more scriptable for pushing complex parts of application logic to the database

It can meet some requirement for reporting like join, aggregation, Etc. when it comes to data minify and statistic analysis, SQL script & not suitable for implementing complex algorithms

  (b) R

Through the ‘R’ integration solution, developers can leverage open Source RS 3000+ External packages to perform wide – range data mining and statistic analysis

An open source software language and environment for statistical computing and graphics with 3000 add – on packages

Aspired to become a SAP HANA Developer? Explore the post to discover the know-hows on SAP HANA Training Material.

The packages covers wide range of topics

Cluster analysis 4 finale mixture models

Probability distributions

Computational econometrics

Empirical finance

Statistical generics

Graphic displays, dynamic graphics graphic devices & visualization

Machine learning & statistical learning

Medical image analysis

Multi variant statistics

Natural languages processing

Statistics for the social – sciences

Time services analysis

(c)BFL (Business Function library)

BFL is the calculation library for the applications built on top of the SAP HANA database. The business functions are written in C++ and executed in data base calculation engine. BFL has a road map for data mining and statistical algorithms

Usage scenario: 1

Utilize open source ‘R’ as the data mining calculation engine

Application developer can embedded R scripts in the SQL script.

Screenshot_80

Sample codes in SAP HANA SQL Script

Create function LR (in input SVCC – PREC – type, OUT OUTPUTO R_COEF _ type)

LANGUAGE R LANG AS ‘’

CHANGE _FREQ <-input $ CHANGE _ FREQ:

SUCC _ PREC <- input $ SUCC – PREC;

Coefs ,- coef (glm (succ _PREC ~ CHANGE – FREQ, family = position));

CHANGE FREQ <- CICFS [ “(CHANGE _ freq”];

RESCSST <- as.data.frace (cbind (INTERCEPT, CHANGE FREQ))

‘’’;

TRUNCATE TABLE r-coef_tab;

CALL LR (SUCC – PREC – tab r-coef – tab);

SELECT* FROM v-coef – tab;

Scenario 2

Use open source R’s console to interact with SAP HANA data

The diagram is as will as scenario 1:

File edit view terminal help

Lom 787572e:/use/sap/HDB/HDB06>R.Q

>Library (ron)

>Library (RJDBC)

Loading required package : DBI

Loading required package: rjawa

>Jdc path ,-“use/sap/HDB/HDBDD/exc/imprsjdbc.jas”

>drv <-JDBC (“com.ptime.sql.Driver”, jdbe path, identifie-identifier.quote= “ ‘ “)

>conn <-db connect (drv, “jdbc : ptime : local host : 300’s;

“system”  , “manager”)

>SQL <- “select * from TEST – DATA – INT”

>get data frome (com, SQL, “VAr1”)

To register  ‘var1’ with slim ID 3391796252027132

>dim (var 1)

[1[ 10000                    100

>var 1$ col 1[1:10]

[1] 1451      1325     1959     1743     885        1484                     1293

>resuits       <-kmoans (vat2.5)

>results $ size

[1] 2028 2000 2019 1981 1972

>cleanup object (“var1”)

[[1]]

[1] “var”

For an Indepth knowledge on SAP HANA, click on below

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Predictive Analysis in SAP HANA"

Leave a Message

Your email address will not be published. Required fields are marked *

Site Disclaimer, Copyright © 2016 - All Rights Reserved.