ITの隊長のブログ

ITの隊長のブログです。Rubyを使って仕事しています。最近も色々やっているお(^ω^ = ^ω^)

2018-07-01から1ヶ月間の記事一覧

RuntimeError: No mappable was found to use for colorbar creation. First define a mappable such as an image (with imshow) or a contour set (with contourf).

RuntimeError: No mappable was found to use for colorbar creation. First define a mappable such as an image (with imshow) or a contour set (with contourf). X_reduced = TSNE(n_components=2, random_state=0).fit_transform(X) _, ax = plt.subplo…

分散・標準偏差

統計学3級取るぞ!!! 親の顔より何度もみた分散と標準偏差 $ python >>> a = [5, 3, 4, 10, 3] >>> a_ = sum(a) / len(a) # 平均 >>> a_ 5.0 >>> s = sum([(i - a_)**2 for i in a]) / len(a) # 分散 >>> s 6.8 >>> import math >>> math.sqrt(s) # 分散…