{"id":37985,"date":"2022-07-28T21:19:17","date_gmt":"2022-07-28T19:19:17","guid":{"rendered":"http:\/\/54.194.80.134.nip.io\/integracija-machine-learning-pipelines-a-u-sap-sistemski-pejzaz\/"},"modified":"2022-07-28T21:19:25","modified_gmt":"2022-07-28T19:19:25","slug":"integracija-machine-learning-pipelines-a-u-sap-sistemski-pejzaz","status":"publish","type":"post","link":"https:\/\/www.cubeserv.com\/hr\/integracija-machine-learning-pipelines-a-u-sap-sistemski-pejzaz\/","title":{"rendered":"Integracija Machine Learning Pipelines-a u SAP sistemski pejza\u017e"},"content":{"rendered":"\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\tKako mo\u017ee Machine Learning Pipeline sa grafi\u010dkim korisni\u010dkim interfejsom u Va\u0161em SAP sistemskom pejza\u017eu biti kreiran i kori\u0161ten potpuno integriran? U ovom blog postu pokaza\u0107u Vam kako da to uradite. Snimci ekrana su napravljeni tokom radionice na Swiss Data Science Conference 2020 sa SAP Data Intelligence verzijom 3.0.\r\n

Predvi\u0111anje cijene automobila odabrano je kao prvi Use Case. Odgovaraju\u0107i skup podataka mo\u017ee se na\u0107i na Kaggleu, pod:\u00a0https:\/\/www.kaggle.com\/code\/bozungu\/ebay-used-car-sales-data\/notebook<\/a>.<\/span><\/p>\r\n

Vrijednost koju treba predvidjeti (output variable) je cijena u eurima za koju je ponu\u0111en polovni automobil 2016. godine. Podaci se pohranjuju u SAP HANA bazu podataka, \u0161to osigurava pristup u memoriji i time visoke performanse. Kori\u0161teni model procesa je baziran na me\u0111unarodnom standardnom procesu za rudarenje podataka (CRISP-DM) okviru. Prve \u010detiri faze (razumijevanje poslovanja, razumijevanje podataka, modeliranje i evaluacija) su inicijalno implementirane pomo\u0107u Pythona uz podr\u0161ku Jupyter Notebook-a. Zatim je konfiguracija parametara algoritma regresije za pove\u0107anje gradijenta s najmanjom srednjom kvadratnom gre\u0161kom (RMSE) kori\u0161tena za modeliranje cjevovoda strojnog u\u010denja u grafi\u010dkom korisni\u010dkom su\u010delju SAP Data Intelligence i u posljednjem koraku za njegovu implementaciju kao RESTful API.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t

Data understanding u Python-u sa Jupyter Notebook-om<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t

U fazi “razumijevanja podataka”, upotreba Jupyter Notebook-a u programskom jeziku Python nudi niz funkcionalnosti za analizu i odgovaraju\u0107u obradu rezultata. Na slici ispod mo\u017eete prona\u0107i razli\u010dite vrijednosti za stupce u kori\u0161tenom skupu podataka, npr. jedinstvenost vrijednosti, nulte vrijednosti kao i prosje\u010dne i srednje vrijednosti. Ovo omogu\u0107ava, na primjer, da se sazna da li je neophodan tretman vanrednog stanja i kako se skup podataka mo\u017ee podijeliti na skupove podataka za obuku i validaciju.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"JupyterNotebook_Python_DataUnderstandingTooltips\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

Model training and evaluation sa Hybrid Gradient Boosting Regression<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t

Nakon upoznavanja podataka, izbor algoritma koji \u0107e se koristiti pao je na Hybrid Gradient Boosting Regression iz SAP Predictive Analytics Library (SAP PAL). Uneseni parametri su odabrani kao po\u010detna konfiguracija, zatim su specificirani stupci ili karakteristike koje \u0107e se koristiti kako bi se kreirao veliki broj modela obuke u posljednjem koraku. Za detaljne tehni\u010dke i matemati\u010dke informacije o podizanju gradijenta u Pythonu, mogu preporu\u010diti sljede\u0107u web stranicu:\u00a0<\/span><\/p>\r\n

Gradient Boosting in Python from Scratch<\/a><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"JupyterNotebook_Python_ModelTraining\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t

Zatim postoji mogu\u0107nost evaluacije kvaliteta modela prema razli\u010ditim statisti\u010dkim pokazateljima. Na snimku ekrana ispod, kao metrika je odabrana srednja kvadratna gre\u0161ka (RMSE). Parametri (N_ESTIMATORS i MAX_DEPTH) koji su doveli do najmanjeg RSME odabrani su za obuku modela koji \u0107e se koristiti.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

Kori\u0161tenje parametara konfiguracije u SAP Machine Learning Operator-u za In-Memory izvedbu<\/h2><\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t

Nakon modeliranja i evaluacije, \u010desto sam u pro\u0161losti vidio da je veliki izazov za tvrtke implementirati razvijene i evaluirane modele u proizvodnju. Integracija u postoje\u0107e poslovne procese i cjevovod strojnog u\u010denja putem razli\u010ditih IT sustava (s razli\u010ditim programskim jezicima) tako\u0111er su me\u0111u podcijenjenim aktivnostima. Data Intelligence Modeler omogu\u0107uje ovu integraciju IT sustava i programskih jezika u grafi\u010dko korisni\u010dko su\u010delje. Snimka zaslona u nastavku prikazuje podatkovni cjevovod koji se koristi za treniranje najja\u010deg modela. <\/span><\/p>\r\n

Budu\u0107i da se modeliranje i evaluacija u CRSIP-DM \u010desto provode u nekoliko iteracija, ima smisla i korisno je to u\u010diniti u Jupyter Notebook-u. Parametri koji su doveli do najja\u010deg modela mogu se zatim prenijeti u standardnu \u200b\u200bkomponentu “HANA ML Training”.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\"SAP\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t

U svakom cjevovodu u Data Intelligence Modeller-u mogu se koristiti razli\u010diti operatori. Primjer je “HANA ML Training”. Me\u0111utim, Python operator tako\u0111er se mo\u017ee koristiti, na primjer, za integraciju pojedina\u010dnog Python koda ili R koda (npr. ako se ne koristi algoritam iz SAP PAL-a, kao u ovom primjeru). <\/span><\/p>\r\n

Pristup velikom broju baza podataka, cloud providera i drugih SAP proizvoda kao \u0161to je S\/4HANA jednako je mogu\u0107 kao i kontrola SAP BW procesnih lanaca.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t

Deployment Machine Learning Model-a preko RESTful API<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t

Uz kreirani najja\u010di model, on sada mo\u017ee biti dostupan u potro\u0161a\u010dkom kanalu putem RESTful API-ja, kao \u0161to je prikazano na snimci zaslona u nastavku.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

Poziv RESTful API-ja za predvi\u0111anje cijena na bazi Machine Learning Model-a<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\tNakon uspje\u0161ne implementacije, mogu\u0107e je koristiti su\u010delje s POST zahtjevom za predvi\u0111anje cijene za automobil. Svojstva su dana u JSON formatu u tijelu POST zahtjeva (kao \u0161to je prikazano na slici ispod).\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

Integracija Machine Learning Pipelines-a u Va\u0161 IT sistemski pejza\u017e<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t

Kako se Machine Learnig Pipeline s grafi\u010dkim korisni\u010dkim su\u010deljem mo\u017ee stvoriti i potpuno integrirati u krajolik Va\u0161eg SAP sustava? U ovom postu na blogu pokazao sam vam kako je to mogu\u0107e uz SAP Data Intelligence.<\/span><\/p>\r\n

Nadalje, kori\u0161tenjem Jupyter Notebook-ova s Pythonom, vrlo je jednostavno iterativni pristup kod Data Mining ili Data Science implementirati na integrirani na\u010din i jednostavno ih integrirati u postoje\u0107e poslovne procese i IT procese, \u010dime se nudi dodana vrijednost.<\/span><\/p>\r\n

Moje kolege i ja rado \u0107emo s Vama razmijeniti ideje o Va\u0161im Data Science projektima i provjerit \u0107emo u kojoj Vam mjeri mo\u017eemo pru\u017eiti podr\u0161ku u budu\u0107nosti.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

\n\t\t\t\t\tDogovorite sada svoj<\/span>\n\t\t\t\t\n\t\t\t\t\tExpert Call.<\/span>\n\t\t\t\t<\/span>\n\t\t\t\t\tDrago nam je zbog Va\u0161e poruke.<\/span>\n\t\t\t\t\t<\/h3>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\"Picture\n\t\t\t\t<\/div>\n\t\t\t\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t
<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

Benedikt Bleyer<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
Design, Build and Run Your Business Analytics Platform. Professional experience in Advanced Analytics, Data Integration, Data Governance & Enterprise Planning.<\/h5>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t