---
title: "Here’s Best Example of ML to Know Person’s Marital Status"
description: "How to develop a model in Machine learning explained with example."
url: https://srinimf.com/2019/12/28/ml-model-to-predict-a-person-is-married-or-not/
date: 2019-12-28
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2019/12/pexels-photo-457937.jpeg?fit=1880%2C932&ssl=1
categories: ["Machine Learning"]
tags: ["Building Model in ML", "Ideas Flowchart to Build ML model"]
type: post
lang: en
---

# Here’s Best Example of ML to Know Person’s Marital Status

In this post, I have shared a process to build a model using Machine Learning.

## Here are three layers of ML Model

1. Data
2. Modeling
3. Prediction

Every project you need flow. In this ML modelling, a hidden process involved.

![ML Modelling](https://i0.wp.com/srinimf.com/wp-content/uploads/2019/12/ml-modelling.jpg?resize=471%2C371&ssl=1)*Flowchart on ML model building*

I am explaining the steps involved in building the ML model. There is a total of three steps to developing a model.

**1). Historical Data**

The first thing is you need the right kind of data. The data can be your old data that acts as an input to a machine learning model.

| **S.No** | Name | Age | Income | **Target** |
| --- | --- | --- | --- | --- |
| 1 | Ramu | 23 | 50,000 | **Unmarried** |
| 2 | Krishna | 27 | 80,000 | **Married** |

**2). Model Building**

The concept of model building is [you need to](https://srinimf.com/2018/04/08/popular-influencers/) assign your data to your algorithm.

Data ==> Model

**3). Internal Mechanism of Algorithm**

```
data = load_data("data/people.csv")
model = build_model(data, target="Marital status")
new_data = load_data("data/new_people.csv")
predictions = model.predict(new_data)
```

**Model Evaluation**

```
data = load_data(...)
training_data, testing_data = split_data(data)
model = build_model(training_data, target="Marital status")
true_values = testing_data.extract_column("Marital status")
predictions = model.predict(testing_data)
accuracy = compare_predictions(predictions, true_values)
```

In the model evaluation, feed only some of your data to algorithm. The remaining data you can use it for evaluation/testing.

Feed input and get answers from the model, then compare these results to actual/true values. Then you will know how your model is working.

**Summary**

In the testing for the given input, it should tell about a person’s marital status. The accuracy of the model will be calculated based on right or wrong answers.

**Related Posts**

- [How to Understand Machine learning Model](https://srinimf.com/2020/10/04/ml-model-vs-mathematical-equation/)DateOctober 4, 2020
- [10 Machine Learning Terms Asked in Interviews](https://srinimf.com/2020/09/27/16-machine-learning-data-terminology/)DateSeptember 27, 2020
- [AI/ML Pipeline Architecture Explained with Real Business Case](https://srinimf.com/2025/07/27/ai-ml-pipeline-architecture-explained-with-real-business-case/)DateJuly 27, 2025

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2019%2F12%2F28%2Fml-model-to-predict-a-person-is-married-or-not%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2019%2F12%2Fpexels-photo-457937.jpeg%3Ffit%3D1200%252C595%26ssl%3D1&description=Here%27s%20Best%20Example%20of%20ML%20to%20Know%20Person%27s%20Marital%20Status)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2019/12/28/ml-model-to-predict-a-person-is-married-or-not/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2019/12/28/ml-model-to-predict-a-person-is-married-or-not/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2019/12/28/ml-model-to-predict-a-person-is-married-or-not/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2019/12/28/ml-model-to-predict-a-person-is-married-or-not/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20Here%27s%20Best%20Example%20of%20ML%20to%20Know%20Person%27s%20Marital%20Status&body=https%3A%2F%2Fsrinimf.com%2F2019%2F12%2F28%2Fml-model-to-predict-a-person-is-married-or-not%2F&share=email)
-

### Like this:

Like Loading…