Пример #1
0
                            animal_votes[animal_index] = [1]
                        else:
                            animal_votes[animal_index].append(1)
                    else:
                        votes.append((user_index, animal_index, 0))
                        if not (animal_index in animal_votes):
                            animal_votes[animal_index] = [0]
                        else:
                            animal_votes[animal_index].append(0)

print "=====---"
#print votes
classify = IterativeEM()
classify.__classify__(votes)

most_likely = classify.__getMostLikely__()
estimates = classify.__getEstimates__()

X = []
Y = []
X2 = []
Y2 = []

#for subject_index,zooniverse_id in enumerate(big_subjectList):
for ii in range(animal_index):
    x = np.mean(animal_votes[ii])

    y = estimates[ii][1]
    X.append(x)
    Y.append(y)
Пример #2
0
                    subject_vote[zooniverse_id] = [0]
                else:
                    subject_vote[zooniverse_id].append(0)

        except ValueError:
            votes.append((user_index, subject_index, 0))
            if not (zooniverse_id in subject_vote):
                subject_vote[zooniverse_id] = [0]
            else:
                subject_vote[zooniverse_id].append(0)

print "=====---"
classify = IterativeEM()
classify.__classify__(votes)

most_likely = classify.__getMostLikely__()
estimates = classify.__getEstimates__()

X = []
Y = []
X2 = []
Y2 = []

for subject_index, zooniverse_id in enumerate(big_subjectList):
    subject = subject_collection.find_one({"zooniverse_id": zooniverse_id})
    if zooniverse_id in subject_vote:
        x = np.mean(subject_vote[zooniverse_id])

        y = estimates[subject_index][1]
        if subject["state"] == "complete":
            X.append(x)