avatarNaina Chaturvedi

Summary

The web content outlines Day 3 of a 30-day series on Machine Learning Operations (MLOps), covering advanced topics in data science and machine learning, including Pandas, Numpy, model training, and MLOps best practices, with links to related courses and projects.

Abstract

Day 3 of the MLOps series delves into essential Numpy concepts such as array creation, manipulation, and operations like broadcasting and scalar products. It builds upon previous days' content on MLOps basics, data handling, and modeling. The article emphasizes practical learning through projects and provides resources for further study, including links to comprehensive courses on Udacity and a YouTube channel dedicated to MLOps and related fields. It also touches on the importance of reproducibility, testing, production, and staying updated with research papers in the MLOps domain. The content is part of a broader educational initiative that includes series on data engineering, deep learning, data visualization, and system design, aiming to equip readers with the skills needed for a career in tech.

Opinions

  • The author advocates for hands-on learning, emphasizing the importance of implementing projects to solidify understanding.
  • There is a strong endorsement for structured learning through curated courses and series, particularly those offered by Udacity.
  • The author believes in the value of subscribing to newsletters and following relevant channels to stay informed about the latest developments in tech.
  • The content suggests that mastery in MLOps requires a combination of theoretical knowledge from research papers and practical skills from project implementation.
  • The author expresses that continuous learning and coding are crucial for growth in the field of data science and machine learning.

Day 3 of 30 days of Machine Learning Ops

With examples and projects…

Pic credits : mlops

Welcome back peeps to the Day 3 of 30 days of MLOps. You can find Day 1 below —

Day 2 :

On Day 3, we will covering —

1. Pandas and Numpy — Part 2

Projects Videos —

All the projects, data structures, SQL, algorithms, system design, Data Science and ML , Data Analytics, Data Engineering, , Implemented Data Science and ML projects, Implemented Data Engineering Projects, Implemented Deep Learning Projects, Implemented Machine Learning Ops Projects, Implemented Time Series Analysis and Forecasting Projects, Implemented Applied Machine Learning Projects, Implemented Tensorflow and Keras Projects, Implemented PyTorch Projects, Implemented Scikit Learn Projects, Implemented Big Data Projects, Implemented Cloud Machine Learning Projects, Implemented Neural Networks Projects, Implemented OpenCV Projects,Complete ML Research Papers Summarized, Implemented Data Analytics projects, Implemented Data Visualization Projects, Implemented Data Mining Projects, Implemented Natural Leaning Processing Projects, MLOps and Deep Learning, Applied Machine Learning with Projects Series, PyTorch with Projects Series, Tensorflow and Keras with Projects Series, Scikit Learn Series with Projects, Time Series Analysis and Forecasting with Projects Series, ML System Design Case Studies Series videos will be published on our youtube channel ( just launched).

Subscribe today!

Highly Recommended Data Science and Machine Learning Courses that you MUST take ( with certificate) —

Complete Data Scientist

Complete Data Analyst

Complete Data Engineering

Complete Machine Learning Engineer

Complete Deep Learning

Complete Natural Language Processing

Complete Self Driving Car Engineer

Find best data science and data engineering courses here

Find best Machine Learning and Deep Learning courses here

Our whole syllabi for 30 days of MLOps is as follows —

1.MLOps Basics and Principles

What is MLOps?

Purpose

What’s important?

2. Data

Complete Python with projects

Pandas and Numpy

Exploratory Data Analysis

Data preprocessing ( Collecting, Labeling and Validating data)

Data Labelling and Advanced Data Labeling Methods

Data Splitting

Feature Engineering

Data Augmentation

3.Modeling

Model Training and Evaluation

Model Baselines

Model Tuning and Optimization

Model Review and governance

Automated Model retraining

Model Deployment and monitoring

Model Inference and Serving

Model Resource Management Techniques

Model Analysis

High-Performance Modeling

4.Developing

End — to — End ML Workflow Cycle

ML workflows

MLOps Logging and Documentation

MLOps Makefile

ML Lake

ML Pipelines and toolkits

MLOps tools and Frameworks

5. Testing and Reproducibility

Git

Versioning

Docker

6. Production

Continuous Integration

Continuous Delivery and Deployment

Monitoring and Logging

Feature Stores

MLOps architecture and Infrastructure Stack

Model Serving Patterns and Infrastructures

Model fairness, Explainability issues, and Mitigate bottlenecks

7. MLOps (Amazing) Papers

Some amazing MLOps research papers that I have read over the years to help you boot up to the industry standards and what’s next in this field.

Let’s get started with Day 3!

In Numpy, we will covering the most important Numpy concepts—

Create Numpy Arrays

Zeros arrays

Ones arrays

Full arrays

Identity Matrix

reshape()

flatten() function

Concatenation

Broadcasting

Scalar Product

Numpy is a python library for scientific computing — to work with multidimensional array objects and used to handle large amount of data. An array which is a grid of values and is indexed by a tuple of nonnegative integers is main data structure of the Numpy library. ndarray is acronym of N-Dimensional Array.

Lets dive in!

Import Numpy

import numpy as np

Create Numpy Arrays

a = np.array([1,2,3])

Zeros arrays : returns a new array setting values to 0

np.zeros(12)

Output —

array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])

Implementation 2 —

np.zeros(7,dtype=int)

Output —

array([0, 0, 0, 0, 0, 0, 0])

Ones arrays : Return a new array of given shape and type all filled with 1

Implementation 1 —

np.ones(5)

Output —

array([1., 1., 1., 1., 1.])

Implementation 2 —

np.ones((3,5),dtype="int")

Output —

array([[1, 1, 1, 1, 1],
       [1, 1, 1, 1, 1],
       [1, 1, 1, 1, 1]])

