Пример #1
0
def makeRandomDress(saveName, liked):
    randomArr = []
    base = likesByComponent if liked else dislikesByComponent
    for c in base[:100]:
        mu = mean(c)
        sigma = standard_deviation(c)
        p = random.uniform(0.0, 1.0)
        num = inverse_normal_cdf(p, mu, sigma)
        randomArr.append(num)
    construct(randomArr, "results/createdDresses/" + saveName)
Пример #2
0
def make_random_dress(pca, save_name, liked):
    random_array = []
    base = likesByComponent if liked else dislikesByComponent
    for c in base[:100]:
        mu = mean(c)
        sigma = standard_deviation(c)
        p = random.uniform(0.0, 1.0)
        num = inverse_normal_cdf(p, mu, sigma)
        random_array.append(num)
    construct(pca, random_array, 'results/createdDresses/' + save_name)