Skip to content

Instantly share code, notes, and snippets.

@iktakahiro
Created July 29, 2017 05:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iktakahiro/1c8ff60e6419a4bf39b2dd28af2c1db5 to your computer and use it in GitHub Desktop.
Save iktakahiro/1c8ff60e6419a4bf39b2dd28af2c1db5 to your computer and use it in GitHub Desktop.
リスト5.33  回帰式を利用してピース数から価格を求める コード
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