Skip to content

Fix variable name in DifferentialProgramming.md #31516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2020

Conversation

Kshitij09
Copy link
Contributor

In Podcast Player example of DifferentialProgramming.md, struct Observation has variable named podcastState, while it has been referenced as state in the meanError function.

Changed it to podcastState.

Relevant code snippet:

struct Observation {
    var podcastState: PodcastState
    var userSpeed: Float
}

func meanError(for model: PodcastSpeedModel, _ observations: [Observation]) -> Float {
    var error: Float = 0
    for observation in observations {
        error += abs(model.prediction(for: observation.state) - observation.userSpeed)
    }
    return error / Float(observations.count)
}

In Podcast Player example of Intelligent Systems, struct `Observation` has var `podcastState`, while it has been referenced as `state` in the following cell. Changed it to `podcastState`.
@theblixguy theblixguy requested a review from dan-zheng May 3, 2020 18:36
Copy link
Contributor

@dan-zheng dan-zheng left a comment

Choose a reason for hiding this comment

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

Thank you!

@dan-zheng
Copy link
Contributor

@swift-ci Please smoke test and merge

@dan-zheng
Copy link
Contributor

@swift-ci Please smoke test Linux

@dan-zheng dan-zheng merged commit fae995a into swiftlang:master May 4, 2020
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.

2 participants