当前位置: 首页>>代码示例>>Python>>正文


Python Simulation.plot方法代码示例

本文整理汇总了Python中simulation.Simulation.plot方法的典型用法代码示例。如果您正苦于以下问题:Python Simulation.plot方法的具体用法?Python Simulation.plot怎么用?Python Simulation.plot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在simulation.Simulation的用法示例。


在下文中一共展示了Simulation.plot方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

# 需要导入模块: from simulation import Simulation [as 别名]
# 或者: from simulation.Simulation import plot [as 别名]
def main():
    # ./experiment -N 1024 -K 1 -B 4 -E 2 -L 8 -l 5 -r 4 -t 1e-8 -e 1e-8
    params = Parameters(
        n=1024,
        k=1,
        B_k_location=4,
        B_k_estimation=2,
        estimation_loops=8,
        location_loops=5,
        loop_threshold=4,
        tolerance_location=1e-8,
        tolerance_estimation=1e-8
    )

    from simulation import Simulation

    sim = Simulation(params=params)
    sim.plot()

    execute(params=params, x=sim.x, simulation=sim)

    plt.show()
开发者ID:jianyuan,项目名称:fyp-faster-gps,代码行数:24,代码来源:sfft.py

示例2: moregraph2

# 需要导入模块: from simulation import Simulation [as 别名]
# 或者: from simulation.Simulation import plot [as 别名]
    def moregraph2(plt):
        plt.title('Classification performance of first-order and high-order networks')
        plt.ylabel('ERROR')
        plt.xlabel("EPOCHS")
        plt.axis((0, nbr_epoch, 0, 1.01))
        
    def moregraph3(plt):
        plt.title('Classification performance of first-order and control networks')
        plt.ylabel('ERROR')
        plt.xlabel("EPOCHS")
        plt.axis((0, nbr_epoch, 0, 1.01))
    
    
    sim = Simulation(nbr_epoch, 0, data, nbr_network, [control, FoN, SoN])
    sim.dgraph(['FoN_rms', 'SoN_rms', 'FoN_perf', 'SoN_perf', 'high_wager', 'control_rms', 'control_perf'], [])
    seed(100)
    sim.launch(nbr_try, step_propagation, step_statictics, step_learn)
    
    sim.plot(point, 'FoN_rms', ['FoN_rms', 'SoN_rms', 'control_rms'],
             ["FoN" , "SoN", "Control"],
             [3, 3, 3 ], moregraph1)
    
    sim.plot(point, 'FoN_rms', ['FoN_perf', 'SoN_perf', 'high_wager'],
             ["FoN ( winner take all )" , "SoN (wagering) ", "High wager"],
             [3, 3, 2 ], moregraph2)
    
    sim.plot(point, 'FoN_perf', ['FoN_perf', 'control_perf'],
             ["FoN" , "Control"],
             [3, 3 ], moregraph3)
        
开发者ID:matthieu637,项目名称:anne,代码行数:31,代码来源:expG2.py

示例3: moregraph2

# 需要导入模块: from simulation import Simulation [as 别名]
# 或者: from simulation.Simulation import plot [as 别名]
    def moregraph2(plt):
        plt.title('Classification performance of first-order and high-order networks')
        plt.ylabel('ERROR')
        plt.xlabel("EPOCHS")
        plt.axis((0, nbr_epoch, 0, 1.01))
        
    def moregraph3(plt):
        plt.title('Classification performance of first-order and feedback networks')
        plt.ylabel('ERROR')
        plt.xlabel("EPOCHS")
        plt.axis((0, nbr_epoch, 0, 1.01))
    
    
    sim = Simulation(nbr_epoch, 0, data, nbr_network, [FoN, SoN, feedback])
    sim.dgraph(['FoN_rms', 'SoN_rms', 'FoN_perf', 'SoN_perf', 'high_wager', 'feedback'], [])
    seed(100)
    sim.launch(nbr_try, step_propagation, step_statictics, step_learn)
    
    sim.plot(point, 'FoN_rms', ['FoN_rms', 'SoN_rms'],
             ["FoN" , "SoN"],
             [3, 3 ], moregraph1)
    
    sim.plot(point, 'FoN_rms', ['FoN_perf', 'SoN_perf', 'high_wager'],
             ["FoN ( winner take all )" , "SoN (wagering) ", "High wager"],
             [3, 3, 2 ], moregraph2)
    
    sim.plot(point, 'FoN_perf', ['FoN_perf', 'feedback'],
             ["FoN" , "Feedback"],
             [3, 3 ], moregraph3)
        
开发者ID:matthieu637,项目名称:anne,代码行数:31,代码来源:expF6.py

示例4: moregraph2

