apache systemml declarative large scale machine learning
play

Apache SystemML - Declarative Large-Scale Machine Learning Romeo - PowerPoint PPT Presentation

Apache SystemML - Declarative Large-Scale Machine Learning Romeo Kienzler (IBM Waston IoT) Berthold Reinwald (IBM Almaden Research Center) Frederick R. Reiss (IBM Almaden Research Center) Matthias Rieke (IBM Analytics) Swiss Data Science


  1. Apache SystemML - Declarative Large-Scale Machine Learning Romeo Kienzler (IBM Waston IoT) Berthold Reinwald (IBM Almaden Research Center) Frederick R. Reiss (IBM Almaden Research Center) Matthias Rieke (IBM Analytics) Swiss Data Science Conference 16 - ZHAW - Winterthur

  2. “High-level programming” –Assembler vs. Python?

  3. Why another lib? • Custom machine learning algorithms • Declarative ML • Transparent distribution on data-parallel framework • Scale-up • Scale-out • Cost-based optimiser generates low level execution plans

  4. Why on Spark? • Unification of SQL, Graph, Stream, ML • Common RDD structure • General DAG execution engine • lazy evaluation • distributed in-memory caching

  5. 2009-2010: Through 2007-2008: Multiple engagements with projects at IBM customers, we observe Research – Almaden 2009: We form a how data scientists involving machine dedicated team create ML solutions . learning on Hadoop. for scalable ML 2007 2008 2009 2010

  6. Research 2011 2013 2012 2014

  7. June 2015: IBM November 2015: June 2016: Announces open- SystemML enters Second Apache source SystemML Apache incubation release (0.10) September 2015: February 2016: Code available on First release (0.9) of Github Apache SystemML 2015 2016

  8. SystemML at Moved from Hadoop MapReduce to Spark SystemML supports both frameworks Exact same code 300X faster on 1/40 th as many nodes

  9. Systems Data Programmer Scientist R or Scala Python Results

  10. Alternating Least Squares j Products Customer i bought i product j. Customers

  11. Alternating Least Squares j Products Customer i bought i product j. Customers

  12. Alternating Least Squares j Products Customer i bought i product j. Customers

  13. Products Factor j Products Customer i bought i Customers Factor product j. Customers

  14. Products Factor j Products Customer i bought i Customers Factor product j. Customers

  15. Products Factor j Products Customer i bought i Customers Factor product j. Customers

  16. sparse matrix . × Multiply these two factors to Products Factor produce a less- j Products Customer i bought i Customers Factor product j. Customers

  17. sparse matrix . × Multiply these two factors to Products Factor produce a less- j Products Customer i bought i Customers Factor product j. Customers New nonzero values become product suggestions.

  18. U"="rand(nrow(X),"r,"min"="01.0,"max"="1.0);"" V"="rand(r,"ncol(X),"min"="01.0,"max"="1.0);"" while(i"<"mi)"{" """i"="i"+"1;"ii"="1;" """if"(is_U)" """"""G"="(W"*"(U"%*%"V"0"X))"%*%"t(V)"+"lambda"*"U;" """else" """"""G"="t(U)"%*%"(W"*"(U"%*%"V"0"X))"+"lambda"*"V;" """norm_G2"="sum(G"^"2);"norm_R2"="norm_G2;""""" """R"="0G;"S"="R;" """while(norm_R2">"10E09"*"norm_G2"&"ii"<="mii)"{" """""if"(is_U)"{" """""""HS"="(W"*"(S"%*%"V))"%*%"t(V)"+"lambda"*"S;" """""""alpha"="norm_R2"/"sum"(S"*"HS);" """""""U"="U"+"alpha"*"S;""" """""}"else"{" """""""HS"="t(U)"%*%"(W"*"(U"%*%"S))"+"lambda"*"S;" """""""alpha"="norm_R2"/"sum"(S"*"HS);" """""""V"="V"+"alpha"*"S;""" """""}" """""R"="R"0"alpha"*"HS;" """""old_norm_R2"="norm_R2;"norm_R2"="sum(R"^"2);" """""S"="R"+"(norm_R2"/"old_norm_R2)"*"S;" """""ii"="ii"+"1;" """}""" """is_U"="!"is_U;" }"

  19. U"="rand(nrow(X),"r,"min"="01.0,"max"="1.0);"" V"="rand(r,"ncol(X),"min"="01.0,"max"="1.0);"" while(i"<"mi)"{" """i"="i"+"1;"ii"="1;" """if"(is_U)" """"""G"="(W"*"(U"%*%"V"0"X))"%*%"t(V)"+"lambda"*"U;" """else" """"""G"="t(U)"%*%"(W"*"(U"%*%"V"0"X))"+"lambda"*"V;" """norm_G2"="sum(G"^"2);"norm_R2"="norm_G2;""""" """R"="0G;"S"="R;" """while(norm_R2">"10E09"*"norm_G2"&"ii"<="mii)"{" """""if"(is_U)"{" """""""HS"="(W"*"(S"%*%"V))"%*%"t(V)"+"lambda"*"S;" """""""alpha"="norm_R2"/"sum"(S"*"HS);" """""""U"="U"+"alpha"*"S;""" """""}"else"{" """""""HS"="t(U)"%*%"(W"*"(U"%*%"S))"+"lambda"*"S;" """""""alpha"="norm_R2"/"sum"(S"*"HS);" """""""V"="V"+"alpha"*"S;""" """""}" """""R"="R"0"alpha"*"HS;" """""old_norm_R2"="norm_R2;"norm_R2"="sum(R"^"2);" """""S"="R"+"(norm_R2"/"old_norm_R2)"*"S;" """""ii"="ii"+"1;" """}""" """is_U"="!"is_U;" }"

  20. U"="rand(nrow(X),"r,"min"="01.0,"max"="1.0);"" V"="rand(r,"ncol(X),"min"="01.0,"max"="1.0);"" while(i"<"mi)"{" """i"="i"+"1;"ii"="1;" """if"(is_U)" """"""G"="(W"*"(U"%*%"V"0"X))"%*%"t(V)"+"lambda"*"U;" """else" """"""G"="t(U)"%*%"(W"*"(U"%*%"V"0"X))"+"lambda"*"V;" """norm_G2"="sum(G"^"2);"norm_R2"="norm_G2;""""" """R"="0G;"S"="R;" """while(norm_R2">"10E09"*"norm_G2"&"ii"<="mii)"{" """""if"(is_U)"{" """""""HS"="(W"*"(S"%*%"V))"%*%"t(V)"+"lambda"*"S;" """""""alpha"="norm_R2"/"sum"(S"*"HS);" """""""U"="U"+"alpha"*"S;""" """""}"else"{" """""""HS"="t(U)"%*%"(W"*"(U"%*%"S))"+"lambda"*"S;" """""""alpha"="norm_R2"/"sum"(S"*"HS);" """""""V"="V"+"alpha"*"S;""" """""}" """""R"="R"0"alpha"*"HS;" """""old_norm_R2"="norm_R2;"norm_R2"="sum(R"^"2);" """""S"="R"+"(norm_R2"/"old_norm_R2)"*"S;" """""ii"="ii"+"1;" """}""" """is_U"="!"is_U;" }"

Recommend


More recommend