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
import string | |
from pandas import DataFrame | |
import numpy as np | |
from numpy.random import randn, rand | |
import pandas.tools.plotting as plotting | |
from matplotlib.pylab import close |
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
from pandas import DataFrame, Series | |
from numpy.random import randn, rand | |
df1 = DataFrame(randn(6, 3), index=range(6), | |
columns=['a', 'b', 'c']) | |
df2 = DataFrame(randn(6, 3), index=range(6), | |
columns=['d', 'e', 'f']) | |
df3 = DataFrame(randn(6, 3), index=range(6), |
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
import string | |
from pandas import DataFrame, Series | |
from numpy.random import randn | |
import matplotlib.pyplot as plt | |
df = DataFrame(randn(7, 4), | |
index=list(string.ascii_letters[:7]), | |
columns=['x', 'y', 'z', 'four']) | |
series = Series(randn(7), index=range(7)) |
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
# -*- coding: utf-8 -*- | |
import string | |
from pandas import DataFrame, Series | |
import datetime | |
import numpy as np | |
from numpy.random import randn, rand | |
import pandas.tools.plotting as plotting | |
from pandas.compat import u, string_types |
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
import pandas as pd | |
import numpy as np | |
import pandas.util.testing as tm | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
import numpy as np | |
series = pd.Series(3 * np.random.rand(4), index=['a', 'b', 'c', 'd'], name='series') |
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
set.seed(1) | |
# 観測系列のサンプルサイズ | |
n <- 120 | |
# 真の値 | |
actual <- rep(5, out.length = n) | |
# 観測される値 (誤差は標準偏差2の正規分布とする) | |
observed <- actual + rnorm(n, mean = 0, sd = 2) |
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
set.seed(1) | |
# 観測系列のサンプルサイズ | |
n <- 200 | |
# 真の値が時間変化する | |
actual <- 3.0 + cumsum(rnorm(n, sd = 0.2)) | |
# 観測される値 (誤差は標準偏差2の正規分布とする) | |
observed <- actual + rnorm(n, mean = 0, sd = 2) |
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
set.seed(1) | |
# 観測系列のサンプルサイズ | |
n <- 100 | |
# 真の値 | |
x <- c(rep(0, n / 4), seq(0, 10, length.out = n / 4), | |
rep(10, n / 4), seq(10, 0, length.out = n / 4)) | |
y <- c(seq(0, 10, length.out = n / 4), rep(10, n / 4), | |
seq(10, 0, length.out = n / 4), rep(0, n / 4)) |
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
set.seed(1) | |
# 観測系列のサンプルサイズ | |
n <- 30 | |
# 加速度 | |
a <-rep(0.3, n) | |
v <- cumsum(0.5 * a) | |
x <- cumsum(v) |
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
# -*- coding: utf-8 -*- | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
# rpy2 経由で R から iris をロード | |
# import pandas.rpy.common as com | |
# iris = com.load_data('iris') |
OlderNewer