Warm start a conditional contextual bandit (Vowpal Wabbit) - vowpalwabbit

I am currently building a contextual bandit.
Since I neet to get the top 4 actions I am using the conditional contextual bandit in the Vowpal Wabbit framework.
I like to warm start my model but as far as I understand the framework, this is only possible with the classic contextual bandit.
Is there a way to warm start the ccb_explore_adf model for online learning?
What are the necessary commands and how does the dataformat for the training look like?
As I understand the ccb model that should also be (somehow) possible, since it is based on the cb model.

Related

In Google Cloud Platform «Start training» is disable

I am training a model in GCP's AutoML Natural Language Entity extraction.
I have 50+ annotations for each label but still cant start training a model.
Take a look at a screenshot of the
train section. The Start training button remains grey and cannot be selected.
Looking at the screenshot it seems as if you may be talking about training an AutoML Entity Extraction model. Then, this issue seems the same as in Unable to start training my GCP AutoML Entity Extraction model on Web UI
There are thus a couple of reasons that may result in this behavior:
Your dataset are located in a specific region (e.g. "EU") and you need to specify the proper endpoint, as shown in the official documentation.
You might need to increase the number of "Training items per label" to 100 at minimum (see Natural Language limits).
From the aforementioned post, the solution seems to be the first one.

Is it possible to train directly on actual data?

For example, if I want to develop a chitchat bot, and I already have a corpus with dialog like the following:
-- Are you a student?
-- No, I am a scientist.
...
Can I train a model directly on this data without going through the regular NLU and Core processes, such as create the NLU data and stories data? In chitchat, it's hard to define the intent, if my corpus is a little large. There can be potentially too many intents. So it seems not to be good to use intent-slot-dm flow to develop the model?
Does RASA provide a way to directly train on the data?
This is currently not possible with the Rasa Stack.
If you model goal oriented use cases, this should be not a big problem. However, for chitchat this can indeed be a bit tricky. Try to see whether you can break down the most frequent chitchat messages in intents, and then handle them in stories.

Is there a way to do collaborative learning with h2o.ai (flow)?

Relatively new to ML and h2o. Is there a way to do collaborative learning/training with h2o? Would prefer a way that uses the flow UI, else woud be using python.
My use case is that there would be new feature samples x=[a, b, c, d] periodically coming into a system where an h2o algorithm (say, running from a java program using a MOJO) assigns a binary class that users should be able to manually reclassify as either good(0) or bad(1), at which point these samples (with their newly assigned responses) get sent back to theh h2o algorithm to be used to further train it.
Thanks
FLOW UI is great for prototyping something very quick with H2O without writing a single like of code. You can ingest the data, build desired model and the evaluate the results. Unfortunately FLOW UI is can not be extended for the reason you asked, and FLOW is limited for that reason.
For collaborative learning you can write your whole application directly in python or R and it will work as expected.

How do you typically make your CPLEX Studio models more user friendly?

