Created
July 29, 2017 05:30
-
-
Save iktakahiro/1c8ff60e6419a4bf39b2dd28af2c1db5 to your computer and use it in GitHub Desktop.
リスト5.33 回帰式を利用してピース数から価格を求める コード
This file contains hidden or 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
slope, intercept, rvalue, pvalue, stderr = linregress( | |
lego_df['pieces'], | |
lego_df['us_price']) | |
piece = 500 | |
# Y = aX + b | |
price = slope * piece + intercept | |
round(price) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment