Platform
Solutions
Resources
Pricing
Sign in
Sign up
Charles Redmond
Workspace
Fork
Public
aaa-MachineLearningFall23
By
Charles Redmond
Edited
Nov 21, 2023
13 forks
aaa-MachineLearningFall23
Plotting Template
Plotting Basics
Plotting Lines
Parabola
Horizontal Line
Lines Through Origin
Linear Regression
Penguins
Sigmoid Function
Logistic Regression
Overlapping Data
Quiz 7
Social Network Ads Example
Candy Example
The Derivative
Derivative of Loss Function
Derivative of Loss Function Part 2
Gradient Descent
Solving via Gradient Descent
Solving via Gradient Descent (adding intercept)
Overfitting
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot
.
plot
(
{
x
:
{
domain
:
[
0
,
10
]
}
,
y
:
{
domain
:
[
0
,
10
]
}
,
marks
:
[
Plot
.
ruleX
(
[
0
]
)
,
Plot
.
ruleY
(
[
0
]
)
,
Plot
.
line
(
x
,
{
x
:
x
,
y
:
y
,
stroke
:
'red'
}
)
,
Plot
.
dot
(
X
,
{
x
:
X
,
y
:
Y
,
fill
:
'black'
,
r
:
5
}
)
,
Plot
.
dot
(
X2
,
{
x
:
X2
,
y
:
Y2
,
fill
:
'blue'
,
r
:
5
}
)
]
}
)
Insert cell
x
=
{
const
x
=
[
]
for
(
let
i
=
0
;
i
<=
10
;
i
=
i
+
.01
)
{
x
.
push
(
i
)
}
return
x
}
Insert cell
y
=
x
.
map
(
x
=>
a
*
x
+
b
)
Insert cell
Insert cell
X
=
[
2
,
7
]
Insert cell
Y
=
[
5
-
3.09
,
5
+
3.19
]
Insert cell
Insert cell
X2
=
[
4
,
6
]
Insert cell
Y2
=
[
5
+
1.17
,
5
+
.8
]
Insert cell
Insert cell
f
=
(
a
,
b
)
=>
(
2
*
a
+
b
-
1.91
)
**
2
+
(
7
*
a
+
b
-
8.19
)
**
2
Insert cell
fprimea
=
(
a
,
b
)
=>
106
*
(
-
1.15377
+
a
+
0.169811
*
b
)
Insert cell
fprimeb
=
(
a
,
b
)
=>
18
*
(
-
1.12222
+
a
+
0.222222
*
b
)
Insert cell
Insert cell
d3
.
randomNormal
(
0
,
3
)
(
)
Insert cell
Insert cell
f
(
a
,
b
)
Insert cell
(
4
*
a
+
b
-
6.17
)
**
2
+
(
6
*
a
+
b
-
5.8
)
**
2
Insert cell
One platform
to build and deploy the best data apps
Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
step
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
a
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
b
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
point
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
x
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
y
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
X
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Y
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
X2
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Y2
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
f
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
fprimea
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
fprimeb
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML