THE LACK THEREOF

2019.03.03 Learning Machine Learning

I'm working on making the jump from READING about recent machine learning techniques to APPLYING recent machine learning techniques. I have some nice datasets at work, so I am doing a bit of double-dipping by playing with those.

I previously struggled with getting started, getting bogged down in picking technologies and such. I'm specifically going after some Neural Network models, so also get overwhelmed with the Python ecosystem of tools and libraries. The best way to get started is to get started .. so I turned the corner with a little help.

Fluent Python (book)
Great advanced-introduction to Python, letting me better understand/recognize meta-programming and DSLs. Things like the array-slice syntax turning into an object which can be passed to any class that implements the right methods.
Keras
I think this is the second-most popular python NN library, after Tensorflow itself, and it has Tensorflow as a backend. Seems nice and usable. Then I pull in whatever numpy stuff as needed.
Convolutional Neural Networks
I knew about image and audio convolution filters, so had to spend some effort in transferring that knowledge into how convolutional layers work in a CNN. I read a bunch of articles like Visualize CNN With Keras to get my mind around this.
Dog vs Cat with Augmentation
I had been through random tutorials before, but this time I went through Building Powerful Image Classification Models Using Very Little Data in detail, step by step, and made sure that I roughly understood each step. To help, I switched from Dog and Cat images into my own dataset -- so I had to go through the usual data cleaning process in addition to the learning.
Living Code
Meanwhile I've also been sharing my excitement with friends and coworkers, and started a new Machine Learning club at work. We're taking even the simple examples and building them into services that our live systems can use - code that isn't running is dead code, and dead code is soon abandoned code. A big part of this learning is getting LIVING examples, and the double-dipping of making something useful for work is a great way to get that.

Add Comment

2018.12.08 Transition

transition.jpg

let gray = amt => color(amt, amt, amt);

function setup() {
  randomSeed(7);
  createCanvas(600, 600);

  for (let i = 0; i < 200; i++) {
    x1 = randomGaussian(300, 120);
    y1 = randomGaussian(300, 50);
    y2 = randomGaussian(300, 50);
    fill(gray(x1 / 600 * 255));
    line(x1, y1, x1, y2);
    ellipse(x1, y1, 20, 20);
    ellipse(x1, y2, 20, 20);
  }
}

