Note by Yoshikawa

Love Technology and Art

2018-01-01から1年間の記事一覧

tkinter使ってみた

プログラムの実行をguiにしたいときに手軽に組める。以下サンプルよく使う入力枠、ドロップダウンリスト、ラジオボタンの例 import tkinter as tk from tkinter import messagebox as tkm from tkinter import ttk def show(line): tkm.showinfo('sample', l…

Pyhtonの文字列検索

検索文字のインデックス(始めと終わり)をイテレータで取得 index_iter = re.finditer(検索文字,文字列) for id for index_iter: match_id_start = id.start() match_id_end = id.end()

勾配ブースティング

from sklearn.ensemble import GradientBoostingRegressor from sklearn.ensemble import GradientBoostingClassifier from sklearn.metrics import r2_score、roc_auc_score,confusion_matrix from sklearn.metrics import from sklearn.model_selection im…

tkinter ファイル選択ダイアログ

# -------------------------------------------------------- # フォルダパス取得 # -------------------------------------------------------- def absdirpath(): iDir = os.path.abspath(os.path.dirname(__file__)) root = tkinter.Tk() root.withdraw(…

pythonのsklearn

しばらくpythonのsklaernをいじってたのでまとめとく sklaernは、pythonで機械学習ができるライブラリの一つ。 ロジスティック回帰 決定木モデル ニューラルネットなど、機械学習の色々なモデルを超手軽に構築、学習することができる。ぶっちゃけ、アルゴリ…