Skip to content

Comments

Add implementation of standard deviation on data#2

Open
slateruk wants to merge 1 commit intomainfrom
feature-std-dev
Open

Add implementation of standard deviation on data#2
slateruk wants to merge 1 commit intomainfrom
feature-std-dev

Conversation

@slateruk
Copy link
Owner

No description provided.

Copy link
Collaborator

@JacobConnorsUKAEA JacobConnorsUKAEA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Great work 👍 💯 🎉

inflammation_data = models.load_csv(filename)

view_data = {'average': models.daily_mean(inflammation_data), 'max': models.daily_max(inflammation_data), 'min': models.daily_min(inflammation_data)}
view_data = {'average': models.daily_mean(inflammation_data), 'max': models.daily_max(inflammation_data), 'min': models.daily_min(inflammation_data), **(models.s_dev(inflammation_data))}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this but it seems right 👍

import numpy as np
import numpy.testing as npt
import os

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is fine

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the course content, you're meant to have more tests in this file. What you should have is:
Standard deviation for one patient with multiple observations.
Standard deviation for two patients.
Graph includes a standard deviation graph.
Standard deviation function should raise an error if given empty data.
Computing standard deviation where deviation is different from variance.
Standard deviation function should give correct result given negative inputs.
Function should work with numpy arrays

@JacobConnorsUKAEA JacobConnorsUKAEA self-requested a review June 20, 2024 13:09
import numpy as np
import numpy.testing as npt
import os

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the course content, you're meant to have more tests in this file. What you should have is:
Standard deviation for one patient with multiple observations.
Standard deviation for two patients.
Graph includes a standard deviation graph.
Standard deviation function should raise an error if given empty data.
Computing standard deviation where deviation is different from variance.
Standard deviation function should give correct result given negative inputs.
Function should work with numpy arrays

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants