The Foundation AI Team Helps the North Dakota Department of Corrections Predict Which Inmates Will Be Put in Restrictive Housing.


ABOUT North Dakota Department of Corrections AND FOUNDATION AI

North Dakota Department of Corrections provides prison services for the state of North Dakota. Their mission is to enhance public safety, to reduce the risk of future criminal behavior by holding adult and juvenile individuals accountable, and to provide opportunities for change. The department has been featured in podcasts and articles by NPR and Vox for their efforts to make their prison system more humane.

Foundation AI is a full-service AI development studio. We leverage our product development expertise, our team of data scientists and engineers, and our proprietary CogNative AI™ Platform to efficiently build and operationalize custom solutions to business challenges.


  • To predict, at the time of admission, the probability that an inmate would be put into administrative segregation (colloquially known as solitary confinement), so that the inmate could be targeted with positive interventions.


  • Data was sourced from 2 databases: Offender Behavior and Electronic Medical Records.

  • We performed data imputation on missing data points using Random Forest Imputation.

  • Our prediction solution used an ensemble of multiple models: XGBoost and Random Forest.


  • Using data from 4,638 inmates, we were able to predict whether an inmate would be put into administrative segregation with 91.3% accuracy.


Incarcerated individuals are placed in a strict rules-based environment often because of their reluctance to follow rules. Many inmates with mental illnesses are unable to follow rules. Administrative segregation (colloquially known as solitary confinement) is used in correctional facilities to isolate inmates who disrupt the operations of the institution or are at risk of harming other inmates or staff. These inmates are isolated from the general population and have restrictions placed on their movement, behavior, and privileges. The use of administrative segregation has grown rapidly in the last 20 years.

While administrative segregation does isolate individuals, reducing the risk of harm to other inmates and staff, it does not improve behavior. It is well documented that inmates’ behavior and mental health deteriorate when they are placed in restrictive housing. In recent years, the political and legal pressure to minimize restrictive housing has increased substantially. Corrections institutions must find alternative ways of dealing with disruptive inmates that equally protect staff and other inmates. The push to decrease restrictive housing use is largely an unfunded mandate.  


Administrative segregation is expensive. Correctional facilities that successfully implement programming changes that decrease the population and length of stay in restrictive housing see decreased costs and improved mental health in their populations. The Department of Corrections in North Dakota approached Foundation AI to implement a system that would, at the time of admission, identify inmates at high risk of administrative segregation. With this information, the department will be able to target high risk individuals with positive interventions, reducing the probability that they will need to be placed in restrictive housing.

Foundation AI’s objective was to build a model to predict the risk of administrative segregation (AS) at the time of imprisonment.


Data Used

Data from 2 different databases were gathered to predict the risk of AS:

  • Offender Behavior - Offender demographics, admissions, criminal history, incidents, living units, movements, offender programs, and reports.

  • Electronic Medical Records - Data from the EMR system was used to correlate the offender’s behavior with Serious Mental Illnesses (SMI).


The 2 database systems contained both structured and unstructured information. The data was gathered and feature engineered to predict the risk of AS. The extracted dataset was split into 3 groups containing 70%, 10% and 20% of the data. The groups were used for training, validation and testing respectively.

The parameters that were used included:

  1. Age at the time of admission

  2. Previous restrictive housing information

  3. Criminal history

  4. First arrest age

  5. Sentence duration

  6. Offence type

  7. Education

  8. Employment

  9. Serious mental illness

  10. Race

  11. Drug and alcohol history

  12. Drug crime count

  13. Violent offence count

  14. Custody rating

  15. Gang affiliation

The dataset was highly imbalanced with positive parameters comprising only 10% of the data points. SMOTE (Synthetic Minority Oversampling Technique) was used to counteract this imbalance. We performed data imputation on missing data points using techniques like KNN Imputation, Random Forest Imputation, and Median Value Imputation. Random Forest-based imputation outperformed the other techniques and was used in the final model. We performed data normalization on numerical features and One Hot encoding was performed on categorical features.

Multiple models were built to predict the risk of Administrative Segregation, including XGBoost, Random Forest, and Logistic Regression. XGBoost outperformed other models for most of the data points. For some scenarios, the Random Forest-based model outperformed the other models. As a result, we used an ensemble of multiple models for the final solution.


Our model was trained and validated on data from 4,638 inmates from a single correctional facility. Future work needs to be done to see how the model performs when put into production and if its findings can be generalized to other institutions.

Overall Results:

    • Accuracy: 91.3%

    • ROC AUC: 0.934

    • Sensitivity: 0.821

    • Specificity: 0.916

Test Results:

    • Accuracy: 90.9%

    • ROC AUC: 0.901

    • Sensitivity: 0.818

    • Specificity: 0.903


Feature Importance:

Feature Importance.png


Sample Correlation Plots: