Ejemplo n.º 1
0
def cgpstudy():
    """
    Basic example of connecting the building blocks of a cGP study.
    
    This top-level orchestration can be done in many different ways, depending 
    on personal preference and on the need for features such as storage, 
    caching, memory management or parallelization. Some examples are given in 
    :mod:`cgp.examples.hpc`.
    """
    from numpy import concatenate as cat

    gt = np.array(genotypes)
    par = cat([monogenicpar(g, hetpar=par0, absvar=absvar) for g in gt])
    ph = cat([par2ph(p) for p in par])
    agg = cat([ph2agg(p) for p in ph])
    
    summarize(gt, agg)
    plt.show()
Ejemplo n.º 2
0
def gt2par(gt):
    """Genotype-to-parameter mapping."""
    return monogenicpar(gt, hetpar=par0, absvar=absvar)