I am a researcher at the University of Oslo, specializing in artificial intelligence applications for mental health, particularly, adolescent suicide attempts and violent extremism. My focus is on developing machine learning algorithms tailored to predict rare outcomes, i.e., modeling outcomes under severe class imbalance. My research extends to enhancing machine learning transparency, particularly in conceptualizing and stabilizing feature importance. Additionally, I am also interested in advancing statistical methods in missing data imputation and to this end, I have developed a machine learning imputation algorithm for single and multiple imputation that outperforms common statistical procedures.

I use GitHub mostly for software development in R, Stata, and Python. Below is a list of free software I’ve developed. Almost all of my Python packages are developedd for the industry and thus are not publically available. Feel free to contact me for feedback or ideas regarding my algorithms and packages. For updates on my software, follow me on Twitter: @haghish.

R packages

I have written multiple R packages for artificial intelligence as well as general statistical use. My recent software particularly focuse on machine learning, for example, missing data imputation with machine learning, developing automated stacked ensemble machine learning models for classification under severe class imbalance, toolkits for comparing different properties of machine learning models, as well as innovative procedures for assessing model transparency and classification fairness.

Name Description
shapley Weighted Mean Shapley Values with Confidence Intervals for Machine Learning Grids and Stacked Ensembles
mlim Single and Multiple imputation with automated machine learning
autoEnsemble An AutoML Algorithm for Building Homogeneous or Heterogeneous Stacked Ensemble Models by Searching for Diverse Base-Learners
fair Machine Learning Fairness Evaluation and Classification Parity Testing
adjROC ROC Curve Evaluation at a Given Threshold
h2otools Machine Learning Model Evaluation for ‘h2o’ Package
DOT An R Package that Renders and Exports Graphviz DOT diagrams in SVG and PNG format
convertGraph An R package for converting graphical files to one another
md.log A Markdown log system with function call

Stata packages

Name Description
rcall Seamless interactive R in Stata. rcall allows communicating data sets, matrices, variables, and scalars between Stata and R conveniently
markdoc A literate programming package for Stata which develops dynamic documents, slides, and help files in various formats
github a module for building, searching, installing, managing, and mining Stata packages from GitHub
machinelearning A Stata module for machine learning algorithms, implemented within R using rcall package
diagram diagram : Graphviz and DOT Path Diagrams in Stata
weaver A Stata Log System in HTML or LaTeX for Dynamic Document and literate programming in Stata
neat A Stata layout module for creating geometric shapes out of replicated observations in Stata scatter plots
statax JavaScript and LaTeX Syntax Highlighter for Stata
md2smcl A Stata module that converts Markdown to SMCL language
colorcode A Stata module to return RGB, CMYK, and HSV values for Stata colors

Python packages

Name Description
chase evolutionary psychology experiment designed in a 2D video game form