Beispiel #1
0
 def plot2(df):
     p = pyggplot.Plot(df).add_scatter("Y", "X")
     p.width = 5
     p.height = 2
     return p
Beispiel #2
0
 def plot(df):
     return pyggplot.Plot(df).add_scatter("X", "Y")
Beispiel #3
0
 def plot(df):
     append("out/plot", "B")
     return pyggplot.Plot(df).add_scatter("X", "Y")
Beispiel #4
0
 def plot(df):
     p = pyggplot.Plot(df["A"]).add_scatter("X", "Y")
     p.width = 5
     p.height = 1
     return p
    fwd['A'].append(forward_samples.count('A') / nSamples)
    fwd['B'].append(forward_samples.count('B') / nSamples)
    fwd['C'].append(forward_samples.count('C') / nSamples)


if __name__ == '__main__':

    nSimulations = 10000
    rand = RandomState(1122)

    cftp = {'A': [], 'B': [], 'C': []}
    fwd = {'A': [], 'B': [], 'C': []}

    # couple_from_the_past parameters
    nSamples = 1000

    for simulation in range(nSimulations):
        couple_engine(rand, cftp, fwd, nSamples)

    cftp_data = pd.DataFrame.from_dict(cftp)
    cftp_long = pd.melt(cftp_data, var_name="State", value_name="Proportion")
    p = pyggplot.Plot(cftp_long)
    p.add_boxplot(x='State', y='Proportion')
    p.render("../../figures/cftp_simple_comparison.pdf")

    fwd_data = pd.DataFrame.from_dict(fwd)
    fwd_long = pd.melt(fwd_data, var_name="State", value_name="Proportion")
    p = pyggplot.Plot(fwd_long)
    p.add_boxplot(x='State', y='Proportion')
    p.render("../../figures/fwd_simple_comparison.pdf")
 def plot(df):
     append('out/plot', 'B')
     return pyggplot.Plot(df).add_scatter('X', 'Y')
 def plot(df):
     return pyggplot.Plot(df).add_scatter('X', 'Y')