Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
9db0007
basic graph viewer with form controls
Roee-BY Dec 11, 2020
00f58c8
added param control via url in the
Roee-BY Dec 12, 2020
e21f52b
added the ability to provide a list of points via the parameter id "p…
Roee-BY Dec 12, 2020
0483dc3
Merge remote-tracking branch 'iLearnML/master' into iLearnML
Roee-BY Dec 12, 2020
95c4fc4
Update ilearnml_graph_viewer.html
Roee-BY Dec 16, 2020
d172bd2
Created using Colaboratory
nadavru Dec 22, 2020
e1ed26f
Create ilearnml_graph_viewer2
nadavru Dec 23, 2020
65d1687
Rename ilearnml_graph_viewer2 to ilearnml_graph_viewer2.html
nadavru Dec 23, 2020
43f9d9e
added scatter.html
Roee-BY Dec 29, 2020
b8322dc
added arrow head to the vectors
Roee-BY Dec 29, 2020
be819cd
Merge branch 'iLearnML' of https://github.com/nadavru/iLearn into Web_GD
Roee-BY Dec 29, 2020
a25b6c2
deleted unneeded code
Roee-BY Dec 29, 2020
c784da3
fixed small bugs
Roee-BY Dec 29, 2020
2d5718d
color and vector added
Roee-BY Dec 30, 2020
4c9977f
added vector trace
Roee-BY Dec 31, 2020
053c08e
Update scatter.html
nadavru Jan 5, 2021
8ca029e
Update scatter.html
nadavru Jan 5, 2021
f5c7c19
Update ilearnml_graph_viewer.html
nadavru Jan 5, 2021
0fac06e
Update ilearnml_graph_viewer.html
nadavru Jan 5, 2021
a390569
Created using Colaboratory
nadavru Jan 12, 2021
ad93abd
added icon
Roee-BY Jan 12, 2021
8715907
fixed icon bug
Roee-BY Jan 12, 2021
6e4dd0e
fixed small bugs
Roee-BY Jan 12, 2021
cf615ee
Create graph_viewer.html
nadavru Jan 12, 2021
4702b15
Update graph_viewer.html
nadavru Jan 12, 2021
c532816
first verison of the site including gd view and svm view
yonatan-maman Jan 12, 2021
4b10275
added basic site
Roee-BY Jan 12, 2021
3a07266
Merge branch 'iLearnML' of https://github.com/nadavru/iLearn into Web_GD
Roee-BY Jan 12, 2021
988f83e
minor change
yonatan-maman Jan 12, 2021
4368bae
adding files with problem view
yonatan-maman Jan 12, 2021
bda651b
--
yonatan-maman Jan 12, 2021
3614c24
Created using Colaboratory
nadavru Jan 13, 2021
dd76fef
Update ilearnml_graph_viewer.html
Roee-BY Jan 13, 2021
1d55b7d
Merge branch 'iLearnML' of https://github.com/nadavru/iLearn into Web_GD
Roee-BY Jan 13, 2021
88c5139
Created using Colaboratory
nadavru Jan 13, 2021
48c5775
working web without showing models
yonatan-maman Jan 13, 2021
db0a899
continued website development
Roee-BY Jan 13, 2021
37f4b22
changed file structure to match the website
Roee-BY Jan 13, 2021
b22eefc
before marging
yonatan-maman Jan 13, 2021
2739a54
Merge branch 'webDevelopment' into Web_GD
Roee-BY Jan 13, 2021
27baa7f
added viewer py version
Roee-BY Jan 13, 2021
b4ddebd
H
yonatan-maman Jan 13, 2021
d0d401b
Merge branch 'webDevelopment' into Web_GD
Roee-BY Jan 13, 2021
eefbb0b
new version
yonatan-maman Jan 13, 2021
83a42fc
Merge branch 'webDevelopment' into Web_GD
Roee-BY Jan 13, 2021
af443d3
adding all function
yonatan-maman Jan 13, 2021
a0ca199
added newton viewer and improved website
Roee-BY Jan 13, 2021
7449a1d
Created using Colaboratory
nadavru Jan 13, 2021
fbb02c9
working py viewing
yonatan-maman Jan 13, 2021
0b73b39
added newton to gdviewer
Roee-BY Jan 13, 2021
45ed977
finsh view function and update parameters
yonatan-maman Jan 14, 2021
36af08b
finish working files
yonatan-maman Jan 14, 2021
a6d9273
added features to viewergdpyver
Roee-BY Jan 14, 2021
9ec8770
fixed bugs
Roee-BY Jan 14, 2021
feee9e8
no matter
yonatan-maman Jan 14, 2021
3db6356
trying to fix bugs
Roee-BY Jan 14, 2021
164258b
trying to fix some bugs
Roee-BY Jan 14, 2021
b24082a
trying to fix some bugs
Roee-BY Jan 14, 2021
526a529
added graddecent explanation and fixed bugs
Roee-BY Jan 14, 2021
7d922ba
styled the buttons in viewrgd
Roee-BY Jan 14, 2021
f557032
fixed some stuff on gradient decent.html
Roee-BY Jan 14, 2021
2b32109
syncing to appengine version of GDpyver
Roee-BY Jan 15, 2021
cc97748
removed debugging
Roee-BY Jan 15, 2021
6453a20
fixed small bugs
Roee-BY Jan 15, 2021
d774de7
changed scc styling
Roee-BY Jan 15, 2021
5084bdc
some updates
yonatan-maman Jan 16, 2021
517691b
updated viewerGDpyver to support newton and added styling
Roee-BY Jan 16, 2021
4687942
fixxed bugs in the last commits
Roee-BY Jan 16, 2021
d97d226
added styling to all symulations
Roee-BY Jan 16, 2021
47eaed7
fixed more bugs
Roee-BY Jan 16, 2021
40d7e64
adding some changes
yonatan-maman Jan 16, 2021
14b4d67
fixed a small bug
Roee-BY Jan 16, 2021
1b88498
Merge branch 'iLearnML' of https://github.com/nadavru/iLearn into iLe…
yonatan-maman Jan 16, 2021
f2b4c27
fixed deep learning page
Roee-BY Jan 16, 2021
ee22864
fixed deepLearning.html
Roee-BY Jan 16, 2021
d967cca
updated webpages
Roee-BY Jan 16, 2021
89400ea
make some change
yonatan-maman Jan 16, 2021
a2e1c18
improved the design
Roee-BY Jan 16, 2021
e228e3c
hh
yonatan-maman Jan 16, 2021
db4aed8
Merge branch 'iLearnML' of https://github.com/nadavru/iLearn into iLe…
yonatan-maman Jan 16, 2021
03bbbeb
styled the gd intro page
Roee-BY Jan 16, 2021
0b34627
fixed GDverpy
Roee-BY Jan 16, 2021
88456f3
a
yonatan-maman Jan 16, 2021
881af06
updated navigation
Roee-BY Jan 16, 2021
295557b
Merge branch 'iLearnML' of https://github.com/nadavru/iLearn into Web_GD
Roee-BY Jan 16, 2021
1389795
fixed style
Roee-BY Jan 16, 2021
2d83153
fixed simulations problam
Roee-BY Jan 17, 2021
38d96d0
fixing bugs
Roee-BY Jan 17, 2021
0546090
adding gradient descent page
yonatan-maman Jan 19, 2021
7ec2544
added playground to gd.html
Roee-BY Jan 19, 2021
7a65ee6
fixed bugs
Roee-BY Jan 19, 2021
39a1f97
fixed the bugs koby found
Roee-BY Apr 28, 2021
5b434de
second attempt at fixing the bugs koby found
Roee-BY Apr 29, 2021
1427b36
fixed a small bug with the color of dropdown lists
Roee-BY May 5, 2021
1bba68d
fixed high lr bug
nadavru May 21, 2021
5c553f1
fixed minor bugs
Roee-BY May 21, 2021
7a7caba
Merge branch 'iLearnML' of https://github.com/nadavru/iLearn into Web_GD
Roee-BY May 21, 2021
50f6c3c
fixed styling problems
Roee-BY May 21, 2021
616aae8
removed newton from index.html
Roee-BY May 21, 2021
ef3d0f9
fixed a minor bug
Roee-BY May 21, 2021
eb35157
rolled back a change
Roee-BY May 21, 2021
9f5dfa6
fixed bugs and broken links and added svm page
Roee-BY May 21, 2021
f8816c2
fixed a typo
Roee-BY May 21, 2021
2bd1d4a
lr too high
nadavru May 24, 2021
1022142
Update learning.py
nadavru May 24, 2021
e0beed5
Update Himmelblau.py
nadavru May 24, 2021
ce52a18
minor changes
yonatan-maman May 24, 2021
5452bf2
Update Beale.py
nadavru May 24, 2021
c0a6082
Update Rastrigin.py
nadavru May 24, 2021
26488dd
Update Rosenbrock.py
nadavru May 24, 2021
ab2715e
Update gaussian.py
nadavru May 24, 2021
1749871
Update absFunc.py
nadavru May 24, 2021
26538e6
added camera set after every click
Roee-BY May 24, 2021
8fb2966
Merge branch 'iLearnML' of https://github.com/nadavru/iLearn into Web_GD
Roee-BY May 24, 2021
c269cbf
updated the the camera repositioning
Roee-BY May 24, 2021
6cc3fc3
adding error value to python classes
yonatan-maman May 24, 2021
b856903
fixed a minor bug
Roee-BY May 24, 2021
96a02c8
adding error value to python classes
yonatan-maman May 24, 2021
b45f32a
Merge branch 'iLearnML' of https://github.com/nadavru/iLearn into iLe…
yonatan-maman May 24, 2021
a9e23d0
added x and y sliders
Roee-BY May 24, 2021
058d60c
fixed x and y sensitivity and disabled them and changed epochs to num…
Roee-BY May 24, 2021
e8c624a
added styling to the sliders
Roee-BY May 24, 2021
2ccf9a5
adding max lr values
yonatan-maman May 24, 2021
7d20fc3
added lr slider and disabled the lr text
Roee-BY May 24, 2021
3602ef1
changed the style of the sliders
Roee-BY May 24, 2021
b3f4ccb
fixed the styling on the sliders
Roee-BY May 24, 2021
6e9cbcb
fixed styling for sliders
Roee-BY May 24, 2021
1816ecb
fixed styling of slidebars
Roee-BY May 24, 2021
ae3d3bd
fixed sliders style
Roee-BY May 24, 2021
c904e8b
rounded the sliders
Roee-BY May 24, 2021
1048e6a
fixed minor bugs with the sliders
Roee-BY May 24, 2021
5de7713
fixed slider bugs
Roee-BY May 24, 2021
513953a
changed the style
Roee-BY May 24, 2021
4b99137
fixed camera positioning
Roee-BY May 24, 2021
f6b4ab3
changed the width of the text segments
Roee-BY May 24, 2021
92a60bb
fixed text inputs width
Roee-BY May 24, 2021
ec9378c
fixed a small bug
Roee-BY May 24, 2021
37127d0
fixed a small bug
Roee-BY May 24, 2021
31b072f
fixed a small bug
Roee-BY May 25, 2021
97f5ad1
fixed a bug with camera directions
Roee-BY May 25, 2021
e7b5f8a
fixed a small bug
Roee-BY May 25, 2021
543132c
fixed a minor bug
Roee-BY May 25, 2021
0295e3f
change the nav bar
Roee-BY May 25, 2021
e239870
make inputs read only
yonatan-maman May 25, 2021
ec1fc13
fixed a bug
Roee-BY May 25, 2021
ee2c221
fixed starting values after update
Roee-BY May 25, 2021
006754a
added ty it button
Roee-BY May 25, 2021
89c166f
fixed a problem with gaussian
Roee-BY May 25, 2021
1b8388d
fixed gaussian
Roee-BY May 25, 2021
616378c
Created using Colaboratory
nadavru Jun 17, 2021
dc815bb
added the new deep learning network page
Roee-BY Jun 22, 2021
8c0aa9f
hopefully fixed the gaussian problem
Roee-BY Jun 22, 2021
2735b07
..
yonatan-maman Jun 28, 2021
3ba95cc
a
yonatan-maman Jun 28, 2021
da844fb
adding NN
yonatan-maman Jun 28, 2021
6a5d781
adding NN
yonatan-maman Jun 28, 2021
d414447
adding NN
yonatan-maman Jun 28, 2021
6873298
added prameters to network form
Roee-BY Jun 28, 2021
50636de
Merge branch 'iLearnML' of https://github.com/nadavru/iLearn into Web_GD
Roee-BY Jun 28, 2021
08dda40
fixed minor bug
Roee-BY Jun 28, 2021
70af19c
.
yonatan-maman Jun 28, 2021
31d9e58
fixed a minor bug
Roee-BY Jun 28, 2021
5811937
fixed the nextwork.html page
Roee-BY Jun 28, 2021
740c2a2
Merge branch 'iLearnML' of https://github.com/nadavru/iLearn into Web_GD
Roee-BY Jun 28, 2021
d178f9e
.
yonatan-maman Jun 29, 2021
600abfc
fixed a bug
Roee-BY Jun 29, 2021
f557da1
Merge branch 'iLearnML' of https://github.com/nadavru/iLearn into Web_GD
Roee-BY Jun 29, 2021
2f5e53b
fixed bugs
Roee-BY Jun 29, 2021
fb48e44
fixed a minor bug
Roee-BY Jun 29, 2021
c032f48
fixed a minor bug
Roee-BY Jun 29, 2021
6b664a6
fixed a minor parser bug
Roee-BY Jun 29, 2021
8164437
fixed a bug in nn.py
Roee-BY Jun 29, 2021
e8f71de
returned networkviewer to an earlyer state
Roee-BY Jun 29, 2021
4c82882
fixed a problem with parms parsing
Roee-BY Jun 29, 2021
1ee8d43
fixed a minor bug
Roee-BY Jun 29, 2021
9b0f11f
fixed a minor bug
Roee-BY Jun 29, 2021
4cdd637
fixed a minor bug
Roee-BY Jun 29, 2021
02821d0
fixed a bug
Roee-BY Jun 29, 2021
989322e
.
Roee-BY Jun 29, 2021
f889443
network page working, todo: add to nav bar
yonatan-maman Jun 29, 2021
baa5cad
Merge branch 'iLearnML' of https://github.com/nadavru/iLearn into iLe…
yonatan-maman Jun 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .gcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file specifies files that are *not* uploaded to Google Cloud Platform
# using gcloud. It follows the same syntax as .gitignore, with the addition of
# "#!include" directives (which insert the entries of the given .gitignore-style
# file at that point).
#
# For more information, run:
# $ gcloud topic gcloudignore
#
.gcloudignore
# If you would like to upload your .git directory, .gitignore file or files
# from your .gitignore file, remove the corresponding line
# below:
.git
.gitignore

