Note by Yoshikawa

Love Technology and Art

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

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(…