Skip to content

Instantly share code, notes, and snippets.

View ysk24ok's full-sized avatar

Yusuke Nishioka ysk24ok

View GitHub Profile
@ysk24ok
ysk24ok / edit_distance.cpp
Last active June 14, 2019 03:23
Comparison of edit distance calculation (normal DP v.s. bit vector DP)
#include <algorithm>
#include <cassert>
#include <chrono>
#include <iostream>
#include <string>
#include <random>
#include <unordered_map>
#include <vector>
std::vector<int> EditDistance(const std::string& query, const std::string& text, int k) {
@ysk24ok
ysk24ok / midoribon_section7_glmm.ipynb
Created April 4, 2018 07:58
一般化線形混合モデル(みどりぼん第7章)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ysk24ok
ysk24ok / midoribon_section6_poisson_regression_with_offset.ipynb
Created April 4, 2018 07:40
割算値モデリングのためのオフセット項(みどりぼん第6章)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ysk24ok
ysk24ok / midoribon_section6_logistic_regression.ipynb
Last active April 4, 2018 23:12
ロジスティック回帰(みどりぼん第6章)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ysk24ok
ysk24ok / uplift_modeling.ipynb
Last active April 4, 2018 00:20
仕事ではじめる機械学習 第9章
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ysk24ok
ysk24ok / log-level_regression.ipynb
Last active April 9, 2018 01:37
ログレベル回帰(log-level regression)と対数リンク線形回帰(log-link linear regression)の違い
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ysk24ok
ysk24ok / midoribon_section3_poisson_regression.ipynb
Last active April 3, 2018 14:14
ポアソン回帰(みどりぼん第3章)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import itertools
height_list = (171.0, 167.3, 170.6, 178.7, 162.3)
# 母平均、母分散
population_mean = np.mean(height_list)
population_var = np.var(height_list)
print('母平均は{}、母分散は{}'.format(
round(population_mean, 3), round(population_var, 3)
))