Non-optimization question about CPLEX Studio....
So you make your awesome OPL model in CPLEX Studio and it brilliantly solves your amazeballs problem.
Suppose you wanted to allow other users to access this model in a nice user friendly way: Basically, specify some simple parameters in a simple user interface (without having to edit code etc), then, output the solution in some arbitrary way you coded up like an Excel file, HTML report, or whatever.
1) What are the options for a user interface, without adding in too much other technology?
(eg. I currently have a Java program doing exactly this, but I'd rather not rely on Java code / programmers / compiling / hosting source code etc)
2) What are the options for triggering some user friendly output, eg. in a standard format like Excel, some HTML report you coded up, or maybe just triggering a Python script, etc?
(eg. I currently render them in a Java FX application on grids, charts and HTML windows, I would prefer something more lightweight and accessible, like Python etc, HTML5 output)
3) In industry, what is the typical role of CPLEX in a production environment: Is it just called by an external application (Java/.NET etc), or is CPLEX Studio used more actively?
Embed the optimisation model in wider business applications using Java, C#, Python, C++, whatever. Make it just part of the normal business systems that people use. It is just software. Make it so that the users really appreciate that the new software actually benefits them each time they use it. Make it easier to use the model than to not use it. Hide the model inside other software. Probably never even mention optimisation to your end users.
The best model in the world that could deliver amazing benefits will actually achieve nothing of practical value if it doesn't actually get used.
If your target audience or users have to do extra stuff or perform extra steps to use your model, then it will likely not get used very much and may wither and die. If they have to learn new applications etc to use it, it probably won't get used by most people.
By making your model part of their normal day-to-day processes, it will get used, and the practical benefits will come.
I have implemented and support a number of live optimisation applications in several large companies, making decisions that directly affect billions of pounds/dollars of products/revenues per year. Almost all of them have the real optimisation models totally hidden from the users, most of whom have no idea of optimisation or CPLEX; the software in their business systems just works.
There are many options. You may write the model with an algebraic modeling language (AML) like OPL or a general purpose language. (GPL)
If you use OPL then you may call your model from many GPL like C++, Java, Python ...
Or you could plug that model in an existing application.
You could call OPL from Excel or DSX Python Notebook as can be read at https://www.ibm.com/developerworks/community/forums/html/topic?id=306f3ded-33b8-4d9a-8568-b4288aa64265&ps=25
See the survey I mentioned in 1.
Some users use CPLEX OPL IDE in order to make decisions and simulations
Other use Decision Optimization Centre : https://www.ibm.com/us-en/marketplace/ibm-decision-optimization-center
Finally, some write new applications from zero or plug the model into an existing application.

Calculate price of service depending on lots of rules

I'd need to calculate the price for a service. The price is depending on a lot of rules which could be something like:
day of week the service is consumed
day of time the service is consumed (can overlap)
type of customer (rebate for members)
number of services consumed
combination of services (cheaper if service a and service b is consumed at once)
cost cap
minimal price
Some of those rule might contradict (i.e. a rebate would result in a price below minimal price) and some can be combined. Also the rules based on time criterias are a bit tricky as the price needs to be calculated on the currently valid price: if price is:
5$ from 09:00 to 12:00
7$ from 12:01 to 08:59
and you consume the service from 11:00 to 13:00 then the total price is 12$ (5$ for first hour, 7$ for second hour)
Any hints on how one can implement this? I was thinking about using a rule engine but not sure how i would start this.
I looked into https://github.com/ulfurinn/wongi-engine and https://github.com/Ruleby/ruleby so far.
Also i found a similar question where one reply suggests to actually implement it in pure ruby: Calculating Prices based on Rules (Ruby Rule Engine)
The pricing model is not up for discussion unfortunately...i did not decide to have something that complex:-(
One of the aspects you may take into consideration on top of the complexity of the rules is how often those rules can change and how fast you need to be able to react to those changes. I’ll ask myself the following questions:
You want to edit the rules on the fly and hot deploy the changes to production?
You want the business to be able to execute CRUD operations over the rules?
Answering those questions will help you also to decide what rule engine better fit with your final solution. There are quite few implementations of rule engines out there, some are lightweight and really easy to use but won’t allow the possibility of editing the rules on the fly, other are heavy and a bit hard to use but will provide editors and tools that will help you to implement a solution more robust and flexible for the customers and the business people.
There is a lot of good approach for rule engines you can use, Drools is one of then and it will allow you to define rules in a fair easy way. Drools also come with a tool named Guvnor that, with the proper configuration, will allow you to execute CRUD operations to rules and deploy it to production on the fly. Drools also allow you to create time activation rules that will make your life easy with those date/time base rules.
There are a lot of rule engine frameworks out there you can use but you’ll have a lot of work to do in your side to make those rules available no matter which framework you choose.
You can see some samples of rule engines in this page: http://tech.gaeatimes.com/index.php/archive/top-10-java-business-rule-engines/
If you don’t want to go with those heavy rule engines, we are creating a lightweight rule engine that is really easy to use. Is a Java base rule engine and the rules will be embedded in the code but I think have all the functionality you need to build your solutions using our Group/Rule hierarchy execution combined with the execution strategies, if you want to read more check EZ-Rules documentation # Opnitech: http://opnitech.com/content/products/ez-rules/ code is available # Github - EZ-Rules

Resources