示例#1
0
    ths_unq = _N.unique(ths)
    interiorPts = _N.setdiff1d(_N.arange(len(x)), ths_unq)
    #print("%(ths)d" % {"ths" : len(ths)})
    return _ss.pearsonr(x[interiorPts], y[interiorPts])



#  (12)
#  (13)

#  possible 2-patterns
#
oldnew   = "new"

if oldnew == "old":
    dates = _rt.date_range(start='7/13/2021', end='08/17/2021')
elif oldnew == "new":
    dates = _rt.date_range(start='08/18/2021', end='10/30/2021')

partIDs, dats, cnstrs = _rt.filterRPSdats("TMB1", dates, visits=[1], domainQ=_rt._TRUE_ONLY_, demographic=_rt._TRUE_AND_FALSE_, mentalState=_rt._TRUE_AND_FALSE_, minIGI=300, maxIGI=30000, MinWinLossRat=0., has_useragent=True, has_start_and_end_times=True, has_constructor=True, blocks=4)

pid = 0

netwins  = _N.empty((4, len(partIDs)))
win_aft_win  = _N.empty((4, len(partIDs)))
win_aft_los  = _N.empty((4, len(partIDs)))
win_aft_tie  = _N.empty((4, len(partIDs)))
netwin_aft_win  = _N.empty((4, len(partIDs)))
netwin_aft_los  = _N.empty((4, len(partIDs)))
netwin_aft_tie  = _N.empty((4, len(partIDs)))
tie_aft_win  = _N.empty((4, len(partIDs)))
示例#2
0
#partIDs7=["20201122_1108-25", "20201121_1959-30", "20201121_2131-38"]
#partIDs7 = ["20200410_2203-19", "20200410_2248-43", "20200415_2034-12", "20200418_2148-58"]
#partIDs7 = ["20200410_2248-43"]
if data == "EEG1":
    partIDs = partIDs1 + partIDs2 + partIDs3 + partIDs4 + partIDs5 + partIDs6# + partIDs7
if data == "RAND":
    USE = 43
    
    _partIDs = os.listdir("/Users/arai/Sites/taisen/DATA/RAND/20210803")
    partIDs = []
    these   = _N.random.choice(_N.arange(len(_partIDs)), USE)
    for i in range(USE):
        partIDs.append(_partIDs[these[i]])
    
if data == "TMB2":
    dates = _rt.date_range(start='7/13/2021', end='08/30/2021')
    #dates = _rt.date_range(start='7/13/2021', end='07/27/2021')
    #dates = _rt.date_range(start='7/27/2021', end='08/20/2021')
    #dates = _rt.date_range(start='07/27/2021', end='08/20/2021')
    #dates = _rt.date_range(start='07/13/2021', end='07/27/2021')
    #partIDs, dats, cnstrs = _rt.filterRPSdats(data, dates, visits=[1], domainQ=_rt._TRUE_AND_FALSE_, demographic=_rt._TRUE_AND_FALSE_, mentalState=_rt._TRUE_AND_FALSE_, minIGI=800, MinWinLossRat=0.7, has_useragent=True, has_start_and_end_times=True, has_constructor=True, blocks=1)
    #partIDs, dats, cnstrs = _rt.filterRPSdats(data, dates, visits=[1], domainQ=_rt._TRUE_ONLY_, demographic=_rt._TRUE_AND_FALSE_, mentalState=_rt._TRUE_AND_FALSE_, minIGI=800, MinWinLossRat=0.7, has_useragent=True, has_start_and_end_times=True, has_constructor=True, blocks=1)
    partIDs, dats, cnstrs = _rt.filterRPSdats(data, dates, visits=[1], domainQ=(_rt._TRUE_ONLY_ if look_at_AQ else _rt._TRUE_AND_FALSE_), demographic=_rt._TRUE_AND_FALSE_, mentalState=_rt._TRUE_AND_FALSE_, minIGI=650, maxIGI=30000, MinWinLossRat=0.3, has_useragent=True, has_start_and_end_times=True, has_constructor=True, blocks=1)

