Data Behind Solving Hairfall Mystery
Tags: datascience, programming, watercooler
Published: 2023-10-06 06:37:27

One twist in the product and this website can improve their sales, all by using Data Science and AI.

## Under the Hood
Well, let’s put a real-world example over here. I want to explain how data science can be used to increase revenue or directly impact business.

I want to take the Traya health product over here it’s an interesting case to understand how data science can be used.

What is Traya Health as a Product?
Basic introduction:
1. Traya is a healthcare company in simple words.
2. Traya gives hair treatment by understanding the user's lifestyle and biological body.
3. Treatment includes mixer or advanced medical science and Ayurveda.
[Traya Health](https://traya.health/?source=post_page-----c9d00f842509--------------------------------)


## Traya Treatment

- Traya provides treatment via their website
- Traya onboards user via their website
- Traya ask user details such as lifestyle habits, eating habits, age, gender and other biological details(if required)
Any user can try traya treatment online on their website
This is simple to understand, traya collects a lot of data from the user and then suggests the treatment along with the particular problem the following user is facing.

For example, below is the traya website landing page or homepage.


![Traya Landing Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p06zmopdlnl7ml0ysuwz.jpeg)

Now you can see the Take the Hair test button and since it’s on the home page I am assuming a lot of users will directly click on this button.

What happens post that is Traya opens a new webpage that collects user data such as

- Lifestyle
- Eating habits
- Biological problems or diseases users have
- User age, sex, height weight etc.
I am adding images to understand how much data is collected on the website, please understand I am completely okay with the traya about collecting this much amount of data because I understand that it will help them to understand and recommend perfect treatment according to my body.


![How well I sleep?,it’s a interesting thing to ask, because I read that sleeping habits affect stress and stress leads to hairfall.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dtjovybgy6qph9xz65rw.jpeg)


![Dandruff are again the major reason for hairfall, of course because external dirt can only harm what else we should expect from it.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rjxpzyjbft4qn22r225f.jpeg)


![They even ask for scalp image and I hope Traya actually did image recognition before suggesting treatment and the hairfall stage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8etugey51bmn4ibmylvk.jpeg)


## Treatment
The next question is very obvious

What’s in the treatment or output traya provides to the user?

Traya first gives the user the hairfall stage (1–6 stages)
Followed by a treatment plan including shampoos, serums and some vitamins.


![Hairfall stage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/alv6qkv1u1tk8t7a29qf.jpeg)

![Customised treatment plan](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8iyelorfdpestuxtf76b.jpeg)

## Data Schema
Now we will begin our data science.

What data types are we collecting?

```
const userHairSchema = {
 age,
 gender,
 dandruff,
 weight,
 height,
 vitaminDeficiency, // user vitamins deficiency status 
 scalpImage, // user scalp image
 stressLevel, //user stress level
 ...
}
```
This is just a data but wait till the end to understand how we will this small things matters in the real-world product.

Finally traya suggest the treatment with the hairfall stage and treatment plan.

So data schema of the output will be something like the below one

```
const userTreatmentAndHairfallStage = {
  hairfallStage: 1 // user hair fall stage,
  treatment: {
     shampoo,
     serum,
     vitamins
   }
}
```

## Data Science
What exactly data science will do here?

First, we need to understand what exactly data scientists should do for us.

This is called objective evaluation, in our case the objective is to increase the number of sales, right?

More sales will give more product reviews and better the product can be made so we want to test out the product to a large set of users to accumulate more data and get better at providing the best treatments.

```
More data = More Treatments sales = More product testing 
Managing Retention or Bounce rate
```
The first thing every data science developer will do is purify the data.

- Removing unwanted key-value pairs
- Data formatting
- Data mapping
That is not important for the time being because our objective is to give better results by increasing sales.

User Retention means, how many users are coming back to your website.

Bounce rate means, how many users are leaving your website.

To increase the traya treatment sales, we have to pinpoint one major problem which is to decrease the bounce rate and increase the retention, right?

How this is possible, well, let’s just jot down the factors for the same.

Factors affecting user retention and bounce rates

- If product treatments are absolutely correct or near to correct, more people will buy the treatment and trust traya.
- If traya treatments are not too costly but instead average in pricing as compared to competitors more people can afford
- If the hairfall stage given is more accurate more people can trust the diagnosis process.
People will not buy the treatment for the following reasons

- If it’s too costly or more price than the competitor or if affordability
- If the hairfall stage is not accurate
Let’s use some data science to solve this problem.

## Data in Improving Hairfall Stage Suggestion
Since we have the user data and scalp image to grab the user hair line.

We can use AI image recognition and advanced medical tools to know if the user has the following problems

- Hairfall has just started
- Moderate hairfall
- Thin hair
- Very thin hair
Most of the hair has fall
Using the above categories we will be helpful to not only give user hairfall stages but to suggest what exact problem.

## User Hairfall Trajectory
It’s just an idea or a suggestion.

Traya should do data analysis using multiple scalp images of the user to lay down the user hairfall trajectory.

## Why hairfall trajectory?
Because we can help users to actually know the in-between stages of hairfall, giving more accurate hairfall stages.

For example, a user on stage 1 won’t take the treatment because it’s just the starting stage and we are humans who prefer cure before prevention.

So stage 2 and above will compel users to try the treatment, right?

Now hairfall trajectory using scalp images will give a more accurate graph of the user hairfall helping users to understand the root cause of the hairfall.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t5vb824h79gf39dpjm1l.jpeg)

Multiple stages won’t help users much instead we want more in-between stages more accurate semi-stage about my hairfall condition.

Meaning, if I traya is somehow able to suggest the middle stage between stage 1 and stage 2, including other hair problems such as thin hair strands it would be much comprehending for the user to finalise the treatment he/she wants to grab on the traya website.

In this way, by simply analysing the user hair data we can simply provide more accurate results increasing trust and hence increasing retention.

By small twisting, the output response to the user about the hairfall stage traya can decrease the bounce rates.

More sales more price adjustments
It’s a myth that more sales less price.

No, traya still needs to maintain the demand in the market and run the company to handle business and employees.

For that pricing model has to be adjusted according to the following factors

- Market demands
- Product cost
- Distribution cost
- Taxes etc
AI Comes to the Rescue
We are in the AI revolution stage, so why not introduce AI in the hairfall treatment?

For projecting user hairfall trajectory for let’s say about 3 months, we need to do a lot of image recognition.

Using AI we can get better results in less time improving product sales.

We still need a lot of images from the user collection to actually do image recognition and map user hairfall trajectory accurately and that will be the task.

We can use its already trained hairfall trajectory models suggesting a better hairfall stage to the user.

Simply twisting the output using data we can get more accurate results about user hairfall problems thereby enabling us the ultimate tool in solving hairfall problems.

## Conclusion
Traya Health provides hairfall treatment along with hairfall stage details.

Traya takes user biological data such as age, gender, height and weight to suggest the treatment accordingly.

Traya analysed the user-collected data to provide the user's current hairfall stage among the 6 stages.

Traya can provide a hairfall trajectory using data analysis under the hood to increase product sales or so-called retention.

Traya can use data analysis, precisely AI image recognition to suggest in-between hairfall stages to the user to gain trust in the user's eye.

AI can be incorporated to help in image recognition providing better hairfall trajectory and in-between stages.

This is again an abstract idea of implementing data analysis to improve product sales.

I hope you like the idea. If you want to get similar articles, subscribe to my newsletter below I will directly email you such kinds of stories.

Until next time, have a good day.
Shrey
[iHateReading](ihatereading.in)