ankush-003 commited on
Commit
df756b6
·
1 Parent(s): 1545384

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -43,8 +43,8 @@ def train(data, alpha=0.0001, epochs=500, test_data=[1,2,3]):
43
 
44
  #print(f"Epoch: {i} -> Theta0: {updated_b[i]} Theta1: {updated_a[i]}, Error: {errors[i]} \n")
45
  y_pred = a * tensors[:,0] + b
46
- fig1 = px.scatter(x=tensors[:, 0], y=tensors[:, -1])
47
- fig2 = px.line(x=tensors[:, 0], y=y_pred)
48
  fig3 = go.Figure(data=fig1.data + fig2.data)
49
  fig3.update_layout(
50
  #title="Best Fit Line",
@@ -52,7 +52,7 @@ def train(data, alpha=0.0001, epochs=500, test_data=[1,2,3]):
52
  yaxis_title="Y",
53
  )
54
 
55
- fig4 = px.line(errors)
56
  fig4.update_traces(line_color='orange')
57
  fig4.update_layout(
58
  #title="Learning Curve",
 
43
 
44
  #print(f"Epoch: {i} -> Theta0: {updated_b[i]} Theta1: {updated_a[i]}, Error: {errors[i]} \n")
45
  y_pred = a * tensors[:,0] + b
46
+ fig1 = px.scatter(x=tensors[:, 0], y=tensors[:, -1], template="plotly_dark")
47
+ fig2 = px.line(x=tensors[:, 0], y=y_pred, template="plotly_dark")
48
  fig3 = go.Figure(data=fig1.data + fig2.data)
49
  fig3.update_layout(
50
  #title="Best Fit Line",
 
52
  yaxis_title="Y",
53
  )
54
 
55
+ fig4 = px.line(errors, template="plotly_dark")
56
  fig4.update_traces(line_color='orange')
57
  fig4.update_layout(
58
  #title="Learning Curve",