Skip to main content

Posts

Showing posts from July, 2018

A beginners guide to NumPy

The previous post took you through the basics of machine learning using python with scikit-learn and tensorflow, this post will give you a brief introduction to Numpy. NumPy is a python package which stands for "Numeric Python". It enables you to do mathematical computations easily and effectively hence making coding simpler. http://www.numpy.org/ Installing via pip: After having python3 and pip installed, installing packages can be done using the following command on windows cmd. >>> python - m pip install -- user numpy scipy matplotlib ipython jupyter pandas --user   makes pip install packages in your home directory instead, which doesn't require any special privileges. Import Numpy: >>> import numpy as np Now we use np as a reference to numpy in the code. Numpy arrays: Create a numpy array of type np.ndarray: >>> A = np.array([[1,2,3],[4,5,6],[7,8,9]]) Create a numpy array containing ones/...

Machine Learning Quickies

This post will take you through the basics of machine learning using python with scikit-learn and tensorflow and also show the installation process for each. As discussed in the earlier post, python is the most commonly used language for machine learning applications so the first steps for us would be installing python libraries. 1. Python: Python packages are split into two versions of it as Python2 and Python3 but for simplicity we will only focus on installing Python3. For Windows and Mac users installing python is easy due to installer available at  https://www.python.org/downloads/   After installing python on windows try running python on command prompt by:            python --version Note: Windows users don't forget to  include location for python.exe in PATH environment variable of windows   For Linux/Unix users you need to open terminal and execute the following commands    First add python3 PPA t...