Skip to content
Open
Changes from all commits
Commits
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
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function NanoNeuron(w, b) {
}
```

_(...wait... [linear regression](https://en.wikipedia.org/wiki/Linear_regression) is it you?)_ 🧐
_(...wait... [linear regression](https://en.wikipedia.org/wiki/Linear_regression), [eli5 linear regression](https://simple.wikipedia.org/wiki/Linear_regression), [linear regression in 8 video minutes](https://www.youtube.com/watch?v=KsVBBJRb9TE) is it you?)_ 🧐

### Celsius to Fahrenheit conversion

Expand Down Expand Up @@ -111,8 +111,12 @@ This is a simple difference between two values. The closer the values are to eac
The cost function in this case will be as simple as:

```javascript
function predictionCost(y, prediction) {
return (y - prediction) ** 2 / 2; // i.e. -> 235.6
/**
* if y=33.8 and yPredicted=33.95; then cost=0.0128 -> low = good
* if y=33.8 and yPredicted=459.1; then cost=90 440 -> high = bad
*/
function predictionCost(y, yPredicted) {
return (y - yPredicted) ** 2 / 2; // i.e. -> 235.6
}
```

Expand Down