2019-12-01から1ヶ月間の記事一覧

Pandasで散布図行列(scatter_matrix)を描く

Pandasで散布図行列(scatter_matrix)を描く 概要 Pandasを使用して、散布図行列(scatter_matrix)を描く方法を示す。 これを使うことで、特徴量が多いデータに対して可視化が可能となる。 環境 Python ver : 3.6.9 Pandas ver : 0.25.3 scikit-learn ver : 0.…

Google ColaboratoryでTensorFlow2.xを使う

Google ColaboratoryでTensorFlow2.xを使う 概要 Google Colabでは、TensorFlowのバージョンが現時点の(2019/12/15)デフォルトで1.15.0となっている。 TF2.0系を試す場合の方法を示す。 TensorFlow2.x系への切り替え方法 現時点のバージョンを確認 import te…

Python クラスの書き方

Python クラスの書き方 概要 Pythonでのクラスの書き方の基本形についてまとめる。 主な目的としては、細かい書き方を忘れたときに、これらをテンプレートとして使用するため。 環境 Python3 基本 class SampleClass: def __init__(self): print('constructo…