Multilineare Regression (maschine learning vs normal equation)

3D regression modell of 2 variables
3D visualisation of data with 2 columns dtHead indexed by XAx (xAxis), YAx (yAxis) to last column zAxis.[br]E(x,y)=(w(1), w(2), w(3)) (x, y, 1) [br][br][url=https://aegis4048.github.io/mutiple_linear_regression_and_visualization_in_python#fig-3]https://aegis4048.github.io/mutiple_linear_regression_and_visualization_in_python#fig-3[math]\nearrow[/math][/url][br][br]Python Script 4 pyggb[br][br][url=https://www.geogebra.org/python/index.html?name=multiRegressionLearning&code=eJzVm1tPHFmWhd%2FzV4SwLIErCcf9Yg0tuaV5KGnKDz0jDYihS9gkdnYBRpm4sefXz7fWPpEXg6tqNE9j2Rgizz5nX9e%2BnOBFdnv54dPybpHdLC5Xd8u7j9ntl5uH5f0NT3h8ucpWi4%2BrxXq9%2FHw3m81eZFn2Psu%2Blvyr%2BFfPTk%2FOz2flvKzyYphX%2BVjxZZgPZd7My7zs%2BKku503ZtXk5duVYXszPZ5WW18O8ztuaL1U1b7q87OdFPoxQDXzSdlA3XVW0IqjnZZMX2rod53xXznud4vVV3kNfDU1eN0PbN1rP2X3e9fMu71sWdJwy5gNcikkf0BbjkHdDMXSjCFoRtOyTtz0clawq8lEitKIa53VTwGJdDXWl9Z0YgvlGu3LAOG%2FrvIMh03ByU49t3nd11Xr%2Ffl7WecM2LEJJ9byr876UAGKnRUFFkzcFTHk5TzlZCiqsoJbtWcwx8MKTZkSypuoLq5OnKEbaQRNV3rA7Z0udI3Ll4zBviqrlmLJsaxGUhdhh11r8mpOuy7EKKpc08FMNLQrvysriliiBnxvkraVxLCb7bBTKYU03wnLT1WGxkt1Q2IgJahFgtjHXegRB4m7eltWQV0U19l7O0y4fqnmbN%2BFBMAQfHILqJALMi9ui72N%2FmxhmGgmJ%2BKiok%2Bhs3vMzJ7dww5NybK2lkt3qfKg5opIRMKyErlCTzJ13SFdXuGSHokJNWLnEq0Kx2A%2FaQRYp5CWcgQJbHGscmqoLCpgdxcuQN6WsJ0%2BW3b0Ncs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urixNlpZd5c50dnmU3l%2B8XN%2Fan66PJfyescQV5gVWoFGRubCSwtP5ms4ODgxkgkc0%2BPTzcr9%2B8fv34%2BJh%2FWF2uP%2F32ZbU%2BXj9gxfXD8rf8avF6cobjcIbF8dYbXs9mO4ADIuucvS8Xuz6R2SnkEVm5OC7a2TZA%2BFNsI4TWn56K8V7d0gNznTh%2Bt7bcrtU7PszFaMg1S%2BLyu9tfWm2XqgPmVwEYTNKVDV1Rz%2FI831lNw8VUcbsev6WN47qm6Dounfrq%2B7XD82v1mkrx%2Fdrx2bV6rbwaZ7NNPKBDooUOe9Sr17wzPzAYbObQVIxIeY1Ab4UNXUNv6H143aFnXkd8MT1mvJWpn6S5Q2lsUHB%2FyasK9Bx%2FHCr7PHDVxAUSt5m8Ig9QsLFOYyLK73fUvLNNw0kLH6dxaVRzyT%2FSVDKNrrVUSuDGnIEgg7S%2Bdaf51OdnCmi7tGZ97Lzj1TwBMqiQtgt41Wt3ASMpLajSAnr6rmt2FzDa0YI6FjAT5k6s2FnAk0oLms0RvLxZ7%2FPQEy5PdEdBdfbr1zcnhyF%2BQ9369dfyiMrxMLTkB1V6wHDUP9f6WaqpZzMK0t3QuVU5833wsPK7%2BMGL%2FlT8VDW3JIzyUqLSdVi%2Fszi22XNHbgQYhTER4UIB9p64Ar9gxW%2BJdbyawoxu4wpchfCGOXf3zDE2rqDgwuNxYkYqlpdhX1HrSo47lK76%2F%2BGNhM4feCO3uL%2Fvjf2%2BLz31xgJH%2BV1v5C2op94o7KYun%2F0PG9%2B7kg%3D%3D]run pyggb: https://www.geogebra.org/python/[math]\nearrow[/math][br][/url]code see Question-Tab if link fails [br][br]train(X,YY,m= [[0], [0], [0], [0], [0], [0], [0]] iterations= 5000000 lr= 0.0001[br]Iteration 0 => Loss: 19565836.127127945423126[br]Iteration 5000000 => Loss: 39323.501278882067709[br][br]Weights: [[230.171257789284, 116.37065537484919, -365.0874874857592, 24.97399887846611, -78.58939461161026, 785.1770474081719, -1226.658025934929]][br][br]Normalengleichung (X^T X)^-1 X^T Y[br]Weights: [[230.29581021003162, 116.22803340440532, -363.73608556960244, 24.996669799201186, -77.4367424162865, 783.1874134816826, -1230.2620369443466]][br][br]A few predictions:[br]X[0]= -> 4627.0768 (Y label: 4165.2)[br]X[1]= -> 3417.1248 (Y label: 3561.1)[br]X[2]= -> 4720.8583 (Y label: 4284.3)[br]X[3]= -> 5051.8985 (Y label: 5098.7)[br]X[4]= -> 3822.4808 (Y label: 3406.1)[br][br][br][url=https://www.reddit.com/r/pyggb/comments/1e1tpvr/machine_learning_linear_regression/]Machine Learning Supervised Training pyggb[br][/url]
Simple example of supervised learning linear regression
Python Code aegis4048
Close

Information: Multilineare Regression (maschine learning vs normal equation)