Mehdi Ghasemi, Developer in Edmonton, AB, Canada

Mehdi Ghasemi

Mathematics Developer

Edmonton, AB, Canada
Toptal Member Since
May 4, 2017

Mehdi is a mathematician and scientific programmer who specializes in applied math and very abstract concepts. His scientific background is rooted in optimization, geometry, and computations, and he has been working as a data scientist for years now, building statistical and machine learning models.

Mehdi is available for hire
Hire Mehdi


Edmonton Police Service
Bayesian Inference & Modeling, Data Visualization, Jupyter, Python, SQL...
University of Saskatchewan
Statistics, Mathematics
SQL, Python


Mathematics - 20 yearsOptimization - 10 yearsMathematical Modeling - 10 yearsPython - 9 yearsMachine Learning - 5 yearsTime Series Analysis - 4 years


Edmonton, AB, Canada



Preferred Environment

Jupyter, Git, PyCharm

The most amazing...

...project I've worked on is a global optimization method based on a series of SDPs that in theory is capable of solving any given optimization problem.

Work Experience

2020 - PRESENT

Senior Scientist | Mathematician

Edmonton Police Service
  • Made adjustments to police communication branch staffing to meet and improve upon national minimum standards.
  • Forecasted the impact of COVID-19 on the police force and its corresponding risk analysis.
  • Analyzed the transition of heavy drug-users over time. Also, studied the network of drug users/distributors around the city and effective methods for concentrated disruption of drug-related offenses.
Technologies: Bayesian Inference & Modeling, Data Visualization, Jupyter, Python, SQL, Scheduling, Stochastic Modeling, Machine Learning, Trend Analysis, Forecasting
2018 - PRESENT

Adjunct Professor

University of Saskatchewan
  • Collaborated with other researchers in scientific projects that involve mathematical modeling.
  • Co-supervised graduate students in areas related to optimization and computer science.
Technologies: Statistics, Mathematics
2017 - 2020

Data Scientist

  • Designed and implemented pipelines to extract specialized datasets out of the administrative database.
  • Used government data, analyzed some of the existing practices to find bottlenecks, and optimized procedures.
  • Employed machine learning to improve upon decisions made based on standard assessments.
  • Evaluated feasibility of new policies to achieve certain goals by employing time-series analysis and forecasting.
  • Made local/provincial evaluation of initiatives in correction, justice, and child welfare.
Technologies: SQL, Python
2017 - 2018


The Centre for Forensic Behavioural Science and Justice Studies
  • Analyzed the risk assessment tool LSI (Level of Service Inventory).
  • Applied machine learning to LSI data in order to obtain personalized preventive interventions for offenders.
Technologies: SQL, SPSS, Python
2015 - 2017

MITACS Postdoctoral Fellow

University of Saskatchewan
  • Organized the Saskatoon Police Predictive Analytics Laboratory.
  • Built a mathematical simulation of the missing children phenomenon to identify its deriving factors among youth.
  • Researched the optimization and moment problem.
Technologies: Python, Optimization, Mathematical Modeling
2013 - 2014

Postdoctoral Research Fellow

Nanyang Technological University
  • Implemented SDP UI for SAGE/Python.
  • Researched polynomial and convex optimization.
  • Developed the topological moment problem using functional analysis and real algebraic geometry.
Technologies: Sage, Python, Mathematical Modeling


SKSurrogate is a suite of tools which implements surrogate optimization for expensive functions based on scikit-learn. The main purpose of SKSurrogate is to facilitate hyperparameter optimization for machine learning models and optimized pipeline design (AutoML).

The version of the surrogate optimization implemented here heavily relies on regressors. A custom regressor based on Hilbert Space techniques is implemented, but all scikit-learn regressors are accepted for optimization.

Finding an optimized pipeline—based on a given list of transformers and estimators—is a time-consuming task. A version of evolutionary optimization has been implemented to reduce its time in lieu of global optimality.

Irene Project
Irene is a Python package that aims to be a toolkit for global optimization problems that can be realized algebraically. It generalizes Lasserre's Relaxation method to handle theoretically any optimization problem with a bounded feasibility set. The method is based on solutions of generalized truncated moment problem over commutative real algebras.

Given inventory data of multiple (interacting) commodities from stock with limited but variable capacity, provide insight on:
1. Estimating future required capacity for each item based on a certain terminal segment of data,
2. Future cost estimation for each item,
3. How the trends of individual items would change, assuming a trend change at given times (in future) for some items?
4. Given a budget limit, how should the trends change to make sure a non-negative residual?

This package was originally written to solve systems of integro-differential equations via collocation method in an arbitrary number of variables. The current implementation of the method is based on a finite-dimensional orthogonal system of functions. Therefore additional modules were required to achieve this goal.

Nonlinear Regression
A small suite of tools to perform nonlinear regression, Scikit-learn style. It uses linear regression and data transformation to perform unweighted nonlinear regression and implements a version of function spaces as Hilbert spaces to do weighted nonlinear regression.



Python, SQL, PHP


Scikit-learn, Keras, Sage, OpenCV


LaTeX, PyCharm, Jupyter, SPSS, Git


Mathematics, Mathematical Modeling, Optimization, Machine Learning, Web Programming, Visualization, Data Visualization, Time Series Analysis, Bayesian Inference & Modeling, Statistics, Scheduling, Stochastic Modeling, Trend Analysis, Forecasting




Model View Controller (MVC)






2009 - 2012

Ph.D. in Mathematics

University of Saskatchewan - Saskatoon, Canada

2002 - 2004

Master of Science Degree in Mathematical Logic

Tarbiat Modares University - Tehran, Iran

1998 - 2002

Bachelor of Science Degree in Mathematics

Amirkabir University of Technology - Tehran, Iran