How to create a Decision Tree? - decision-tree

So I have this problem with 12 customers purchasing 5 different items. 0 meaning they did not buy that product and 1 means they did purchase that item.
So I'm having trouble on how to start with this...

Related

Rank the best (highest value) combinations based on individual and grouped options

I have a project where people can bid on 6 products individually or for multiple products for a higher value.
For example, someone may bid for Product 1 and offer $2 or Product 4 and offer $6 or Product 1 & 4 and offer $9.
We have bids for all products individually but need to consider mixes where grouped offers are also considered and remaining products are sold individually.
Our goal is to create a ranked list the highest value options.
Does anyone have any ideas or experiences doing something similar and how did you go about it?

How to handle purchase order in every sales order in Odoo?

Can Odoo handle purchase orders in every sales order that the items are not yet received by the warehouse?
I have this situation where customer 1 and customer 2 order the same products which are not yet in stocks (on-hand-qty = 0). So Odoo will automatically generate a purchase order to buy the items to the vendor and the company will also purchase enough stocks to compensate for the two customers? Now with 45 days lead time until the products will be receiving in the warehouse.
Example:
Item in warehouse = 0
Customer 1 buy 50 units of an item on the same day but different store.
Customer 2 buy 50 units of the same item on the same day but different store.
The company buys 200 units of the same item Since the lead time for the vendor to deliver the product is 45 days now there is Customer 3 which buys the same product on the same day but different stores but only buys 50.
Now in Odoo, it will generate 4 PO ( 3 for the Customer 1,2,3 and 1 for the company) How to make it 2 3 PO instead of 4? since it will compensate the number of items from the company's order but it will wait for 45 days? then another Customer 4 will buy the same items...etc. It will be a series of RFQ that are not necessary to do automatically.

Restricting purchases on Product overall quantity not on SKU quantity

I want to be able to restrict my orders to a limit on the product quantity and not it's different SKUs.
For instance, say I have a bus route with tickets for each stop. My bus can hold 24 passengers. I want to sell fare on my bus for each of my 24 seats but each stop can be a different price.
I'm having trouble figuring out how to do this in Stripe.
I am thinking I can try and do a metafield with overall quantity in the product and find a way to check against that before accepting an order?

finding the closest match based on multiple criteria

Ive been working on VBA at work for almost a year and have managed to pull of some rather impressive things, normally I can find anything I'm not sure about with a series of searches on this site or others but this time I have come up blank, I guess its most likely because I don't really know how to frame the search properly :(
I'm looking to create a macro that analyses a customers sales history, then preforms a 'you might also like' search from our bestsellers list and returns the closest match to their bestseller. The product is books and due to many decades of bibliographic attention to detail within the industry each product can have up to 20 categories and I want to use this to find the closet match.
The info I have (the important bits)
Sheet 1 - product id - customer sales quantity
Product id 2 -customer sales quantity
Product id 3 -customer sales quantity
Etc etc ( usually up to 100)
Sheet 2 - product id - total company sales quantity
product id2 - total company sales quantity product id3 - total company sales quantity
Etc etc (Currently over 34000 and growing...)
Sheet 3 - cat1 cat2 cat3 cat4 cat5 cat6 etc (to cat400)
Product id 1 0 1 1 0 0
Product id2 0 1 1 0 1 0
Product id3 1 0 1 1 0 0
What I want to be able to is to find the bestseller from the customers list, look up all of the matching categories for that product on the cat reference table, find all results with an exact match to those categories and list them by total company's sales value. Although it is very possible that with the amount of possible categories there will not be an exact mach so I would like then to get the closest match of that product.....
Does that make sense? Please let me know if any more info is needed to help - even just a pointer towards some kind of function or a snippet of code that will help me on my way would be appreciated, I just have no idea how to find a match for an entire rows values.... and even less of an idea of how to find a closest match if there are no exacts...
Interesting question. There's no match function to achieve what you want. Instead, you need to first figure out what kind of algorithm/logic you want to use in order to determine the closest books. This will require a lot of weighing. Here's how I'd do it (without VBA):
Let's use the following data as example:
Approach:
Combine product info with overall sales info, to have a weight for each book:
Determine to the "average preference" of the customers basket in sheet1. In order to do so:
Add the category information for the 400 categories to each product in the basket:
Sum each category for all basket products (see row 6 above)
Determine the weigh (see row 7).
Apply this preference to all products to determine the overall fit:
Compare each product's categories with the preference:
Check that the product is not already in the basket:
Combine all three factor to determine each product's fit (by multiplying the factors) - and rank them using the RANK function:
Last but not least, retrieve the top X highest matches with a lookup:
Here's the sample file.

MS Access 2003 - Calculating an average based on qty sold/per site with supply %

Here is another question I have about being able to calculate this scenario in Access, or even at all for that matter:
I have a query that find the TOP 5 items sold in a given timeframe, and it groups by site. I use this to create a comparative chart between the site for ppt presentations. I do a lot of these but I have a problem with the presentation that I foresee they will have a problem with and it makes for bad metrics:
Some stores are bigger than others, and get much more supply. So a straight aggregate total of just qty of toping selling items, and comparing the locations is stacking the deck a little.
So if Site A gets 80% of the supply, and sells 500, Site B gets 15% supply and sell 75, and site C get 5% supply and sells 50 items, then Site C actually has the best sales for their size. I have exactly what I need in terms in the first chart (from my queries and such) to show the aggregate total, but what do I need to represent the idea mentioned above.
The factors that I have that go into this are:
ItemID - group by
Item - group by
qty sold - sum/descending (which is the variable that determines the Top 5)
Store/Location - Group By
and then I run a seperate query to get the total deliveries (supply) to each site
I realize that this may just be a lack of mathmatical understanding on my part, but can anyone help with this?
thanks
The first issue that I see isn't about SQL savvy; it's how to serve your data customer. What does he or she want to see? Metrics is a term with a holy ring, and for good reason: it's supposed to be what is used for the big business decisions, and it's scary easy to measure the wrong thing.
So I'd make sure I know what my customer wants. If you can't model it on a spreadsheet, you won't be able to develop your reporting effectively.
Every deck of cards is loaded. You have to know how they want it loaded.

Resources