Skip to main content
added 534 characters in body
Source Link

StatsSorceress has rightly indicated using logistic regression. This is almost a text book use case of the method. If you are also looking for sample code then u could look up this example (it uses ML.NET) https://medium.com/machinelearningadvantage/use-c-and-ml-net-machine-learning-to-predict-taxi-fares-in-new-york-519546f52591

A few differences for you would be that your "label" or the value that you are trying to predict might need to be calculated. For e.g. in the blog above the user has a ready made label , taxi fares , that she wanted to predict. In your case you are looking at a % value for whether the shift will be filled or not. Hence you will have to add an additional column called "%filled_or_something" which can be calculated by a simple SQL query grouping together your input features (day, month, hours, start time, end time, wages etc). So for e.g if you have 20 records for "Sunday / March / 6 (hours) / 23:00 / 06:00 / $13 (per hour)" and it was filled for all those 20 days then the column would read 100% BUT if it was filled only for 10 out of those 20 records it would read 50%.

Of course, this would also beg the question, that if all you need to do is the above , then given that all the features are finite why couldn't we simply just group all the unique combination and find the % and just use this value itself ? The answer , according to me, is that LR also indicates how important every feature is, so for e.g. if you were to introduce new days / new shift timings / more number of hours, the LR model should be able to predict even those since it understand the weights associated with every feature.

This should enable you to finally use a logistic regression model as explained in the blog above. Hope this helps in someway :)

StatsSorceress has rightly indicated using logistic regression. This is almost a text book use case of the method. If you are also looking for sample code then u could look up this example (it uses ML.NET) https://medium.com/machinelearningadvantage/use-c-and-ml-net-machine-learning-to-predict-taxi-fares-in-new-york-519546f52591

A few differences for you would be that your "label" or the value that you are trying to predict might need to be calculated. For e.g. in the blog above the user has a ready made label , taxi fares , that she wanted to predict. In your case you are looking at a % value for whether the shift will be filled or not. Hence you will have to add an additional column called "%filled_or_something" which can be calculated by a simple SQL query grouping together your input features (day, month, hours, start time, end time, wages etc). So for e.g if you have 20 records for "Sunday / March / 6 (hours) / 23:00 / 06:00 / $13 (per hour)" and it was filled for all those 20 days then the column would read 100% BUT if it was filled only for 10 out of those 20 records it would read 50%.

This should enable you to finally use a logistic regression model as explained in the blog above. Hope this helps in someway :)

StatsSorceress has rightly indicated using logistic regression. This is almost a text book use case of the method. If you are also looking for sample code then u could look up this example (it uses ML.NET) https://medium.com/machinelearningadvantage/use-c-and-ml-net-machine-learning-to-predict-taxi-fares-in-new-york-519546f52591

A few differences for you would be that your "label" or the value that you are trying to predict might need to be calculated. For e.g. in the blog above the user has a ready made label , taxi fares , that she wanted to predict. In your case you are looking at a % value for whether the shift will be filled or not. Hence you will have to add an additional column called "%filled_or_something" which can be calculated by a simple SQL query grouping together your input features (day, month, hours, start time, end time, wages etc). So for e.g if you have 20 records for "Sunday / March / 6 (hours) / 23:00 / 06:00 / $13 (per hour)" and it was filled for all those 20 days then the column would read 100% BUT if it was filled only for 10 out of those 20 records it would read 50%.

Of course, this would also beg the question, that if all you need to do is the above , then given that all the features are finite why couldn't we simply just group all the unique combination and find the % and just use this value itself ? The answer , according to me, is that LR also indicates how important every feature is, so for e.g. if you were to introduce new days / new shift timings / more number of hours, the LR model should be able to predict even those since it understand the weights associated with every feature.

This should enable you to finally use a logistic regression model as explained in the blog above. Hope this helps in someway :)

Source Link

StatsSorceress has rightly indicated using logistic regression. This is almost a text book use case of the method. If you are also looking for sample code then u could look up this example (it uses ML.NET) https://medium.com/machinelearningadvantage/use-c-and-ml-net-machine-learning-to-predict-taxi-fares-in-new-york-519546f52591

A few differences for you would be that your "label" or the value that you are trying to predict might need to be calculated. For e.g. in the blog above the user has a ready made label , taxi fares , that she wanted to predict. In your case you are looking at a % value for whether the shift will be filled or not. Hence you will have to add an additional column called "%filled_or_something" which can be calculated by a simple SQL query grouping together your input features (day, month, hours, start time, end time, wages etc). So for e.g if you have 20 records for "Sunday / March / 6 (hours) / 23:00 / 06:00 / $13 (per hour)" and it was filled for all those 20 days then the column would read 100% BUT if it was filled only for 10 out of those 20 records it would read 50%.

This should enable you to finally use a logistic regression model as explained in the blog above. Hope this helps in someway :)