Full arrays: Returns a new array of given shape filled with a specified value

Implementation —

np.full((3, 6), 9)

Output —

array([[9, 9, 9, 9, 9, 9],
       [9, 9, 9, 9, 9, 9],
       [9, 9, 9, 9, 9, 9]])

Identity Matrix

Implementation —

np.eye(5)

Output —

array([[1., 0., 0., 0., 0.],
       [0., 1., 0., 0., 0.],
       [0., 0., 1., 0., 0.],
       [0., 0., 0., 1., 0.],
       [0., 0., 0., 0., 1.]])

reshape()

Used to change shape of an array.

Implementation 1 —

np.arange(1,15).reshape(2,7)

Output —

array([[ 1,  2,  3,  4,  5,  6,  7],
       [ 8,  9, 10, 11, 12, 13, 14]])

Implementation 2 —

arr = np.arange(1,10).reshape((1,9))

Output —

array([[1, 2, 3, 4, 5, 6, 7, 8, 9]])

Flattening the Arrays

Used to convert a multidimensional array into a 1D array. To implement it —

reshape(-1) function

flatten() function

Implementation —

a2 = np.arange(1,9).reshape((1,8))
a2.reshape(-1)
a2.flatten()

Output —

array([1, 2, 3, 4, 5, 6, 7, 8])

Concatenation

To combine together two numpy arrays

Implementation 1 —

a1 = np.array([100,110,140])
a2 = np.array([120,121,220])
np.concatenate([a1,a2])

Output —

array([100, 110, 140, 120, 121, 220])

Implementation 2 —

arr1 = np.array([[10,20,30],[40,50,60]])
arr2 = np.array([[101,102,103],[104,105,106]])
np.concatenate([arr1,arr2])

Output —

array([[ 10,  20,  30],
       [ 40,  50,  60],
       [101, 102, 103],
       [104, 105, 106]])
np.concatenate([arr1,arr2],axis=1)

Output —

array([[ 10,  20,  30, 101, 102, 103],
       [ 40,  50,  60, 104, 105, 106]])

Broadcasting

It’s a powerful mechanism that allows numpy to work with arrays of different shapes when performing arithmetic operations.

If the arrays do not have the same rank, prepend the shape of the lower rank array with 1s until both shapes have the same length.

The two arrays are said to be compatible in a dimension if they have the same size in the dimension, or if one of the arrays has size 1 in that dimension.

The arrays can be broadcast together if they are compatible in all dimensions.

After broadcasting, each array behaves as if it had shape equal to the elementwise maximum of shapes of the two input arrays. In any dimension where one array had size 1 and the other array had size greater than 1, the first array behaves as if it were copied along that dimension

Implementation —

arr1 = np.array([1, 0, 1])
arr2 = np.array([1])
arr1 + arr2

Output —

array([2, 1, 2])

Scalar Product

It takes two equal-length sequences of numbers and returns a single number.

Implementation —

arr1 = np.array([[30,15],[19,42]]) 
arr2 = np.array([[101,90],[45,64]])
np.dot(arr1,arr2)

Output —

array([[3705, 3660],
       [3809, 4398]])

That’s it for now! Tighten your belt and get ready to take a deep dive because Day 4 is Coming soon!

Subscribe/ Follow and Stay Tuned!!

Some of the other best Series —

30 days of Machine Learning Ops

30 Days of Natural Language Processing ( NLP) Series

30 days of Data Structures and Algorithms and System Design Simplified

60 Days of Deep Learning with Projects Series

60 Days of Deep Learning with Projects Series

30 days of Data Engineering with projects Series

Data Science and Machine Learning Research ( papers) Simplified **

60 days of Data Science and ML Series with projects

100 days : Your Data Science and Machine Learning Degree Series with projects

23 Data Science Techniques You Should Know

Tech Interview Series — Curated List of coding questions

Complete System Design with most popular Questions Series

Complete Data Visualization and Pre-processing Series with projects

Complete Python Series with Projects

Complete Advanced Python Series with Projects

Kaggle Best Notebooks that will teach you the most

Complete Developers Guide to Git

Exceptional Github Repos — Part 1

Exceptional Github Repos — Part 2

All the Data Science and Machine Learning Resources

210 Machine Learning Projects

Tech Newsletter —

If you are interested, you can join my newsletter through which I send tech interview tips, techniques, patterns, hacks — Software Development, ML, Data Science, Startups and Technology projects to more than 30K readers. You can subscribe to Tech Brew :

All the Complete System Design Series Parts —

1. System design basics

2. Horizontal and vertical scaling

3. Load balancing and Message queues

4. High level design and low level design, Consistent Hashing, Monolithic and Microservices architecture

5. Caching, Indexing, Proxies

6. Networking, How Browsers work, Content Network Delivery ( CDN)

7. Database Sharding, CAP Theorem, Database schema Design

8. Concurrency, API, Components + OOP + Abstraction

9. Estimation and Planning, Performance

10. Map Reduce, Patterns and Microservices

11. SQL vs NoSQL and Cloud

12. Most Popular System Design Questions

Github —

Keep learning and coding :)

For Python Projects —

For complete 60 days of Data Science and ML : Day 1 — Day 60 : Quick Recap of 60 days of Data Science and ML

Follow for more updates. Stay tuned and keep coding! Disclosure: Some of the links are affiliates.

For other projects, tune to —

Build Machine Learning Pipelines( With Code)

Recurrent Neural Network with Keras

Clustering Geolocation Data in Python using DBSCAN and K-Means

Facial Expression Recognition using Keras

Hyperparameter Tuning with Keras Tuner

Custom Layers in Keras

Machine Learning
Data Science
Tech
Programming
Artificial Intelligence
Recommended from ReadMedium