(View full source at https://repl.it/@BrockWilcox/Transition)

Add Comment

2018.11.12 Destroy Things

I think it's important to learn through destruction. I like to proble the edges of things, and one of the best ways of knowing where IS the edge is to go over it. So ... let's go over the edge.

First we need a nice fresh ubuntu:

awwaiid@zokei:~$ docker run -it ubuntu bash
root@1cf14a7465fd:/#

Now, this isn't a completely isolated machine or anything, but it'll do. Keep in mind that this is running as root on your machine (if you're running a Linux host at least, this is probably safer on osx), so you should be a little afraid. Fear will keep you on your toes!

Let's cause a little destruction! Make sure you are INSIDE of this new ubuntu container, and then:

root@1cf14a7465fd:/# rm -rf /

They always joke that you shouldn't do that. Turns out our lovely ubuntu is trying to help us not hurt ourselves, so we have to pass a special flag:

root@1cf14a7465fd:/# rm -rf --no-preserve-root /

WHOA! Whole lot of errors. Many of them are very good things about how you can't remove stuff in /sys/devices because of it being a read-only filesystem (remember that running as root bit?). And now the fun begins.

root@1cf14a7465fd:/# ls
bash: ls: command not found

Oh right. "ls" is a command that is an executable program that lives at /bin/ls. Correction: LIVED. But no longer. That's ok ... tab completion still works!

root@1cf14a7465fd:/# cd <tab><tab>
dev/  etc/  proc/ sys/
root@1cf14a7465fd:/# cd etc
root@1cf14a7465fd:/etc#

Great! So we can git directory lists. Let's look at some files

root@1cf14a7465fd:/# cat <tab><tab>
hostname     hosts        resolv.conf  
root@1cf14a7465fd:/# cat resolv.conf
bash: cat: command not found

Oh right. No "cat" command either. What commands DO we have? Well, we have any bash built-in. And we have bash as a programming language with loops and all that. Now we start to get fancy.

root@1cf14a7465fd:/# while read p; do echo $p; done < /etc/hostname
1cf14a7465fd

Nice. We can now look at the contents of files. But if we are ever going to rebuild our system we'll also need to write files. Easy!

root@1cf14a7465fd:/etc# echo 'echo "hello!"' > hello.sh
root@1cf14a7465fd:/etc# . /etc/hello.sh
hello!

We cheated a bit with that "." to "source" the file. I'm not sure how to make it executable, since we no longer have chmod. Maybe we'll try that next time.

Enjoy your broken docker container!

Add Comment

2018.07.29 Multiverse Timetravel Accounting

I've been doing a spot of accounting at work over the last few months. This is clearly a failure of delegation and management on my part, but it has led to at least one deep observation that I mightn't have had otherwise.

Accountants are secretly time travelers.

Perhaps that is a slight exaggeration. They don't ACTUALLY travel through time. But if you hang out with them a bit and observe their twisted time and verb conjugation ... well it's obvious that they would be right at home hopping around a branching multiverse.

For example, there we were at the end of June. Topic at hand: things that are going to happen in May, from the perspective of late April. Casual conversations include things like "If we put the new rule into place in late June, then when May hits we'll have to go all the way back to February to get the correct outcome". Mind bending! Daily conversation, without anyone blinking an eye.

Alternate timelines are discussed quite a bit also. They aren't quite stated this way, but basically they go along thinking in terms of events from timeline A, and then decide "No! Wait! We aren't in timeline A, we are in timeline B!!!!" and maybe freak out a little about how they now have to rewrite history to match the current reality or perhaps adjust the perception of the current reality to match the new history. Some of it even appears to be experimental, running simulations on previous events to try to see how it changes the present (well ... and the future).

One thing I'm glad of is the ethical standards to which time travelers.... er... accountants adhere. There is an ongoing insistence that no matter what timeline they find themselves in, they should reconcile with the past and ever move to a more obvious and simple future. Try not to change the facts of the past, but if you do please keep some integrity in the universe so it can have some degree of cohesion in the present.

Anyway. Take my advice. If you go adventuring around in your time machine, bring an accountant to keep track of what is going on.

Add Comment

2018.07.23 Link Roundup

  • Is Google Making Us Stupid?
    • I have a big stack of books that I've made ... fairly little progress on
    • Maybe the internet is eating my brain!
    • So now I will post links and bullets
  • Base-4 fractions in Telugu
    • Interesting explanation of the traditional Telugu fraction numbering. Also draws comparison to the traditional English measures
  • Git remote branches and Git's missing terminology
    • Presents a better understanding of git remote branches, highlighting that to really comprehend what's going on you must acknowledge the implicit local branch that is your cache of the upstream (such as origin/master)
    • I'm a little worried that I'm going to end up linking half of MJD's blog posts. Oh well, they are great. Example, /dev/null Follies has a hilarious nerdy punchline.

Add Comment

More...


META INFORMATION: This is the technical blog and wiki of Brock Wilcox (awwaiid). Entries focus on my current projects, interests, and sometimes life events. If you'd like you can check out the list of All Entries or the RSS Feed. I also have a LiveJournal syndication feed for LJ friends.

Navigation

Blog

https://thelackthereof.org/pics/16px-Feed-icon.svg.png Blog RSS Feed

Tweets


2019-07-21

2019-07-17

2019-07-16

2019-06-07

2019-06-02

Toots (Mastodon)

2018-07-02

2018-06-30

Code

Follow @awwaiid

Wiki Edits

https://thelackthereof.org/pics/16px-Feed-icon.svg.png Wiki RSS Feed

... more changes