# 需要导入模块: from simulation import Simulation [as 别名]
# 或者: from simulation.Simulation import plot [as 别名]
     plt.xlabel("EPOCHS")
     
 def moregraph2(plt):
     plt.title('Classification error of first-order and high-order networks')
     plt.ylabel('ERROR')
     plt.xlabel("EPOCHS")
     plt.axis((0, nbr_epoch, 0, 1.05))
 
 
 sim = Simulation(nbr_epoch, width, data, nbr_network, [FoN, SoN])
 sim.dgraph(['FoN_rms', 'SoN_rms', 'SoN_rms_input', 'SoN_rms_hidden', 'SoN_rms_output', 'FoN_err',
             'SoN_err_input', 'SoN_err_hidden', 'SoN_err_output'], [Simulation.DISCRETIZE])
 sim.launch(nbr_try, step_propagation, step_statictics, step_learn)
 
 sim.plot(12, 'FoN_rms', ['FoN_rms', 'SoN_rms', 'SoN_rms_input', 'SoN_rms_hidden', 'SoN_rms_output'],
          ["FoN" , "SoN", "SoN input layer", "SoN hidden layer", "SoN output layer"],
          [3, 3, 2, 2 , 2 ], moregraph1)
 
 
 sim.plot(12, 'FoN_rms', ['FoN_err', 'SoN_err_input', 'SoN_err_hidden', 'SoN_err_output'],
          ["FoN ( winner take all )" , "SoN input layer ( x > 0.5 => activation )", "SoN hidden layer ( | x - o | <= 0.3 )",
                     "SoN output layer ( winner take all )"],
          [3, 2, 2, 2 ], moregraph2)
 
 sim.custom_plot([Simulation.DISCRETIZE, Simulation.PROTOTYPE])
 
 #Representations hidden
 graph_networkhidden(sim.networks[0]['FoN'], width, (8,8,1))
 
 
 #Representations
开发者ID:matthieu637,项目名称:anne,代码行数:33,代码来源:expA3.py

示例5: range

# 需要导入模块: from simulation import Simulation [as 别名]
# 或者: from simulation.Simulation import plot [as 别名]
    sim.launch(nbr_try, step_propagation, step_statictics, step_learn2)

    for k in range(len(sim.examples.outputs)):
        newtask2(sim.examples.outputs[k])

    sim.launch(nbr_try, step_propagation, step_statictics, step_learn2)

    for k in range(len(sim.examples.outputs)):
        newtask3(sim.examples.outputs[k])

    sim.launch(nbr_try, step_propagation, step_statictics, step_learn2)

    sim.plot(
        48,
        "FoN_rms",
        ["FoN_rms", "SoN_rms", "SoN_rms_input", "SoN_rms_hidden", "SoN_rms_output"],
        ["FoN", "SoN", "SoN input layer", "SoN hidden layer", "SoN output layer"],
        [3, 3, 2, 2, 2],
        moregraph1,
    )

    sim.plot(
        48,
        "FoN_rms",
        ["FoN_err", "SoN_err_input", "SoN_err_hidden", "SoN_err_output"],
        [
            "FoN ( winner take all )",
            "SoN input layer ( x > 0.5 => activation )",
            "SoN hidden layer ( | x - o | <= 0.3 )",
            "SoN output layer ( winner take all )",
        ],
        [3, 2, 2, 2],
开发者ID:matthieu637,项目名称:anne,代码行数:34,代码来源:expB2.py

示例6: moregraph1

# 需要导入模块: from simulation import Simulation [as 别名]
# 或者: from simulation.Simulation import plot [as 别名]
        network['FoN'].set_learning_rate(l)
        network['FoN'].set_momentum(m)
        network['FoN'].train(inputs, outputs)
        network['control'].train(inputs, outputs)
    
    def moregraph1(plt):
        plt.title('Error RMS error of first-order and high-order networks')
        plt.ylabel('RMS ERROR')
        plt.xlabel("EPOCHS")
        
    def moregraph3(plt):
        plt.title('Classification performance of first-order and control networks')
        plt.ylabel('ERROR')
        plt.xlabel("EPOCHS")
        plt.axis((0, nbr_epoch, 0, 1.01))
    
    
    sim = Simulation(nbr_epoch, 0, data, nbr_network, [FoN, SoN, control])
    sim.dgraph(['FoN_rms', 'FoN_perf', 'control_rms', 'control_perf', 'momentum', 'lrate'], [])
    seed(100)
    sim.launch(nbr_try, step_propagation, step_statictics, step_learn)
    
    sim.plot(point, 'FoN_rms', ['FoN_rms', 'control_rms'],
             ["FoN" , 'control'],
             [3, 2, 3 ], moregraph1)
    
    sim.plot(point, 'FoN_perf', ['FoN_perf', 'control_perf', 'momentum', 'lrate'],
             ["FoN" , "Control", 'momentum', 'learning rate'],
             [3, 3, 2, 2 ], moregraph3)
        
开发者ID:matthieu637,项目名称:anne,代码行数:31,代码来源:expD4.py


注:本文中的simulation.Simulation.plot方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。