A1 = []
show_shuffled = False
process_keyval_args(globals(), sys.argv[1:])
#######################################################

MULT   = 1.   #  kernel width
fxdGK  = None
示例#3
0
    sys.exit()
if sys.argv[1] == "TMB2":
    expt = sys.argv[1]
else:
    expt = "TMB1"
    old_TMB1 = False    
    if sys.argv[1] == "TMB1_o":
        old_TMB1 = True

#######################################
#######################################  where TMB1 and TMB2 directories are
zipped_dir = "/Users/arai/Sites/taisen/DATA/%s" % expt

#dates      = ["20210723"]

dates = _rt.date_range(start='7/13/2021', end='12/30/2022')
if (expt == "TMB1"):
    if old_TMB1:
        dates = _rt.date_range(start='7/13/2021', end='8/17/2021')
    else:
        dates = _rt.date_range(start='8/18/2021', end='11/30/2021')
        
#dates = pd.date_range(start='7/1/2021', end='7/31/2021')

for date in dates:
#    _date = "%(yr)d%(mn)2d%(dy)2d" % {"yr" : date_tmstmp.year, "mn" : date_tmstmp.month, "dy" : date_tmstmp.day}
#    date  = _date.replace(" ", "0")

    hr = 0
    mn = 0
    
示例#4
0
_ME_WTL = 0
_ME_RPS = 1

_SHFL_KEEP_CONT = 0
_SHFL_NO_KEEP_CONT = 1


def depickle(s):
    import pickle
    with open(s, "rb") as f:
        lm = pickle.load(f)
    return lm


#dates = _rt.date_range(start='7/13/2021', end='8/17/2021')
dates = _rt.date_range(start='8/18/2021', end='11/30/2021')

nicknames = {
    "FixedSequence(__moRSP__, " + "[1, 1, 2, 1, 3, 1, 1, 1, 1, 3, " + "1, 1, 2, 1, 1, 1, 1, 1, 1, 3, " + "1, 1, 2, 1, 1, 3, 1, 2, 1, 1, " + "2, 1, 1, 1, 3, 1, 1, 1, 1, 1]);":
    "Biased_Random",
    #
    "FixedSequencen(__moRSP__, " + "[3, 1, 2, 3, 2, 1, 2, 3, 3, 1, " + "1, 1, 2, 1, 3, 3, 2, 1, 2, 3, " + "3, 1, 2, 1, 2, 1, 3, 2, 2, 3, " + "2, 1, 3, 3, 2, 2, 3, 1, 3, 1]);":
    "Unbiased_Random",
    #
    "WTL(__moRSP__, " + "[0.05, 0.85, 0.1], [1/3, 1/3, 1/3], [1/3, 1/3, 1/3], false);":
    "Exploitable_Win",
    #
    "Mimic(__moRSP__, 0, 0.2);":
    "Mimic"
}
示例#5
0
import AIiRPS.constants as _cnst
from AIiRPS.utils.dir_util import getResultFN
import GCoh.datconfig as datconf


def depickle(s):
    import pickle
    with open(s, "rb") as f:
        lm = pickle.load(f)
    return lm


data = "TMB2"
if data == "TMB1":
    dates = _rt.date_range(start='7/13/2021', end='11/10/2021')
    partIDs, dats, cnstrs = _rt.filterRPSdats(data,
                                              dates,
                                              visits=[1],
                                              domainQ=_rt._TRUE_AND_FALSE_,
                                              demographic=_rt._TRUE_ONLY_,
                                              mentalState=_rt._TRUE_AND_FALSE_,
                                              minIGI=400,
                                              maxIGI=30000,
                                              MinWinLossRat=0.1,
                                              has_useragent=True,
                                              has_start_and_end_times=True,
                                              has_constructor=True,
                                              blocks=4)
if data == "TMB2":
    dates = _rt.date_range(start='7/13/2021', end='11/10/2021')