Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Win or Loss Prediction
#1
I am trying to predict win or loss in ML using Python. Tried XGboost,Logistic and SVC method but getting struct in place where it says " estimators failed to fit".
Need help on this prediction.

I have given a sample data.. The first 6 Id have result known as either won or loss .. how can predict 7,8 and 9 on the sample data either won or loss and also any possibility to get the % of win or loss. we have Id, pl as place and tr as another categorical variable and based o n all the variable how can we predict Dealst....

your help would be greatly appreciated.

Id Pl tr days1 days2 days3 totaldays Dealst
1 ab bc2 25 30 48 103 won
2 ab1 bc3 26 30 148 203 won
3 ab3 bc4 26 30 148 203 Loss
4 ab4 bc5 26 30 148 203 won
5 ab5 bc6 26 30 148 203 Loss
6 ab6 bc7 26 30 148 203 won
7 ab7 bc8 26 30 148 203 Open
8 ab8 bc9 26 30 148 203 Open
9 ab9 bc1 26 30 148 203 Open
Reply
#2
Can you provide an example of what you tried?
Reply
#3
(Apr-24-2024, 07:58 PM)deanhystad Wrote: Can you provide an example of what you tried?

Yes I have attached a sample data.. need to predict the Dealstate whether Won or Lost for the open state

Attached Files

.xlsx   WL-Prediction.xlsx (Size: 9.41 KB / Downloads: 12)
Reply
#4
I believe deanhystad meant, "Why not post some Python code that you have tried?"

Just looking at the XL you posted, it is not clear to my befuddled brain how you arrive at "won" or "loss". (Maybe "gain" or "loss" might be better.)

Could you please explain how you decide upon "gain" or "loss"?
Reply
#5
I used the below sample code (given only some part). Imported the data from excel and dropped few cols, just had the data as per attached file. Created train and test data and tried out Logistic, SVC and XGB method.. but am not sure how to arrive at a position in which I could see the list of IDs I have given is either Won or loss with percentage.

import xgboost as xgb
from sklearn.linear_model import LogisticRegression
from sklearn.svm import SVC
from IPython.display import display
......formatting and train,test code
finally

clf.fit(X_test,Y_test)
clf.predict(X_test)

I want to know in Python the process to do won Loss analysis with the uotput saying the opportunities can either be won or loss and also percentage included in it.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  hyperparameters do not make a difference in prediction jenya56 0 988 Sep-15-2021, 12:53 PM
Last Post: jenya56
  Free space loss 3D Plot scimi 1 1,783 Sep-25-2020, 01:37 PM
Last Post: scimi
  Tableau Time Series Prediction using Python Integration tobimarsh43 0 1,929 Jul-24-2020, 10:38 AM
Last Post: tobimarsh43
  Correlation & Prediction - Help Danijel 2 2,846 Jul-12-2018, 11:08 PM
Last Post: Danijel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020