hold_constant_glif[k] = v
try:
    with open('glif_seeds.p','rb') as f:
        seeds = pickle.load(f)
    assert seeds is not None

except:

    for local_attrs in grid:
        store_glif_results[str(local_attrs.values())] = {}
        dtc = DataTC()
        dtc.tests = use_test
        complete_params = {}
        dtc.attrs = local_attrs
        dtc.backend = 'GLIF'
        dtc.cell_name = 'GLIF'
        for key, use_test in test_frame.items():
            dtc.tests = use_test
            dtc = dtc_to_rheo(dtc)
            dtc = format_test(dtc)
            if dtc.rheobase is not None:
                if dtc.rheobase!=-1.0:
                    dtc = nunit_evaluation(dtc)
            print(dtc.get_ss())
            store_glif_results[str(local_attrs.values())][key] = dtc.get_ss()
        df = pd.DataFrame(store_glif_results)
        best_params = {}
        for index, row in df.iterrows():
            best_params[index] = row == row.min()
            best_params[index] = best_params[index].to_dict()
Example #2
0
test_frame



#!pip install neo --upgrade

df = pd.DataFrame(index=list(test_frame.keys()),columns=list(reduced_cells.keys()))

for k,v in reduced_cells.items():
    temp = {}
    temp[str(v)] = {}
    dtc = DataTC()
    dtc.tests = use_test
    dtc.attrs = v
    dtc.backend = 'RAW'
    dtc.cell_name = 'vanilla'


    for key, use_test in test_frame.items():
        dtc.tests = use_test
        dtc = dtc_to_rheo(dtc)
        dtc = format_test(dtc)

        if dtc.rheobase is not None:
            if dtc.rheobase!=-1.0:

                dtc = nunit_evaluation(dtc)

        df[k][key] = int(dtc.get_ss())

# A sparse grid sampling over the parameter space, using the published and well corrobarated parameter points, from Izhikitch publications, and the Open Source brain, shows that without optimization, using off the shelf parameter sets to fit real-life biological cell data, does not work so well.