PHPackages                             rubix/divorce - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rubix/divorce

ActiveProject[Utility &amp; Helpers](/categories/utility)

rubix/divorce
=============

Use the K Nearest Neighbors algorithm to predict the probability of a divorce.

v6(4y ago)1745411MITPHPPHP &gt;=7.4

Since Jun 18Pushed 2y ago2 watchersCompare

[ Source](https://github.com/RubixML/Divorce)[ Packagist](https://packagist.org/packages/rubix/divorce)[ Docs](https://github.com/RubixML/Divorce)[ RSS](/packages/rubix-divorce/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

Rubix ML - Divorce Predictor
============================

[](#rubix-ml---divorce-predictor)

Use the [K Nearest Neighbors](https://docs.rubixml.com/latest/classifiers/k-nearest-neighbors.html) algorithm to predict who of your friends will stay married or get a divorce based on their answers to a 54 question survey about their partner. Included in this project is a 171 sample human-annotated dataset that we'll use to train the learner.

- **Difficulty**: Easy
- **Training time**: Less than a minute

Installation
------------

[](#installation)

Clone the project locally using [Composer](https://getcomposer.org/):

```
$ composer create-project rubix/divorce
```

Requirements
------------

[](#requirements)

- [PHP](https://php.net) 7.4 or above

Tutorial
--------

[](#tutorial)

On the map ...

Original Dataset
----------------

[](#original-dataset)

- Dr. Mustafa Kemal Yöntem, Nevşehir Hacı Bektaş Veli University, Faculty of Education, Department of Educational Sciences, muskemtem '@' hotmail.com
- Dr. Kemal ADEM, Aksaray University, Faculty of Economics and Administrative Sciences, Department of Management Information Systems, kemaladem '@' gmail.com
- Prof. Dr. Tahsin İlhan, Tokat GAZİOSMANPAŞA University, Faculty of Education, Department of Educational Sciences, tahsinilhan73 '@' gmail.com
- Lecturer Serhat Kılıçarslan, Tokat GAZİOSMANPAŞA University, Rectorate, Department of Informatics, serhatklc '@' gmail.com

### References

[](#references)

> - M. K. Yöntem et al. (2019). Divorce Prediction Using Correlation Based Feature Selection and Artificial Neural Networks.
> - Dua, D. and Graff, C. (2019). UCI Machine Learning Repository \[\]. Irvine, CA: University of California, School of Information and Computer Science.
> - T. A. DeWees et al. (2020). Investigation Into the Effects of Using Normal Distribution Theory Methodology for Likert Scale Patient-Reported Outcome Data From Varying Underlying Distributions Including Floor/Ceiling Effect.

License
-------

[](#license)

The code is licensed [MIT](LICENSE) and the tutorial is licensed [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/).

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~133 days

Recently: every ~162 days

Total

6

Last Release

1539d ago

PHP version history (2 changes)v1PHP &gt;=7.2

v4PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/643b22cfe15a5f3ff42dc06ce98f1e5024b6e4578fc9627a058097f5046164d8?d=identicon)[andrewdalpino](/maintainers/andrewdalpino)

---

Top Contributors

[![andrewdalpino](https://avatars.githubusercontent.com/u/18690561?v=4)](https://github.com/andrewdalpino "andrewdalpino (23 commits)")

---

Tags

classificationcross-validationdata-sciencedivorcedivorce-predictionexample-projectk-nearest-neighborsknnmachine-learningmachine-learning-tutorialnearest-neighborsphpphp-machine-learningphp-mlpredictionrubix-mlphpclassificationmachine learningmltutorialdatasetdata scienceknncross validationk-nearest neighborsphp mlrubixmlrubix mlExample Projectdivorce prediction

### Embed Badge

![Health badge](/badges/rubix-divorce/health.svg)

```
[![Health](https://phpackages.com/badges/rubix-divorce/health.svg)](https://phpackages.com/packages/rubix-divorce)
```

###  Alternatives

[rubix/ml

A high-level machine learning and deep learning library for the PHP language.

2.2k1.5M28](/packages/rubix-ml)[rubix/server

Deploy your Rubix ML models to production with scalable stand-alone inference servers.

642.3k](/packages/rubix-server)[codewithkyrian/transformers

State-of-the-art Machine Learning for PHP. Run Transformers in PHP

758267.3k9](/packages/codewithkyrian-transformers)[niiknow/bayes

a machine learning lib

7056.3k](/packages/niiknow-bayes)[denissimon/prediction-builder

A library for machine learning that builds predictions using a linear regression.

1156.7k](/packages/denissimon-prediction-builder)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
