Created
October 4, 2018 17:05
-
-
Save Thomascountz/4fcff9c813780893013ad3cf0cd6c7ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LinearModel | |
def initialize(y_intercept, slope) | |
@y_intercept = y_intercept | |
@slope = slope | |
end | |
def predict(x) | |
return @slope * x + @y_intercept | |
end | |
end | |
string_length_predictor = LinearModel.new(-22, 165) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment