Thursday, December 29, 2016

Fundamentals of Machine Learning

Machine learning is a branch out of research in artificial intelligence area. It is a field of study  that gives computers the ability to learn with out being explicitly programmed.

Computer program is said to learn from experience E with respect to some task T and some performance measure P

and its performance on T measured by P improves with experience E.



Supervised learning

Given a data set and already knowing what our correct output should look like, meaning, having an idea that there is a relationship between the input and the output.

Mainly categories into regression and classification.

Regression

Predict results with in a continuous output,

meaning, trying to map input variables to some continuous function.

Predicting the price of the house based on size is an example for regression learning. Where price as a function of size is a continuous output, so it is a regression problem.

If the question is whether the house can be sold for more of less than the asking price, then it becomes classification problem as here we are classifying the houses based on price into two discrete categories. "More" or "Less"

Given the picture of a person, predict the age. here picture is an input variable for the person.

Classification


trying to predict results in a discrete output. trying to map input variables
into discrete categories.

Example: Given a patient with tumor we have to predict whether the tumor
is malignant or benign(non-malignant).


Unsupervised Learning

Allows us to approach problems with little or no idea what our results should like like. We can derive structure from data where we dont necessarily know the effect of the variables.

with unsupervised learning there is no feedback based on the prediction results.

By clustering the data based on relationships among the variables in the data, we can derive this structure.

Social network analysis
astronomical data analysis
market segmentation
organize computing clusters

Octave or Matlab tools are optimized for rapid vectorized calculations, which is very useful in maching learning. Apart from that
R, Python, Julia, Clojure tools are used in Maching leanring.

Clustering

Example: Take a collection of 1000000 different genes, and find a way to automatically group these into group that are somehow similar or related by different variables, such as lifespan, location, roles, and so on.

Non Clustering

Example: The cocktail party algorithm allows you to find structure in a chaotic environment (i.e. identifying individual voices and music from a mesh of sounds at a coctail party.)

Saturday, January 30, 2016

BW on HANA Migration

Recently I have completed a BW on HANA migration. Just writing important notes/takeaways from the project for reference.

You are in BW 3.x ?



You have to first upgrade BW 3.x to BW 7.x for you to migrate BW on non HANA to HANA.
Importantly the authorization concept should be migrated to analysis based authorization as role based authorization of BW 3.x no longer exists.
Object types relevant to BW 3.x such as update rules, transfer rule, infospoke, no long exists.


Major activities for BW HANA Migration?


Ensure you have applied the latest SP as lot of changes pre and post migration activities will be taken care of if we have the latest SP with SAP BW 7.5 or BW 7.4.

If you are already in BW 7.x running on any RDBMS. Then you can start migrating the DB to HANADB using DMO (Data base Migration  Option) of SUM (Software Update Manager).


Before you do there are certain BW specific housekeeping activities needed to be performed.

1. You can use standard task list SAP_BW_BEFORE_MIGRATION in stc01 tcode. Many of the housekeeping activities are taken care of here.

2. If you have plans of archiving, then go for NLS approach. This is a separate excercise.

3. If you are you production, either you can follow copy approach(copy of the production box) where you will use delta cloning to minimize the downtime of the production system. Else you can empty all the delta queues and ensure the info packages do not run before migration. The delta queues in R/3 will be populating as normal. Once you are ready post migration, you can extract  those delta queues.

4. SAP_BW_POST_MIGRATION task list will executed.

5. Check for SNOTES/SPAU for inconsistent notes and fix it. Also run index creation job using program RSDDB_INDEX_CREATE_MASS

6. Check for table consistency using RSDU_TABLE_CONSITENCY.There is a separate program RSDU_PSA_PARTNO_CHECK to repair inconsistent PSA tables.  Ideally this can be taken care by the previous program mentioned.


7. Regenerate all transformation rules using RSDG_TRFN_ACTIVATE.

8. Convert Infocubes to HANA In memory optimized using RSMIGRHANADB tcode.

9. DSO will already be HANA optimized during migration - So no action required.

10. Multiprovider can be converted to Composite provider - As such converting MPRO to CPRH does not optimize any performance because MPRO is based on Union and converting it to CPRH will only change the object type.

It is required only if below cases

a. You want to create a HANA model using Composite provider and generate it as external HANA view.

b. You want to further perform changes in Composite Provider to perform Join and Union both.

11.  Migrate and Adjust BW Workspaces using below set of programs.

a. RSL_WSP_ADJUSTMENT_AIX
B. RSL_WSP_ADJUSTMENT_COMPLETE

12.  Perform a test load and extract all the delta queues into BW.

13. Configure and Implement BW - MT tools using Eclipse based HANA studio. Just install software for BW-MT ABAP and other required perspectives. Add BW system and check if the objects create in studio is getting created in RSA1.

14. If you want to enable hidden objects  you can do so using RSCUSTV32 tcode.

15. Enable Web Dynpro by activating services usng SICF_INST and SGEN.

/default_host/sap/bc/webdynpro/sap/RSDMDM_MD_NEW_APP
/default_host/sap/bc/webdynpro/sap/RSDMDM_MD_MAINTENANCE_APP


16. Enable UI5 process monitor - then you can access RSPCM process chain monitor in web using RSPCM_WEB


For details, you can refer SAP First guidance - Using the DMO option to migration BW on HANA available publicly.