---
# System prepended metadata

title: Match making

---

Match making 
===


# Evaluation cluster K-mean, Kmode, K-prototypes.
## K-mean
clustering only useful for  numberic and continuous data. Whereas we have mostly categorical dataset so, It will not useful for us. 

## Kmode
Kmode clustering only useful for only categorial datset(Discrete) but we have mixed type data continuous (height, weight) and discrete(education, martial status). 


## K-prototypes
K-prototypes clustering is useful for both mixed categorial and discrete dataset. Since we have mixed type dataset it could be useful for us. 

By doing some experiments on K-protoypes, it seems will not address our requirements. 

## Requriment 
**Prirorty wise attribute filter**
There will be  priority wise matachmaking.

* Q. what is the best way to do match making. 
  * ~~preference to preference.~~
  * preferene to profile. 


**Hard Preference Priority & Features List**
    • Marital Status
    • Age Range
    • Religion
    • Education
    • Smoking
    • Drinking
    • Eating

**Soft Preference Priority & Features List**
    • Physical Status
    • Occupation
    • Education (Specific Subject)
    • Complexion
    • Body Type
    • Height 
    • Weight
    • Living with Family


# Hard Preference


**1. Marital Status**

* As an `UNMARRIED USER`, I prefer ***strictly*** to get match only with the `UNMARRIED USER` of the platform.
    * As an `UNMARRIED USER`, I am not interested in `WIDOW_WIDOWER/DIVORCED/SEPARATED USER` of the platform.
    * As a `UNMARRIED USER`, I get an option to select strickly `UNMARRIED`.
    * As a `UNMARRIED USER`, I also get an option to select between `UNMARRIED` and `DOESN'T MATTER`.

* As a `DIVORCED USER`, I am ***okay*** to get matched with the `UNMARRIED/WIDOW_WIDOWER/SEPARATED USER` of the platform.
    * As a `DIVORCED USER`, I get an option to select between `UNMARRIED` and `DOESN'T MATTER`.

* As a `WIDOW_WIDOWER USER`, I am ***okay*** to get matched with the `UNMARRIED/DIVORCED/SEPARATED USER` of the platform.
    * As a `WIDOW_WIDOWER USER`, I get an option to select between `UNMARRIED` and `DOESN'T MATTER`.

* As a `SEPARATED USER`, I am ***okay*** to get matched with the `UNMARRIED/DIVORCED/WIDOW_WIDOWER USER` of the platform.
    * As a `SEPARATED USER`, I get an option to select between `UNMARRIED` and `DOESN'T MATTER`.

> **IN THE CASE OF STRICTLY**
* If `UNMARRIED USER A` select strictly, he/she will be matched only with the `UNMARRIED USER` of the platform.
    * **No match found message** will be displayed if there is no matching user profile.
    * A user receives the option to **customize/modify** the preference..
* If `UNMARRIED USER A` select `DOESN'T MATTER`, he/she will be matched with the `WIDOW_WIDOWER/DIVORCED/SEPARATED USER` of the platform.
> **IN THE CASE OF OKAY**
* If `DIVORCED USER A` select `DOESN'T MATTER`, he/she will be matched randomly with `USER` based on their matching in other's preference.
* If `WIDOW_WIDOWER USER A` select `DOESN'T MATTER`, he/she will be matched randomly with `USER` based on their matching in other's preference.
* If `SEPARATED USER A` select `DOESN'T MATTER`, he/she will be matched randomly with `USER` based on their matching in other's preference.

**2. Age**

* If a `user` has age preference like searching for partner in the age range of 20 to 25. So List down all the `users` having the age in the range of the user’s preference.
    
* If there is no any profile for the user desired age range then display all the profiles having nearby age range values. For example, if the user is looking for the age range between 35 to 40 and if there is no any profile matching the age range then display all the profiles having the age range minimum than the age 35.

* There is no problem if the searching range for the age is lowered or exceeded a little bit. For example, if the age range by the user is 25-30 then there is no any problem on displaying profiles having the age a little less than 25 and a little more than 30. This case is used if there are a very few profiles in the desired age range and after listing the desired age range profile list down other age range profiles.

**3. Religion**

// Add an option called 'No religion' //

   * If `User A` is `Chritstain` then, he/she is only intrested on `chritstain` peoeple. 
    * Q. (what if the `User B` is christain but have preference to marry `Hindu`??) 


