Giter VIP home page Giter VIP logo

mase's People

Contributors

ai4se avatar rahlk avatar timm avatar weifoo avatar yatish27 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mase's Issues

add to abstrat

can introduce interators as follows

pull from a population

method 1 (see below)

method2 keep a sub-sample of the data, randomly selected


Generate often seen things most often while generating rarer this more rarely.

Given a dictionary d{k1=n1, k2=n2, ...}, return enough keys ki at probability pi = ni/n where n = n1+n2+.. e.g.

for key in some({'box':30,'circle':20,'line':10},20)
     print key

will return around twice as many boxes as anything else, circles 1/3rd of the time and lines 1/6th of the time.

def often(d,enough=10**32):
  n, lst = 0, []
  for x in d: 
    n   += d[x]
    lst += [(d[x],x)]
  lst = sorted(lst, reverse=True)
  while enough > 0:
    r = random.random()
    for freq,thing in lst:
      r -= freq*1.0/n
      if r <= 0:
        yield thing
        enough -= 1
        break

@test
def oftend():
  seed(1)
  return [['box','line',  'circle','box','box', 
           'box','circle','circle','box','box'],
          [x for x in 
           often({'box':30,'circle':20,'line':10},
                 10)]]

review the reading project

the "lets get students to fill in promise" project is specified in https://github.com/txt/mase/blob/master/READING.md

feedback please. still amazed you are willing to do this. the collegiality at this uni.., amazing

fyi, if you want, i could come into your class to brief your students on this

the project has 2 parts

  • part2 is a big essay
  • part1 has a seed paper then students work backwards exploring reading one prior paper per week for 8 weeks
  • the actual "lets add data to promise" exercise is at the end of that sequence. so we dont ask them to do real work that effects promise until after we've trained them in paper reading
  • for your subject, you could
    • not do part2
    • don't walk over 8 papers, but over 4

review 5

missing diapers model at end of review questions

in fact, missing lots of stuff at end of review 5... how bizarre

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.