I have a problem where I would like to apply machine learning. For this purpose I have been learning about the topic and have come across supervised, unsupervised, semi-supervised machine learning techniques.

I know the problem that I want to solve, so unsupervised machine learning doesn't seem to be a fit, because from how I understood, it is used when we don't know what we are looking for.

But I don't have a pre-labelled data set either, because we ourselves don't know if we are operating at the optimum level.

Basically we want to optimize profit, and we have the option of tweaking certain parameters. As an example let's say we want to the ML Algorithm to find the price of a product that would optimize the profit.

What kind of ML can I apply here? Do you have any recommend frameworks? Any book that I can read to understand this (the books that I have referred to so far have all given examples of classification)?

Adding more context:- The actual problem is to balance a logistics network. There are multiple warehouses and delivery service providers(DSP) (DHL, GLS etc). We have some parameters that define to which warehouse/DSP we want to send the orders(to be packed and delivered). We want to find the optimum parameters that will yield profit. We have already processed data where we can train and validate the algorithm. But we don't know if the current parameters are correct, so I would assume that training the algorithm with the data that we have would not give us an optimum solution (because the labelled targets, i.e. the achieved profit might not be optimum)

With this specific algorithm we are trying to figure out the best warehouse/DSP combination for a given order. While we want to send a parcel to a cheapest warehouse/DSP option, it might be the case that the cheapest warehouse/DSP is out of capacity (limited by manpower at the warehouse or limited by the number of ordered trucks of a given DSP), in which case we might choose to send the order to a non cheapest warehouse, or to send the order the next day. With this solution we don't plan to optimize anything else (that is optimizing how stock is stored/storage costs etc.). The goal is to utilize the warehouse/truck capacity the best way we can. I don't need a full blown solution, but a few keywords/concepts/places to which I can refer would be enough.

PS:- Sorry for the half blown example in the original question. I just wanted to give a simple/similar example so that I can get some keywords, frameworks, books to further study.

  • $\begingroup$ I think you need to explain a bit more about your problem, it seems very generic and hard to tell what would be practical. First, are you able to simulate behaviour of the system, or relying on running your process for X amount of time in order to determine the profits? How long is X and how much data do you get? There is a big difference between tweaking a manufacturing process for physical goods, and trying out ideas with something virtual such as online advertising for instance. If your profit is based on click-throughs, then there are well-understood frameworks. $\endgroup$ – Neil Slater Jul 26 '18 at 11:13
  • $\begingroup$ @NeilSlater Added more context. $\endgroup$ – Can't Tell Jul 26 '18 at 12:23
  • $\begingroup$ Thanks. Not quite enough yet. Presumably you can model costs of storage and using the DSP services to make changes? So the unknowns are around how the stored stock will get used towards eventual sales? You want to hold minimal stock for just-in-time use, but you don't wish to run out causing additional expenses and delays? Can you model/predict profit purely from the location of stock at any one time, or does it depend on orders that you receive? How good are your algorithms for predicting orders? $\endgroup$ – Neil Slater Jul 26 '18 at 13:24
  • $\begingroup$ @NeilSlater added a new paragraph. I don't want a full solution. But some possible pointers would be nice. $\endgroup$ – Can't Tell Jul 26 '18 at 13:59
  • 1
    $\begingroup$ Thanks for the additional data. Unfortunately, finding "pointers" does not work the way you expect. Details of the nature of the problem, and what data you have to work with are critical to understanding even what kind of category your problem is in. For now, I cannot even see why this would need to be a machine learning issue. It looks like you can price and constrain your individual orders optimally by calculating all valid options and picking the best . . . it would only be infeasible if there are millions of combinations - even then A* search might be enough $\endgroup$ – Neil Slater Jul 26 '18 at 14:05

You have no existing data where the parameters you mentioned have been tweaked and you then have the resulting profits?

If you don't have any pre-labeled data then you will find it very difficult because the NN will have nothing to learn from. NNs learn from either the information you give; the inputs and corresponding outputs, or by experimenting with values and then using the result of using those outputs as labels / targets to learn from.

  • $\begingroup$ We do have the cases where we tweaked and have a result. But we don't know if the resulting profit is optimal. And since this data could be sub-optimal, I assumed we cannot use this data to train the ML? $\endgroup$ – Can't Tell Jul 26 '18 at 10:26
  • $\begingroup$ I see. You might be best investigating a genetic algorithm; each individual carries genes which represent your parameters, and their fitness score is the resulting profit margin. After a period of time the worst 50% performers 'die', and the top 50% carry over to the next generation, but then 'breed' with each other to replace the lost 50%. You can also add 'mutation' so some randomness is introduced to help escape local minima. Over time you'll find the combination of parameters that work best. $\endgroup$ – BigBadMe Jul 26 '18 at 10:35
  • $\begingroup$ @BigMeat: A GA might work nicely in simulation, but likely not practical for OP unless the company has money to burn on creating a population of varied parameters in order to try them out. I think it is safe to assume that actual sales of product are necessary here in a real market in order to get feedback (otherwise maximum profit is trivially solvable by setting a really high price). $\endgroup$ – Neil Slater Jul 26 '18 at 11:05
  • $\begingroup$ A similar problem to GA also applies to frameworks like RL or Contextual Bandits - in order to discover most promising profit-making approaches, experimentation (and thus lower profits from trial and error) is necessary. $\endgroup$ – Neil Slater Jul 26 '18 at 11:09
  • $\begingroup$ I was thinking they could seed the initial population with the parameters they already know (and don't produce bad profits), so it's not initially behaving in a completely random manner. My fault for not saying that in my reply. $\endgroup$ – BigBadMe Jul 26 '18 at 11:17

A common way to optmize functions is to use evolutionary algorithms (EA), such as a genetic algorithm, to simulate many individuals with different parameters, and evaluate their performance. The problem is that you must have a way to simulate the evaluation of the performance, which does not seems feasible in your case.

However, there are many techniques for selection which individuals should be simulated to perform the evaluation in order to minimize evaluations, such that it could be performed manually or through an expensive computational process.

In special, I refer to professor Y. Jin' works (Google Scholar profile). He wrote a survey on the topic in 2003, "A comprehensive survey of fitness approximation in evolutionary computation" (should be freely available), and more recently has been working on surrogate functions to aid the individual selection process.

You will also find mentions of Gaussian Processes (GP) in his work. I think figure 8 on the paper "A Multiobjective Evolutionary Algorithm using Gaussian Process based Inverse Modeling" (2015) gives a good visual representation. The main idea is to select individual using both the minimization of the approximation error and the maximization of the selected individual's fitness.

If you want to keep things simple, you could not use EAs at all and simply use a GP plus visual aid, since your problem is single-objective (optimizing profit and profit alone).


From your description this is a classic problem in OR (operations research). I don't think you even really need "machine learning" per se for this, just use a solver which will abstract all the details so you can concentrate on formulating your problem in terms of its constraints. A tool like PuLP is very easy to use, it comes with a free solver or you can plugin a commercial one such as Gurobi if your needs are particularly intense and beyond the free one.

If you prefer R there are many packages too.


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.