This article aims to introduce users to basic ML concepts and lay the foundation for future learning and exploration of ML. We will discuss common ML terminology and then cover three Python packages that are used in ML. The article concludes with additional resources for self-study.

Terminology

Jargon is one of the first obstacles for beginners in ML. This section explains some of the most common terms you need to be familiar with.

Statistics versus Machine Learning

Statistical approaches and ML techniques both analyze observations to reveal some underlying process; however, they diverge in their assumptions, terminology, and techniques. Statistical approaches rely on foundational assumptions…


Instruction, media content, examples, and links to resources that will help you build a foundation for Python competency. Jupyter Notebooks are available on Google Colab and Github.

Modules

Web Resources
Docs.python.org — Packages

What are Python Modules?

Modules are simply Python files (.py) that contain Python code. This code can define functions, classes, variables, etc.

Why do we use Modules?

Modules allow us to organize our code by grouping related functionalities, which makes it easier to use and understand. Writing code into smaller, more manageable pieces will help you 1) debug easier, 2) create reusable code and 3) make the code more understandable to the end-user.

How do we use Modules?

We can use the…


What is a Python Class?

A class is a user-defined blueprint or prototype from which objects are created.

Why do we use Classes?

Classes provide a means of bundling data and functionality together. Creating a new class creates a new type of object, allowing new instances of that type to be made. Each class instance can have attributes attached to it for maintaining its state. Class instances can also have methods (defined by its class) for modifying its state.

To understand the need for creating a class, let’s consider an example. Let’s say you wanted to track the number of dogs which may have different attributes like breed and age…


Instruction, media content, examples, and links to resources that will help you build a foundation for Python competency. Jupyter Notebooks are available on Google Colab and Github.

Web Resources
Docs.python.org — Reading and Writing Files

What is I/O?

I/O, or input/output, is communication between a computer and the outside world.

Inputs are signals received by the computer. The computer can get inputs from hardware like a keyboard and mouse or from other computers via the internet. Outputs are signals sent by the computer. Your monitor is probably the most obvious output device. …


Instruction, media content, examples, and links to resources that will help you build a foundation for Python competency. Jupyter Notebooks are available on Google Colab and Github.

Web Resources
Docs.python.org — Functions
Docs.python.org — More on Functions

What are Python Functions?

A function is a block of organized, reusable code that is used to perform a single, related action.

Why do we use Functions?

Functions provide better modularity for your application and a high degree of code reusing.

Python gives you many built-in functions like print(), etc. but you can also create your own functions. These functions are called user-defined functions.

How do we create Functions?

You can define functions to provide the required…


Instruction, media content, examples and links to resources that will help you build a foundation for Python competency. Jupyter Notebooks are available on Google Colab and Github.

Web Resources
Docs.python.org — Control Flow
Docs.python.org — Looping Techniques

What are Python Loops?

In the real world, you often need to repeat something over and over. It can be repetitive. When programming, though, if you need to do something 100 times, you certainly don’t need to write it out in 100 identical lines of code. In Python, loops allow you to iterate over a sequence, whether that’s a list, tuple, string, or dictionary.

What types of Python Loops are there?

There is a…


Instruction, media content, examples, and links to resources that will help you build a foundation for Python competency. Jupyter Notebooks are available on Google Colab and Github.

Web Resources
Docs.python.org — Conditional Statements
Python Wiki — If Statement

What are Python Conditionals?

When you write code, you are giving instructions to the computer. When you are completing a task in the real world, however, you don’t just step through a sequence of instructions blindly. Depending on what else is going on, you will want to adapt your actions. The Python conditional allows you to encode these instructions so that the computer can dynamically adapt…


What are Operators?

Python operators are symbols that perform an operation on one or more operands. An operand is a variable or a value on which we perform the operation.

Why use Operators?

Operators can manipulate individual items and return a result. Operators manipulate individual items by conducting mathematical operations and/or returning a Boolean value (True or False).

What are Mathematical Operators?

Mathematical operators are basic arithmetic symbols used to perform addition, subtraction, multiplication, and more.


Instruction, media content, examples and links to resources that will help you build a foundation for Python competency. Jupyter Notebooks are available on Google Colab and Github.

Prerequisite knowledge

  • Variable assignment using a single equals =
  • Variables must use letters first and not numbers e.g. var_1 and not 1_var
  • There are reserved words that cannot be used such as print, str, int....

Single Data Types

Web Resources
Docs.python.org — Numbers Data Types
Docs.python.org — Strings Data Types
Docs.python.org — Lists Data Types
Docs.python.org — Dictionary Data Types

Strings

What is a String?

A string is a data type that is used to represent text rather than numbers and is composed…


For this analysis, we use several Python-based scientific computing technologies along with the AlphaWave Data Stock Analysis API. Jupyter Notebooks detailing this analysis are also available on Google Colab and Github.

import time
import requests
import selenium
import numpy as np
import pandas as pd
from sympy import *
from datetime import date
from datetime import timedelta
from selenium import webdriver
import pandas_datareader as dr
import matplotlib.pyplot as plt
from datetime import datetime as dt
from bs4 import BeautifulSoup as bs
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support …

Hugh Donnelly

Hugh co-founded AlphaWave Data in 2020 and is responsible for risk, attribution, portfolio construction, and investment solutions.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store