Exemplo n.º 1
0
                if not is_done(chkf, step):
                    group_filter(outdir, mdir, gname, outf_group)
                    checklist_add(chkf, step)

                step = measureperslice_str(
                ) + ' ' + measure_fname + ' ' + stats_str(
                ) + ' ' + gname + ' ' + mdir
                if not is_done(chkf, step):
                    group_stats(mdir, gname)
                    checklist_add(chkf, step)

                step = postmerging_str(
                ) + ' ' + measure_fname + ' ' + stats_str(
                ) + ' ' + gname + ' ' + mdir
                if not is_done(chkf, step):
                    post.merge_stats_slices(mdir, gname)
                    checklist_add(chkf, step)

            np.savetxt(mdir + os.path.sep + groupsizes_str(),
                       gsize,
                       fmt='%i,%i')

            step = postmerging_str() + ' ' + measure_fname + str(
                classnames) + ' ' + mdir
            if measure == 'bat':
                if not is_done(chkf, step):
                    print(
                        'Calculating Univariate Gaussian Bhattacharyya distances'
                    )
                    bat.bhattacharyya_distance(mdir, classnames, chkf,
                                               foldnumber, expname)
Exemplo n.º 2
0
            step = au.groupfilter_str() + ' ' + gname + ' ' + statsdir
            if not au.is_done(chkf, step):
               au.group_filter (outdir, statsdir, gname, outf_group, usemask)
               au.checklist_add(chkf, step)

            grp_step_params = ' ' + au.stats_str() + ' ' + gname + ' ' + statsdir
            step = au.measureperslice_str() + grp_step_params
            if not au.is_done(chkf, step):
               post.group_stats (statsdir, gname, gsize[c,1], statsdir)
               au.checklist_add(chkf, step)

            statfnames = {}
            step = au.postmerging_str() + grp_step_params
            if not au.is_done(chkf, step):
               statfnames[gname] = post.merge_stats_slices (statsdir, gname)
               au.checklist_add(chkf, step)

         sampsizef = mdir + os.path.sep + au.groupsizes_str()
         np.savetxt(sampsizef, gsize, fmt='%i,%i')

         #decide which group distance function to use
         if measure == 'bat':
             distance_func = bat.measure_bhattacharyya_distance
         elif measure == 'ttest':
             distance_func = ttst.measure_ttest

         #now we deal with the indexed excluded subject
         step = au.postmerging_str() + ' ' + str(classnames) + step_params
         exsubf = ''
         exclas = ''
Exemplo n.º 3
0
                if not au.is_done(chkf, step):
                    au.group_filter(outdir, statsdir, gname, outf_group,
                                    usemask)
                    au.checklist_add(chkf, step)

                grp_step_params = ' ' + au.stats_str(
                ) + ' ' + gname + ' ' + statsdir
                step = au.measureperslice_str() + grp_step_params
                if not au.is_done(chkf, step):
                    post.group_stats(statsdir, gname, gsize[c, 1], statsdir)
                    au.checklist_add(chkf, step)

                statfnames = {}
                step = au.postmerging_str() + grp_step_params
                if not au.is_done(chkf, step):
                    statfnames[gname] = post.merge_stats_slices(
                        statsdir, gname)
                    au.checklist_add(chkf, step)

            sampsizef = mdir + os.path.sep + au.groupsizes_str()
            np.savetxt(sampsizef, gsize, fmt='%i,%i')

            #decide which group distance function to use
            if measure == 'bat':
                distance_func = bat.measure_bhattacharyya_distance
            elif measure == 'ttest':
                distance_func = ttst.measure_ttest

            #now we deal with the indexed excluded subject
            step = au.postmerging_str() + ' ' + str(classnames) + step_params
            exsubf = ''
            exclas = ''
Exemplo n.º 4
0
            np.savetxt(outf_labels, glabels, fmt='%i')
            np.savetxt(outf_group , gselect, fmt='%i')

            step = groupfilter_str() + ' ' + measure_fname + ' ' + stats_str() + ' ' + gname + ' ' + mdir
            if not is_done(chkf, step):
               group_filter (outdir, mdir, gname, outf_group)
               checklist_add(chkf, step)

            step = measureperslice_str() + ' ' + measure_fname + ' ' + stats_str() + ' ' + gname + ' ' + mdir
            if not is_done(chkf, step):
               group_stats (mdir, gname)
               checklist_add(chkf, step)

            step = postmerging_str() + ' ' + measure_fname + ' ' + stats_str() + ' ' + gname + ' ' + mdir
            if not is_done(chkf, step):
               post.merge_stats_slices (mdir, gname)
               checklist_add(chkf, step)

         np.savetxt(mdir + os.path.sep + groupsizes_str(), gsize, fmt='%i,%i')

         step = postmerging_str() + ' ' + measure_fname + str(classnames) + ' ' + mdir
         if measure == 'bat':
            if not is_done(chkf, step):
               print ('Calculating Univariate Gaussian Bhattacharyya distances')
               bat.bhattacharyya_distance (mdir, classnames, chkf, foldnumber, expname)
         elif measure == 'ttest':
            if not is_done(chkf, step):
               print ('Calculating Student t-test')
               ttst.student_ttest (mdir, classnames, gsize, chkf, foldnumber, expname)

   #adding step end indication