This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage: | |
# wget https://gist.githubusercontent.com/taroyabuki/ecb0da01ab85e0a0524383b97d17ae0f/raw/dc962ef5e8b13bfc2aa7b1bcea2edba7918cfd10/makepdf.sh | |
# docker run -it -e ROOT=TRUE -v $(pwd):/home/rstudio/work rocker/verse bash /home/rstudio/work/makepdf.sh | |
cd /home/rstudio/work | |
git clone -b japanese https://github.com/hacarus/interpretable-ml-book-ja.git | |
cd interpretable-ml-book-ja |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
year | population | |
---|---|---|
1872 | 34806 | |
1873 | 34985 | |
1874 | 35154 | |
1875 | 35316 | |
1876 | 35555 | |
1877 | 35870 | |
1878 | 36166 | |
1879 | 36464 | |
1880 | 36649 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
北海道 | Hokkaido | |
---|---|---|
青森 | Aomori | |
岩手 | Iwate | |
宮城 | Miyagi | |
秋田 | Akita | |
山形 | Yamagata | |
福島 | Fukushima | |
茨城 | Ibaraki | |
栃木 | Tochigi | |
群馬 | Gumma |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map = Import["http://mathforum.org/wagon/fall97/images/5colormap.gif"]; | |
matrix = MorphologicalComponents[map]; | |
vars = Flatten[Map[{p[#], q[#]} &, Rest[Union[Flatten[matrix]]]]]; | |
f[r_] := Map[If[Length[Union[#]] > 2, Sort[Select[#, Positive]], Nothing] &, | |
Partition[r, 4, 1]]; | |
neighbours = Union[Flatten[Map[f, Join[matrix, Transpose[matrix]]], 1]]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
experiment | weather | lecture | goout | |
---|---|---|---|---|
T | rainy | F | F | |
T | sunny | T | T | |
T | rainy | T | F | |
F | rainy | T | F | |
F | sunny | T | T |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
北海道 | 861 | |
---|---|---|
青森 | 790 | |
岩手 | 790 | |
宮城 | 824 | |
秋田 | 790 | |
山形 | 790 | |
福島 | 798 | |
茨城 | 849 | |
栃木 | 853 | |
群馬 | 835 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hokkaido | 861 | |
---|---|---|
Aomori | 790 | |
Iwate | 790 | |
Miyagi | 824 | |
Akita | 790 | |
Yamagata | 790 | |
Fukushima | 798 | |
Ibaraki | 849 | |
Tochigi | 853 | |
Gumma | 835 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
roll = 10; | |
surface[s_, t_] := | |
RotationMatrix[s, {0, 0, 1}].{3 + t Cos[t]/(roll Pi), 0, t Sin[t]/(roll Pi)} | |
donut[t_] := | |
ParametricPlot3D[surface[s, u], {s, 0, 2 Pi}, {u, 0, t}, | |
Axes -> False, Boxed -> False, Mesh -> None, PlotPoints -> 40] | |
bugs[t_, n_] := |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(*Mass*) | |
m = {3, 4, 5}; | |
n = Length@m; | |
(*Coordination*) | |
p = Array[{Subscript[px, #][t], Subscript[py, #][t]} &, n]; | |
q = Array[{Subscript[ x, #][t], Subscript[ y, #][t]} &, n]; | |
initialCondition = { | |
p == {{0, 0}, { 0, 0}, {0, 0}}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Are Toy Problems Useful? | |
//in Selected Papers on Computer Science by Knuth (p.172) | |
#include <iostream> | |
#include <sstream> | |
#include <iomanip> | |
#include <vector> | |
#include <set> | |
#include <unordered_map> // faster than map | |
#include <algorithm> |
NewerOlder