# PHP Composer dependencies:
/vendor/
12 changes: 12 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions Beale.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from learning import Trainer
from math import exp
from optimizers import *


class Beale(Trainer):

def __init__(self, grid_x=4, grid_y=4, lr=0.0001, epochs=50, opt=SGD, x=None, y=None):
super().__init__(grid_x, grid_y, lr, epochs, opt, x, y)

url = "https://i-learn-ml.oa.r.appspot.com/viewer/viewerGD.html#"
self.disp_url = f"xmax={grid_x}$xmin=-{grid_x}$ymax={grid_y}$ymin=-{grid_y}$"

self.f_str = f"(1.5-x+x*y)^2+(2.25-x+x*y^2)^2+(2.625-x+x*y^3)^2"


def calc(self, x, y):
return (1.5-x+x*y)**2+(2.25-x+x*y**2)**2+(2.625-x+x*y**3)**2

def derive(self, x, y):
dx = 2 * x *(y**6 + y**4 - 2 * y**3 - y**2 - 2 * y + 3) + 5.25 * y**3 + 4.5 * y**2 + 3 * y - 12.75
dy = 6 * x * (x * (y**5 + 0.666667 * y**3 - y**2 - 0.333333 * y - 0.333333) + 2.625 * y**2 + 1.5 * y + 0.5)
return [dx, dy]

