We’ll cover the basis of setting up python, building data models from the DMS weather station (given its still working) in influxdb, and would be diving into modules like keras, jupyter notebook, and pytorch.
Check it out of you like; I know we’ll be having a lot of fun diving into this together. If there’s enough interest we could continue it on into a weekend hackathon as a group project.
95% of the work of ML is wrangling the data and filling in NaN values with either interpolation or nearest neighbor or the mean of the data in a particular column, that is the work is the intuitive Data Science.
yeah under the hood there’s a linux docker container. so it has GCC, pip, and the usual gnu tools. but I bet it was a lot more fun “hacking” at it to figure it out.
It quoted me a couple dollars more and had a 30 day money back guarantee so I signed up. Thanks for the link. I had joked that I had learned so many languages before retirement and I would not take on another. But every time I see the power of Python, I was impressed.
I know what you mean, just was doing some monte carlo modeling earlier today for the probability if someone would call a rideshare given they’re walking more than 4 blocks away from “home”.
In C that’s a few hundred lines of code.
Python…
# coding: utf-8
"""
Models a person going 'x' blocks from home and probability of a rideshare being called.
"""
from random import choice as choose
DIRECTIONS = {
"North": (0, 1),
"South": (0, -1),
"East": (1, 0),
"West": (-1, 0),
}
def rand_walk(iterations):
"""
Random walking on a grid with reverse paths allowed
"""
grid_x, grid_y = 0, 0
for _ in range(iterations):
(grid_dx, grid_dy) = choose([
DIRECTIONS['North'],
DIRECTIONS['South'],
DIRECTIONS['East'],
DIRECTIONS['West']
])
grid_x += grid_dx
grid_y += grid_dy
return (grid_x, grid_y)
def model(num_of_walks, max_blocks):
"""
Calculate model
"""
for walk_len in range(1, max_blocks):
no_transport = 0
for _ in range(num_of_walks):
(grid_x, grid_y) = rand_walk(walk_len)
distance = abs(grid_x) + abs(grid_y)
if distance <= 4:
no_transport += 1
no_transport_percentage = float(no_transport) / num_of_walks
print("Walk size = ", walk_len,
" / % of no transport = ", 100 * no_transport_percentage)
def main():
"""
Do the things
"""
for _ in range(25):
walk = rand_walk(10)
print(walk, "Distance from home = ", abs(walk[0]) + abs(walk[1]))
for walks in (100, 10000):
model(num_of_walks=walks, max_blocks=31)
if __name__ == '__main__':
main()
# vim: set sts=4 ts=4 et number list:
Less than 70 but that’s also with comments for help(), readability, and prep as an importable module (ie ready to be published via pip). Plus one can add in a quick genetic algorithm and randomizer in about another 10 lines.
The really fun part for this greybeard is the rand_walk function can be used in game development.