-
Notifications
You must be signed in to change notification settings - Fork 34.8k
Closed
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityon-testplan
Milestone
Description
When I ask a question of Copilot Chat:
write the below as math formula
# Negative log-likelihood for normal distribution
nll = -np.sum(-0.5*np.log(2*np.pi*sigma**2) - (y-predicted_y)**2 / (2*sigma**2))
This is the response I get in the vs code:
[ nll = -\sum_{i=1}^{n} \left[ -\frac{1}{2}\log(2\pi\sigma^2) - \frac{(y_i-\hat{y_i})^2}{2\sigma^2} \right] ]
Where:
( n ) is the number of observations.
( \log ) denotes the natural logarithm.
( \pi ) represents the mathematical constant pi.
( \sigma ) is the standard deviation.
( y_i ) represents the actual value for the i-th observation.
( \hat{y_i} ) represents the predicted value for the i-th observation.
The sum is over all ( i ) from 1 to ( n ).
I would be ok with this, notice it is missing i in the \sum as well as some other niceties (I converted the above into notebook markdown by replacing [ ] and ( ) with $ $) :
Version: 1.87.0 (user setup)
Commit: 019f4d1
Date: 2024-02-27T23:41:44.469Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Windows_NT x64 10.0.22631
1anakin20, HarryLuoo, tamuratak, jayeeson, howsmadae and 42 more
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityon-testplan