def display(self):
points_str = ""
for i in range(len(self.Xs)):
points_str+=(str)(self.Xs[i])+","+(str)(self.Ys[i])+","+(str)(self.Zs[i])+"|"
points_str=points_str[:-1]

src=self.disp_url+f"func={self.f_str}$points={points_str}"
return src

def runBeale(x=4,y=4,epochs=50,opt=MomentumSGD,lr=0.000001):
Be = Beale(opt=opt,epochs=epochs, lr=lr, x=x, y=y)
Xs, Ys, Zs = Be.train()
src = Be.display()
return src, Be.error
95 changes: 95 additions & 0 deletions Himmelblau.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
from learning import Trainer
from math import exp
from optimizers import *

class Himmelblau(Trainer):

def __init__(self, grid_x=6, grid_y=6, lr=0.001, epochs=50, opt=SGD, x=None, y=None):
super().__init__(grid_x, grid_y, lr, epochs, opt, x, y)

url = "https://i-learn-ml.oa.r.appspot.com/viewer/viewerGD.html#"
self.disp_url = f"xmax={grid_x}$xmin=-{grid_x}$ymax={grid_y}$ymin=-{grid_y}$"

self.f_str = f"(x^2+y-11)^2+(x+y^2-7)^2"

self.f_str_arr = []


