

def generate_data(seed, nObsTotal):
    PRNG = np.random.RandomState(seed)
    trueList = list()
    Npercomp = PRNG.multinomial(nObsTotal, w)
    X = list()
    for k in range(K):
        X.append(sample_data_from_comp(k, Npercomp[k], PRNG))
        trueList.append((k * np.ones(Npercomp[k])))
    X = np.vstack(X)
    TrueZ = np.hstack(trueList)
    permIDs = PRNG.permutation(X.shape[0])
    X = X[permIDs]
    TrueZ = TrueZ[permIDs]
    return (X, TrueZ)

dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/demodata/HashtagK9.py generate_data/original