-1
$\begingroup$

I'm working with government infrastructure public tenders data and want to build a predictive model. I'm want to train a model to predict if a company will or will not participate in a public tender. I have the companies list with several attributes associated to them; company location, avg. historical bid amount, core business, etc. and also the bids they have participated in the past.

Now the problem is, that even though I want my output labels to be binary (1=will participate, 0=will not participate), each tender also has associated attributes to it, like govt department of the tender (healthcare, highways etc.), $ amount of the tender, etc.

I want to be able to predict if a company with attributes A,B,C will participate in a tender with attributes X,Y,Z. How would you build this model and which algorithms you think are best?

$\endgroup$
0
$\begingroup$

The first step you need to produce the input data. I suggest use python pandas library and then you need to label your data. It's mean you need to assign class (Whether the company participated or not) to your data.

Next, I would suggest to use some of the sklearn models. As a baseline you could try kNN and then Gradient Boosted Classifier.

Does the model need to be understandable by someone (your supervisor or Prime Minister)? In this case I suggest to use DecisionTrees (easy to interpret).

I have no idea how hard your problem is. You didn't show us the distributions of the input features grouped by type.

$\endgroup$
  • $\begingroup$ Thanks a bunch user1977600! Yes, I'm using pandas and scikit learn. However, with logistic regressions I don't think I could do it. I'm just confused on how to approach this as I always have a binary label to predict (will/will not participate), and now it's more like, given the attributes of this new public tender (location, amount, gov department), which will be the most likely companies to participate, given their attributes (location, past bids, etc.) $\endgroup$ – castor Sep 29 '16 at 16:52
0
$\begingroup$

This is quite old, but I'll try to explain.

You need labelled data if you wish to attempt supervised learning. Assemble a list row with key-value pairs that denote 'events' relevant to your problem:

row {
        company:<some name>, 
        company_attribute_A:<some value>, 
        company_attribute_B:<some value>, 
        company_attribute_C:<some value>, ...,
        tender_attribute_A:<some value>, 
        tender_attribute_B:<some value>, 
        tender_attribute_C:<some value>, ...,
        company_participation:<0|1>
    }

You wish to find out whether company X with attributes A,B,C will participate in a tender with its own attributes, so the training data is used to model the tender behaviour of a certain company by statistically analysing its history.

Historical might only include 'positive' values: events that did happen. An idea might be to artificially add some events that do exist but in which the company did not participate, so as to include 'negative' values as well. For a company Y, you could do it like this:

  1. Take a historical event that DID happen for company X
  2. Check if company Y also participated in this event
  3. If so: ignore this case (it's also positive for company Y). If not: Add this same row to the list of data but add company Y's attributes to it and change the class value (the binary participation value) to 0.

Try to mimic the actual distribution when adding negative data. Historically speaking, how likely are companies to participate? 50/50? 10/90?

When you have this data set, you can divide it into training data (80%?), development data (10%?) and test data (10%?).

  1. Train your model on the training data.
  2. Move your test data somewhere where you can't touch it.
  3. Experiment and improve your model by testing it on the development data.
  4. Finally, when you're happy with the results or when you have to publish the findings of your model, test it on the withheld set of test data.

Honestly, the selection of models and algorithms is secondary. The most important aspect of your problem is the set of attributes (features) you choose to collect. This is the most human part of data modelling / machine learning, because this is where you decide what you want to teach the machine. How you want to teach it (what algorithm or model you'll use) is also important, but not as important as the content. Try using simple models such as kNN, Bayesian flavours or Logistic Regression. This gives you a good overview of how well chosen your attributes are.

In your case, I would investigate models that output probabilities. You mentioned SciKit. Check out this overview to see which classifiers support probability scores.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.