def calc(self, x, y):
return (x**2+y-11)**2+(x+y**2-7)**2

def derive(self, x, y):
dx = 2*(2*x*(x**2+y-11)+x+y**2-7)
dy = 2*(2*y*(x+y**2-7)+x**2+y-11)

self.f_str_arr.append(self.calc_f())
return [dx, dy]

def derive2(self, x, y):
dxx = 12*x**2+4*y-42
dxy = 4*(x+y)
dyx = 4*(x+y)
dyy = 12*y**2+4*x-26
return [[dxx, dxy], [dyx, dyy]]

def display(self):
points_str = ""
for i in range(len(self.Xs)):
points_str+=(str)(self.Xs[i])+","+(str)(self.Ys[i])+","+(str)(self.Zs[i])+"|"
points_str=points_str[:-1]

src=self.disp_url+f"func={self.f_str}$points={points_str}"
return src

def calc_f(self):

'''dx = f"2*(2*{self.x_cur}*({self.x_cur}^2+{self.y_cur}-11)+{self.x_cur}+{self.y_cur}^2-7)"
dy = f"2*(2*{self.y_cur}*({self.x_cur}+{self.y_cur}^2-7)+{self.x_cur}^2+{self.y_cur}-11)"
dxx = f"(12*{self.x_cur}^2+4*{self.y_cur}-42)"
dxy = f"4*({self.x_cur}+{self.y_cur})"
dyx = f"4*({self.x_cur}+{self.y_cur})"
dyy = f"(12*{self.y_cur}^2+4*{self.x_cur}-26)"
f_str = f"({self.x_cur}^2+{self.y_cur}-11)^2+({self.x_cur}+{self.y_cur}^2-7)^2"'''