*  If a user ‘A’ has the preference of religion ‘Hindu’, then in most of the cases the user wanted the partner having the Hindu religion.
* If there are no any matching profiles for the user having the Hindu religion then it would be hard for the user to select the people from other religion. 
* Same goes for all other religions. The person having a religion must needs the partner from the same religion and people from other religions are discarded in almost all the cases.
* A user looking for the partner having the Hindu religion will not pick a person having Muslim religion despite matching all the other preferences other than religion.
* If a person selects the option ‘doesn’t matter’ in the religion section then list all the users having any religion and matching all other preferences.



**4. Education**

* The degree level of education is like SLC, +2, Bachelors, Masters, Ph. D., etc. The subject of each degree category is in the soft preference.


* If a user’s preference is Bachelor’s then check all other preferences along with the education preference and order the results from the highest rank of the degree. For example, for this user order profiles from the highest rank Ph.D. then masters then Bachelors then +2. If no highest order degrees then according to other preferences sort out the profiles according to the highest education degree to the lowest.


**5. Smoking **

* If the user preference is smoking never then strictly show the profiles having the never value on smoking. If other preferences are matched then discard the profile having the smoking value other than never.
* If the preference is don’t matter then first show the list of ‘never’ then ‘socially’ then ‘regularly’.
    


**6. Drinking **

* The available options on the ‘Drinking’ feature is Never, Regularly and Socially.
* If a user has the preference of ‘Never’ then don’t show the profiles having the value other than ‘Never’ on the drinking column. After showing all the profiles with the ‘Never’ value we can show the profiles having the ‘Socially’ value but don’t show the profiles with the ‘Regularly’ value.
* If the preference is ‘Socially’, then show profiles having ‘Socially’ value first then ‘Never’ value second and ‘Regular’ value on the last.


**7. Eating **

* Incase of having preference ‘VEGETARIAN’ or ‘VEGAN’, show all the profiles containing ‘Vegetarian’ or ‘Vegan’ as the eating habits value. Don’t show the non-vegetarian profiles.
* If the preference is non-vegetarian then only show the values having the non-vegetarian profiles and after that show also vegetarian profiles.
* If the preference is don’t matter then show profiles of non-vegetarians first then show the profiles of vegetarians.


# Soft Prefence

After fetching data using the hard preferences sort the data using the soft preferences. The order of the preferences for sorting can be,
    
    *     Occupation
    *     Education (Specific Subject)
    *     Physical Status
    *     Complexion
    *     Body Type
    *     Height
    *     Weight
    *     Living with Family



---
# Note
User must fill up the values in Hard Preferences fields. So the hard preferences are mandatory fields.

User can skip the Soft Preferences fields. So the soft preferencs fields are non-mandatory fields while filling up the preference form.

---










## Conditional Approach

# Match making Flow chart

```flow
st=>start: Start
e=>end: End
op=>operation: filter martial status
cond=>condition: if empty
op2=>operation: filter realigion
cond=>condition: Yes or No?

st->op->op2->cond
cond(yes)->e
cond(no)->op2
```


# Psedocode

Hard Preferences: H1, H2, H3, H4, H5, H6, H7
Soft Preferences: S1, S2, S3, S4, S5, S6, S7, S8


```
if H1 & H2 & H3 & H4 & H5 & H6 & H7{
    fetch_profiles;
    
    if count(fetch_profiles)>100{
        return fetch_profiles;
    }
    
    else {
        if H1 & H2 & H3 & H4 & H5 & H6{
            new_fetch_profiles;
            fetch_profiles = fetch_profiles + new_fetch_profiles;
            
            if count(fetch_profiles)>100{
                return fetch_profiles;
            }
            else{
                if H1 & H2 & H3 & H4 & H5{
                    new_fetch_profiles;
                    fetch_profiles = fetch_profiles + new_fetch_profiles;
            
                if count(fetch_profiles)>100{
                    return fetch_profiles;
                }
                else{

            }
        }
    }
}
```


H1 = Marital Status
H2 = Religion
H3 = Age Range
H4 = Education (Degree level)
H5 = Smoking
H6 = Drinking
H7 = Eating

```
Condition1 = H1 & H2 & H3 & H4 & H5 & H6 & H7;
Condition2 = H1 & H2 & H3 & H4 & H5 & H6;
Condition3 = H1 & H2 & H3 & H4 & H5;
Condition4 = H1 & H2 & H3 & H4;
Condition5 = H1 & H2 & H3;
Condition6 = H1 & H2;

Perform Condition1:
if profiles>200;
    return profiles;
else
    perform condition2 and condition3
    profiles = new_profiles + profiles

```









