wabbit | Golang AMQP | Pub Sub library
kandi X-RAY | wabbit Summary
kandi X-RAY | wabbit Summary
Elmer Fudd: Shhh. Be vewy vewy quiet, I'm hunting wabbits. AMQP is a verbose protocol that makes it difficult to implement proper unit-testing on your application. The first goal of this package is provide a sane interface for an AMQP client implementation based on the specification AMQP-0-9-1 (no extension) and then an implementation of this interface using the well established package streadway/amqp (a wrapper). What are the advantages of this?.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of wabbit
wabbit Key Features
wabbit Examples and Code Snippets
Community Discussions
Trending Discussions on wabbit
QUESTION
I am trying to build a contextual bandit. Since I like to rank the actions, I want to switch to an conditional contextual bandit (as I have read here).
But now I have trouble understanding the new vw format.
The example of the vowpal wabbit wiki is this:
...ANSWER
Answered 2021-Dec-06 at 17:11You may interested in looking into VW's wiki page which has some information on CCB:
https://github.com/VowpalWabbit/vowpal_wabbit/wiki/Conditional-Contextual-Bandit
You can think of CCB as a layer above CB, which runs a separate CB example with all actions for each slot, however actions are excluded as a slot selects it. The example above likely uses more functionality than is necessary for your purposes. If you only want to rank actions, this would be a better format:
ccb shared | s_1 s_2
ccb action | a:1 b:1 c:1
ccb action | a:0.5 b:2 c:1
ccb action | a:0.5
ccb action | c:1
ccb slot 1:0.8:0.8 |
ccb slot 0:0.8:0.8 |
ccb slot 3:0.8:0.8 |
ccb slot 2:0.8:0.8 |
This example could be used for learning and prediction, however if you just wanted to do prediction you could use unlabeled slots like this:
ccb shared | s_1 s_2
ccb action | a:1 b:1 c:1
ccb action | a:0.5 b:2 c:1
ccb action | a:0.5
ccb action | c:1
ccb slot |
ccb slot |
ccb slot |
ccb slot |
I'll answer each of your questions separately:
I also do not understand why it needs features for the slot part?
Slots do not need features. They are allowed to use features if you want each slot to learn differently, however this is not a requirement. If you are trying rank actions you probably don't want slot-specific features.
Furthermore i do not fully understand why we have to tell it the action ids to include?
You don't need to do this. By default all actions which have not yet been selected will be included in each slot. As an example, if there are actions 0,1,2,3 and slot 0 select action 1, then slot 1 will have actions 1,2,3 available. In this sense, each later action will not include actions select from prior slots, thus the action that each slot selects will rank the actions in order.
What is the purpose of it?
If you wanted a more complicated system with specialized slots you may want to explicitly exclude certain actions from a slot, but for simply ranking actions you will not want to do this.
Also which format does it need for the prediction?
Predictions can be done on any CCB example (labeled or unlabeled). You don't need to do anything special with the example, you only have to specify the -p pred_file.txt flag to output predictions to that file.
Why does it need the slot part if I do not have any action costs yet?
If you have no costs (so you are only doing prediction), the number of slots will represent the number of predictions you want to make. If you only want to find the top n actions you could use only n slots. Let me know if you have any other questions.
QUESTION
I have a page with multiple divs like this:
...ANSWER
Answered 2021-Jul-03 at 15:53You can use the >
selector to the child div
's having the date
class within the parent, and then hide the parent:
QUESTION
I am trying to convert csv (with 10 columns) to vowpal wabbit input format txt file. Some csv columns has integer values and some have strings (like: com.12346.xyz). For example if my csv columns look like this:
...ANSWER
Answered 2020-Dec-21 at 03:41This is simpler to do than it might seem, because of some handy ways Pandas lets you treat sequences almost the same as you would single values in Python.
First we'll import your CSV file, treating all values as strings to make our formatting easier:
QUESTION
I’m checking Vowpal Wabbit’s documentation for how it’s actually learning. Traditional Contextual Bandits learn by having F(context, action) = Reward, find action that maximizes Reward, and returns action as recommendation. The “F” is any model; linear, neural net, xgb, etc... that is learned through batch processing. I.E. collect 100 contexts, 100 actions, 100 rewards, train ML model, then do it again.
Now, on VW it says it reduces “all contextual bandit problems to cost-sensitive multiclass classification problems.” Ok, read up on that but there still needs to be some function F to minimize this problem doesn’t there?
I’ve thoroughly read the documentation and either:
- Missed what the default learner is for batch processing or,
- Don’t understand how VW is actually learning in this cost-sensitive framework?
I’ve even scoured the vw.learn() method inside pyvwlib. Thanks for the help!
...ANSWER
Answered 2020-Dec-03 at 16:29Missed what the default learner is for batch processing or,
The default learner in VW is SGD on a linear representation, but this can be modified using command line arguments.
Don’t understand how VW is actually learning in this cost-sensitive framework?
In contextual bandit learning, the reward associated with the taken action is presented for learning. VW in ips mode converts this into a reward for each action by putting zeros at the actions not taken and importance-weighting the reward for the action taken. Having imputed the missing data, it then treats the problem as a supervised learning problem.
QUESTION
Official VW documentation has an example of how to run Vowpal Wabbit in daemon mode. https://github.com/VowpalWabbit/vowpal_wabbit/wiki/Daemon-example But it seems that VW always binds a particular port to the daemon (by default it is port 26542).
It is possible to use file socket instead of a TCP socket for Vowpal Wabbit daemon mode?
...ANSWER
Answered 2020-Oct-30 at 16:08Right now vowpalwabbit explicitly uses TCP sockets in deamon mode so the only thing you can define is the port you wish to use via --port
.
PS: I'm a maintainer for this project and we would be more than happy to accept a patch with this if you need it, as we currently don't have plans to support this feature. Here is the related TCP code: https://github.com/VowpalWabbit/vowpal_wabbit/blob/master/vowpalwabbit/parser.cc#L208
QUESTION
I'm working on a small AMQP consumer and i want to test my consumer code, but im struggleing to mock the amqp.Dial
. I have added some interface so i can mock Connection
and Channel
and added a property so i can control the dial-function:
ANSWER
Answered 2020-Oct-24 at 13:07Given the following types:
QUESTION
I am using Vowpal Wabbit's contextual bandit to rank various action given a context.
...ANSWER
Answered 2020-Sep-03 at 12:55Olga's response on the repo: https://github.com/VowpalWabbit/vowpal_wabbit/issues/2555
--cb does not do any exploration and just trains the model given the input so the output will be what the model (that has been trained so far) predicted
--cb_explore includes exploration using epsilon-greedy by default if nothing else is specified. You can take a look at all the available exploration methods here
cb_explore's output is the PMF given by the exploration strategy (see here for more info).
Epsilon-greedy will choose, with probability e, an action at random from a uniform distribution (exploration), and with probability 1-e epsilon-greedy will use the so-far trained model to predict the best action (exploitation).
So the output will be the pmf over the actions (prob. 1-e OR e for the chosen action) and then the remaining probability will be equally split between the remaining actions. Therefore cb_explore will not provide you with a ranking.
One option for ranking would be to use CCB. Then you get a ranking and can provide feedback on any slot, but it is more computationally expensive. CCB runs CB for each slot, but the effect is a ranking since each slot draws from the overall pool of actions.
And my follow up:
I think CCB is a good option if computational limits allow. I'd just like to add that if you do cb_explore or cb_explore_adf then the resulting PMF should be sorted by score so it is a ranking of sorts. However, it's worth verifying that the ordering is in fact sorted by scores (--audit will help here) as I don't know if there is a test covering this.
QUESTION
For the contextual bandit framework of Vowpal Wabbit, are there any limits on how large the number of actions can be? I'm assuming that currently there is no support for problems with an infinity-sized action set (e.g. an l2 ball in Rn). But are there any limits on how large a finite set of actions can be? Or is that limited only by the hardware the library runs on?
What I can think of in terms of potential problems/concerns are floating point errors (for example for predicting the PMF over the set of actions), slow predictions/updates, and specific exploration policies/policy evaluation approaches not playing well with a large action space.
Edit: number of actions I'm considering is in the range of 1000-100,000
...ANSWER
Answered 2020-Aug-31 at 13:17I'm assuming that currently there is no support for problems with an infinity-sized action set
Correct, this isn't supported at the moment.
But are there any limits on how large a finite set of actions can be? Or is that limited only by the hardware the library runs on?
I don't believe there are concrete/artificial limits for action set size, so hardware is probably the limit. Internally, the action ID is a 32 bit number so there is definitely a limit at 2^32
. As far as other issues, if you face anything like that please feel free to open an issue and we can work with you to get them sorted out. It's definitely the kind of thing that should be fixed.
QUESTION
I am trying to read the documentation of Vowpal Wabbit and it doesn't specify how to select specific learning algorithms (Not loss) like SVM,NN, Decision trees, etc. How does one select a specific learning algorithm?
Or does it select the algorithm itself depending on problem type (regression/classification like an automl type or low-code ML library?
There are some blogs showing to use Neural networks with -nn
command but that isn't part of documentation--is this because it doesn't focus on specific algorithm, as noted above? If so, What is Vowpal Wabbit in essence?
ANSWER
Answered 2020-Aug-04 at 09:12Vowpal Wabbit is based on online learning (SGD-like updates, but there is also --bfgs
if you really need batch optimization) and (machine learning) reductions. See some of the tutorials or papers to understand the idea of reductions. Many VW papers are also about Contextual Bandit, which is implemented as a reduction to a cost-sensitive one-against-all (OAA) classification (which is further reduced to regression). See a simple intro into reductions or a simple example how binary classification is reduced into regression.
As far as I know, VowpalWabbit does not support Decision trees nor ensembles, but see --boosting
and --bootstrap
. It does not support SVM, but see --loss_function hinge
(hinge loss is one of the two key concepts of SVM) and --ksvm
. It does not support NN, but --nn
(and related options) provides a very limited support simulating a single hidden layer (feed-forward with tanh activation function), which can be added into the reduction stack.
QUESTION
I have a script which reads text file into a vector.
...ANSWER
Answered 2020-Jun-02 at 07:11From your description, I am assuming you want to print the outputs line by line. So use '\n' instead of comma:
std::cout << i.Name << "\n" << i.Number1 << "\n" << i.Number2 << endl;
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install wabbit
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page