x, y = self.x_cur, self.y_cur
d = self.derive2(self.x_cur, self.y_cur)

dx = 2*(2*x*(x**2+y-11)+x+y**2-7)
dy = 2*(2*y*(x+y**2-7)+x**2+y-11)
dxx, dxy = d[0]
dyx, dyy = d[1]
f_val = self.calc(self.x_cur, self.y_cur)

Hx = f"((x-{self.x_cur})*{dxx}+(y-{self.y_cur})*{dyx})"
Hy = f"((x-{self.x_cur})*{dxy}+(y-{self.y_cur})*{dyy})"

A = f"0.5*(x-{self.x_cur})*{Hx}+(y-{self.y_cur})*{Hy}"

B = f"((x-{self.x_cur})*{dx}+(y-{self.y_cur})*{dy})"

f_str2 = f"{f_val}+{A}+{B}"

src=f_str2
return src

def display2(self):
points_str = ""
for i in range(len(self.Xs)):
points_str+=(str)(self.Xs[i])+","+(str)(self.Ys[i])+","+(str)(self.Zs[i])+"|"
points_str=points_str[:-1]

src=self.disp_url+f"func={self.f_str}$points={points_str}$curves="
for func in self.f_str_arr:
src += func + "|"

src = src[:-1]

return src
def runHimmelblau(opt=SGD,epochs=50,lr=0.001, x=4, y=4):
Hi = Himmelblau(opt=opt,epochs=epochs, lr=lr, x=x, y=y)
Xs, Ys, Zs = Hi.train()
if((opt == SGD) or (opt == MomentumSGD)):
src = Hi.display()
if(opt==Newton):
src = Hi.display2()
return src, Hi.error
Loading