Coding day 1 – Codecademy

Leave a comment
Education

Codecademy offers a 7 day trial period and I immediately started the Python 10 hour course.  The platform is useful and consists of three panes: instructions and examples, script editor, and the console showing the results of the script.

codecademy

Within an hour or so, I was able to write a short Mad Libs script, which worked in the Codecademy console:

"""
This program generates passages that are generated in a cool mad-lib format
Author: Johan
"""

# The template for the story is below

STORY = "This morning %s woke up feeling %s. 'It is going to be a %s day!' Outside, a bunch of %s were protesting to keep %s in stores. They began to %s to the rhythm of the %s, which made all the %ss very %s. Concerned, %s texted %s, who flew %s to %s and dropped %s in a puddle of frozen %s. %s woke up in the year %s, in a world where %ss ruled the world."

print "Mad Libs has started!"

name = raw_input("Enter a Name: ")
adj1 = raw_input("Enter an adjective: ")
adj2 = raw_input("Enter a second adjective: ")
adj3 = raw_input("Enter a third adjective: ")

verb = raw_input("Enter a verb: ")

noun1 = raw_input("Enter a noun: ")
noun2 = raw_input("Enter another noun: ")

animal = raw_input("Enter an animal: ")
food = raw_input("Enter a food: ")
fruit = raw_input ("Enter a fruit: ")
superhero = raw_input ("Enter a superhero: ")
country = raw_input ("Enter a country: ")
dessert = raw_input ("Enter a dessert: ")
year = raw_input ("Enter a year: ")

print STORY % (name, adj1, adj2, animal, food, verb, noun1, fruit, adj3, name, superhero, name, country, name, dessert, name, year, noun2)

I wanted to save the code in a console so that people could run it.  I created this Kaggle kernel (open only on desktop).  Kaggle is a site where you can store and run your code and share with others.  However, when I ran it I got an error.  Turns out Kaggle runs Python 3 and the Codecademy course is teaching me Python 2…

Note to self (and you all): decide if you need Python 2 or 3.  Considering I’m expecting to do a lot in Kaggle, I think I need Python 3.  Back to finding an appropriate Python course.

 

Machine learning

Leave a comment
Uncategorized

As I’m working through my materials for the MIT AI course, I wanted to share some of the public information I’m using in my studies.

machine-learning1

image via Adbul Rahid

Three short videos of Facebook’s Head of AI Research on deciphering images, deep learning, and convolutional neural networks.  These are worthwhile for a quick overview.

Also, some of Google’s free online machine learning resources.

Lastly, a case study I found interesting about the online clothing company Stitch Fix’s use of machine learning and human interaction.

 

Python??

Leave a comment
Uncategorized

So I didn’t really know what language to learn first, but I came across interesting machine learning use cases that I wanted to focus on.  These include supervised learning and unsupervised learning and projects such as a movie recommendation engine, house price prediction, human activity prediction, and credit card fraud detection.  These projects are actually all included in a course from Columbia University, but I don’t think I’ll enroll in it.  But the brochure indicated that all these use cases would use Python to perform the necessary functions.  So Python it is!  I might use the brochure as a guideline to find free projects.

pylogo

There are many free resources out there to learn Python.  Here are a few.  I’ll probably go through these in the order below.

First things first, understanding AI business applications

Leave a comment
Education

To further my understanding of AI and business uses, I started to do research both in the legal vertical and others.  Although there are many resources available for free, I felt that a structured course would be better for me because of my demanding schedule.  I had taken online courses through Coursera (business analytics with UPenn’s Wharton School of Business) and felt comfortable with the format.  Online learning is not for everyone, but I like the flexibility, the quality of the videos, and the structured lessons plans and assignments.  Most online learning platforms also offer discussion boards to foster collaboration with fellow students and instructors.  However, the boards for the Wharton Coursera online courses were rarely used.  The Coursera courses are a good deal though, as  you pay a monthly fee of about $70 and you can go through the materials as quickly as you’d like.

The business analytics program gave me further insight into much of the work we’re doing right now, which is mostly descriptive and diagnostic in nature.  To learn how to code and AI applications to get to investigate predictive and prescriptive use cases, I felt I needed to look for more information.  While Coursera has AI courses as well, I felt that the class participation was lacking.  In business school, one of the most valuable experiences I had was working with others from different backgrounds.  I decided to enroll in the Artificial Intelligence: Implications for Business Strategy Program with MIT, which started last week.  I will be reporting on that progress soon!

MIT

The Journey Begins

Leave a comment
Uncategorized

Hi!  My is Johan and I am starting this blog to chronicle my journey in learning how to code and apply machine learning and AI to the practice of law.  I was a practicing attorney for about 8 years at various firms in Philadelphia.  My first non-practicing job was a gig as an innovation analyst at a multinational law firm.  Since then I’ve been involved in many legal tech and innovation projects.  Here’s my LinkedIn page, if you’re interested and check out my About page for fun facts.

I’m proficient in HTML and SQL, but I’d like to learn how to code in earnest and discover machine learning applications in both the practice and business of law.  I currently lead our data science team for the Information Governance group and serve as the liaison between the data scientists and the business.  I’d like to get my hands dirty a bit more with the nitty gritty tasks.  I’m also a Star Wars geek and like tech gadgets.  I might insert some blog posts surrounding those topics as well…

Hope you will find this blog helpful!

May the Force be with you,

Johan Solo

cropped-solo