This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""This script is hack to get a quick idea of how many mastery challenges | |
are being done under each mission. It's hacky for a lot of reasons.. I | |
don't have time to list them all. But here's a few. :) | |
*) The user_mission (and thus the mission) associated with each LearningTask | |
is the mission at the time of the creation. For MasteryChallenges, this | |
may not be a problem-- I'm not sure. But if this was extended to work | |
on, say, PracticeTasks, a user could create the task in one mission, then | |
switch missions and actually do the problems in another misison. This | |
script would not understand that. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import collections | |
import numpy as np | |
class CompressedFeatures: | |
def __init__(self, num_features=50): | |
self.random_components = collections.defaultdict( | |
self._generate_component) | |
self.num_features = num_features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from pandas import DataFrame, Series | |
import numpy as np | |
import math | |
import random | |
import copy | |
NaN_Flag = -1 # pandas uses np.nan, but that coerces ints to floats :( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from numpy import asmatrix, asarray, ones, zeros, mean, sum, arange, prod, dot, loadtxt | |
from numpy.random import random, randint | |
import pickle | |
MISSING_VALUE = -1 # a constant I will use to denote missing integer values | |
def impute_hidden_node(E, I, theta, sample_hidden): |