Ten Methods, One Spreadsheet: Ranking Marketing Options with pymcdm

#python#data-analysis#b2b-marketing

Part 2 of a series on multi-criteria decision making for B2B SaaS marketers. Part 1 used rubkit to score options against fixed targets. This one ranks them against each other.


In the last post I built scorecards. I wrote down what “good” looks like (“a $20 CPM is great, $400 is terrible”) and scored every option against that bar. It worked, but it took opinions: every benchmark was a number I had to defend.

This time I wanted the opposite. No benchmarks, no targets, no rules. Just the spreadsheet as it is, and a question every marketer asks: of these options, which is best?

That’s what pymcdm does. It’s a Python library of classic MCDM ranking methods: TOPSIS, VIKOR, PROMETHEE and a couple of dozen more, behind one consistent API. I ran the same two problems through it: which YouTube creators to sponsor, and which landing pages perform best.

What I expected was a cleaner, more “objective” answer than my hand-built scorecard. What I got was more interesting: a lesson in how much of a ranking is decided before any maths runs.

How ranking works

Every method in pymcdm does the same three things:

  1. Normalise. Put every column on a 0–1 scale, so 503,000 subscribers and a 7/10 grade can sit in the same sum. Flip “less is better” columns (like cost) so 1 always means good.
  2. Weight. Multiply each column by how much it matters.
  3. Aggregate. Combine the columns into one score. This is where the methods differ.

The key difference from a scorecard: the bar is set by the other options. The best creator on a column scores 1, the worst scores 0. Nothing is “good” or “bad” in absolute terms; it’s only better or worse than the rest of the list.

Here’s the whole thing in code:

import numpy as np
import pandas as pd
from pymcdm.methods import TOPSIS
from pymcdm import weights as w
from pymcdm.helpers import rankdata

df = pd.read_csv("youtube_influencers.csv", index_col="Channel Name")
X = df.to_numpy(dtype=float)
types = np.array([1, 1, -1, 1, 1])        # subs, views, COST, comments, match: cost is "less is better"

weights = w.critic_weights(X, types)      # let the data choose the weights
scores = TOPSIS()(X, weights, types)
ranks = rankdata(scores, reverse=True)    # 1 = best

Mark which columns are costs, pick weights, pick a method. If you can sort a column in Excel, you can do this.

The catch is in the two words “pick weights” and “pick a method”. Those choices turned out to be the whole story.


Example 1: the YouTube creators again

Same ten creators as last time. The sheet:

Channel Subscribers Avg views Cost / video Comments Audience match (1–10)
MarTech Weekly 503,000 15,000 $1,500 20 3
SaaS Explained 350,000 28,000 $8,500 22 5
Growth Digest 25,800 40,000 $1,000 14 5
AI Marketer 52,200 75,000 $7,000 17 4
Bowen on Demand Gen 53,000 30,000 $5,000 10 6
The SaaS Guy 213,000 2,500 $3,500 12 4
World of SaaS 123,000 13,000 $2,000 10 3
Corbin on Growth 175,000 950 $10,000 34 3
Augmented Marketing 121,000 500 $2,000 6 3
B2B Playbook 27,400 5,000 $3,500 20 2

I deliberately did not add derived metrics this time: no CPM, no view rate. I wanted to see what standard methods do with the raw sheet a marketer actually has.

Who decides the weights?

This is the first fork in the road, and I hadn’t appreciated how big it is.

pymcdm can compute weights from the data. There are several recipes:

  • CRITIC rewards columns that vary a lot and don’t duplicate other columns.
  • Entropy rewards columns where values are very uneven.
  • MEREC asks which column, if removed, would change the scores most.

Or you can set the weights yourself. I used ROC (rank order centroid), which only asks you to put the criteria in order of importance and turns that order into weights. I ranked them audience match > views > cost > comments > subscribers, which became 46%, 26%, 16%, 9%, 4%. It’s handy when a team can agree on an order but would argue forever about exact percentages.

Here’s what each recipe produced:

Criteria weights by method: Entropy gives audience match 4%, the ROC order 46%; raw std. dev. gives subscribers 85%
Criterion CRITIC Entropy MEREC Equal My priorities (ROC)
Subscribers 24% 29% 21% 20% 4%
Avg views 21% 42% 43% 20% 26%
Cost / video 18% 18% 16% 20% 16%
Comments 17% 8% 13% 20% 9%
Audience match 20% 4% 8% 20% 46%

Look at audience match. Entropy gives it 4%. My own priorities give it 46%. Same column, same data, more than 10× apart.

Why? Avg views range from 500 to 75,000, which is 150×. Audience match ranges from 2 to 6. To Entropy, a column where everyone looks similar carries little information, so it barely counts. It has no idea that, for a B2B sponsor, who is watching is the whole point.

Data-driven weights tell you where the numbers differ, not what matters to your business. That sentence is the most useful thing I learned writing this post.

There’s also a trap in that chart (the pink bar). If you compute standard-deviation weights on the raw numbers instead of normalised ones, subscribers get 85% of the weight, because subscribers are the biggest numbers in the sheet. It’s exactly the Excel weighted-formula problem, now with a scientific-sounding name. Always normalise first. (Sessions did the same thing to the metrics in my GA4 channel analysis until I standardised them.)

Ten methods, one answer (mostly)

I used CRITIC as the main run (it came out close to equal, a neutral starting point) and ran ten methods:

Method Idea in one line
TOPSIS Closest to an imaginary “perfect creator”, farthest from the worst
VIKOR Good overall and no terrible weak spot
WSM Weighted sum: the Excel formula done properly
WPM Weighted product: a weakness multiplies through
COPRAS Adds benefits and costs separately, then combines them
MOORA Benefits minus costs, after a different normalisation
EDAS Distance above or below the average creator
MABAC Distance from a border near the average creator
PROMETHEE II Head-to-head: how often each creator beats each other
SPOTIS Distance from an ideal defined by fixed bounds, not by the other creators
Heatmap of creator ranks across 10 methods with CRITIC weights: MarTech Weekly #1 in nine, VIKOR and COPRAS the outliers

Eight of the ten methods agreed almost perfectly (rank correlation 0.94–1.00). The consensus:

Channel Mean rank In the top 3
1 MarTech Weekly 1.2 10 of 10 methods
2 SaaS Explained 2.0 10 of 10
3 Growth Digest 3.7 6 of 10
4 AI Marketer 3.8 3 of 10
5 Bowen on Demand Gen 5.2 0 of 10

The two that disagreed are worth a look, because their disagreements make sense:

  • VIKOR ranks Growth Digest only 6th. VIKOR hates weak spots, and Growth Digest has the fewest subscribers on the list.
  • COPRAS ranks Corbin on Growth 4th (everyone else: 8th). It adds up benefits separately from costs, and Corbin has the most comments and 175k subscribers. COPRAS doesn’t mind the $10,000 price as much as the others do.

When methods built on different ideas (distance, sums, head-to-head) agree, you can trust the answer. When one disagrees, its disagreement tells you something about the data.

Wait, MarTech Weekly is #1?

Here’s where it got interesting.

In part 1, I regraded MarTech Weekly’s audience match from 7 to 3, and rubkit dropped it from Sponsor to Negotiate. Its weak-fit rule caps any creator below 4/10.

pymcdm, with CRITIC weights, still ranks it #1. It has the most subscribers, the second-lowest price and 20 comments. Its 3/10 match is just one column out of five, worth 20%. Strength on three columns outvotes weakness on one.

Even stranger: after the regrade, CRITIC moved weight towards subscribers, from 20% to 24%. Before, subscribers and audience match moved together (MarTech Weekly was top on both), so CRITIC treated them as partly redundant. After the regrade they stopped moving together, so subscribers looked like more unique information and got more weight. That happens to be exactly the column that props up MarTech Weekly. The data-driven weights adjusted to my regrade in the direction that cancelled it out.

Now swap in my own priorities (ROC, with match at 46%):

Consensus rank under six weighting schemes: MarTech Weekly falls from #1 to #5 only under the marketer ROC weights
Channel CRITIC Entropy MEREC Equal My priorities (ROC)
MarTech Weekly 1 1 2 1 5
SaaS Explained 2 3 4 2 4
Growth Digest 3 4 3 3 1
AI Marketer 4 2 1 4 3
Bowen on Demand Gen 5 5 5 5 2

MarTech Weekly goes from #1 to #5. Bowen on Demand Gen, the best fit on the list, goes from #5 to #2.

Same library. Same ten methods. Same data. The only thing that changed is who decided what matters.

This also answered a question that had been bugging me. When I compared libraries, pymcdm was the only one ranking SaaS Explained #2. It’s strong on four of five columns: 350k subscribers, 28k views, 22 comments, 5/10 match. Its one weakness, an $8,500 price, is a single column worth 18%. rubkit had a budget rule; pymcdm has no such thing. There’s no “views per dollar” column and no “never above $8,000”. Cost is just one more column to be outvoted.

A ranking method can only trade off the columns you give it. If a constraint matters, filter on it before ranking, or add a column that measures it.

The hidden risk: rank reversal

This is the part of ranking I’d never thought about, and it’s the strongest argument for rubkit’s fixed benchmarks.

Because every creator is scored relative to the others, removing one creator can reorder the rest, a problem known as rank reversal, including creators who have nothing to do with it. So I tested it: remove each creator in turn, re-rank the other nine, and check whether their order changed.

Rank reversal by method: PROMETHEE II reshuffles the others in 8 of 10 removals; SPOTIS and WPM never do

PROMETHEE II reshuffled the others in 8 of 10 removals. The worst case: remove World of SaaS, or Augmented Marketing, or B2B Playbook (creators nobody would sponsor), and SaaS Explained overtakes MarTech Weekly for #1.

Think about what that means in practice. You shortlist ten creators. One drops out because they’re booked up. Your #1 changes, even though nothing about your top two changed.

Two methods never reshuffled anything: WPM (multiplying means the comparison between two creators depends only on those two) and SPOTIS (it scores against fixed bounds I set, like “cost between $0 and $15,000”, so the other creators don’t matter). SPOTIS is basically a ranking method borrowing the scorecard idea, and it’s my pick when a list will change over time.


Example 2: the landing pages

Same eight pages as last time, from a real B2B SaaS site anonymised as Flowmetric, a fictional product-analytics company:

Page Clicks CTR Conversions Conversion rate
Session Replay (product) 906 12.0% 10 1.10%
Best analytics software (blog) 398 0.5% 9 2.26%
Funnel reports in SQL (blog) 119 0.8% 4 3.36%
Homepage 1,716 8.3% 5 0.29%
Pulseboard alternative (blog) 84 0.8% 3 3.57%
Open-source analytics tools (blog) 4,037 2.7% 3 0.07%
Trackly alternative (blog) 319 3.2% 4 1.25%
Event tracking approaches (blog) 155 1.0% 2 1.29%

The criteria are the first decision

The raw sheet has clicks, impressions, CTR, position and conversions. But CTR is clicks ÷ impressions, and position mostly drives clicks and CTR. Feed in all five and you count traffic several times over.

So I used four columns that describe what a page delivers: clicks, CTR, conversions and conversion rate (conversions ÷ clicks), leaving out impressions and position.

To check whether that mattered, I also ran the full six-column sheet. It mattered a lot:

Page 4 columns Full sheet (6 columns)
Session Replay 1 1
Funnel reports in SQL 3 6
Open-source analytics tools 6 2

Open-source analytics tools leads both volume columns (clicks and impressions), so counting volume twice moved it from #6 to #2. The pages didn’t change. Only how many times each fact was counted did. pymcdm will happily count the same thing three times and never warn you. Criterion design is on you.

When methods split into families

The winner was easy. Session Replay was #1 under every method, every weighting scheme, every robustness test, and after every page removal except its own: the most conversions, the best CTR, solid traffic, no weak column.

Everything after #1 was messy. Clicks and conversion rate move in almost exactly opposite directions here (correlation −0.93): the big pages convert worst, the best converters are tiny. And the methods split into families, each picking a different #2:

Method agreement matrix for landing pages: methods split into families, e.g. WPM and PROMETHEE II agree at 0.99
Method family Their #2 Why
Distance to the ideal (TOPSIS, CODAS) Pulseboard alternative Best conversion rate puts it close to the ideal page on that axis
Compared with the average (ARAS, EDAS) Open-source analytics tools 4,037 clicks is 4.2× the average page
Multiply, or head-to-head (WPM, PROMETHEE II) Homepage Both punish a page with one terrible column; the homepage has none
Linear scaling (WSM, MABAC, SPOTIS, VIKOR) Best analytics software Steady across all four columns

The consensus put Best analytics software at #2. But “#2 by consensus” here means “the average of four different opinions about what #2 means”.

(A small practical note: COPRAS and MOORA, which I used for the creators, refuse to run when every column is “more is better”. They need at least one cost column. I swapped in ARAS and CODAS. It’s the kind of thing you only find out by running it.)

One conversion

The other thing I tested: conversions here are tiny, 2 to 10 per page. What if each page had one more, or one fewer?

Session Replay stayed #1 in all 16 tests. But one extra conversion moves Pulseboard alternative from #5 to #2. Three conversions become four, and the page leapfrogs three others.

pymcdm has no notion of sample size. A 3.57% conversion rate from 84 clicks counts exactly the same as 3.57% from 8,400 clicks. In part 1, rubkit let me shrink small-sample rates towards an industry average. Here I had to add the ±1 test by hand just to see the problem.

So the honest summary for the landing pages: Session Replay is the best page; Event tracking approaches is the weakest; and the middle six are two groups, not an order. Pages that convert well on little traffic (Best analytics software, Funnel reports in SQL, Pulseboard alternative), and pages with big traffic that rarely convert (Homepage, Open-source analytics tools). Which group ranks higher depends on whether you weight volume or efficiency, and with this few conversions the data can’t settle that yet.


What I’m taking away

  1. The weights are the decision. Same library, same methods, same data: MarTech Weekly is #1 or #5 depending on who chose the weights. Choose them on purpose.
  2. Objective weights aren’t neutral. They measure spread, not importance. Use them as a sanity check (“what would the numbers alone say?”), not as your strategy.
  3. Run several methods, and read the disagreements. When methods built on different ideas agree, act. When one disagrees, its reasoning usually points at something real in your data, like a weak spot or an outlier.
  4. Count each thing once. Adding two volume columns moved a page from #6 to #2. No method will catch that for you.
  5. Normalise before you weight. Otherwise the biggest numbers win, and you’ve rebuilt the Excel formula.
  6. A relative ranking moves when the list moves. If options will come and go, use SPOTIS or WPM, or a scorecard.
  7. Treat close ranks as ties. A #2 that one conversion can change isn’t a #2.

pymcdm or rubkit?

They answer different questions, and I’d now use both:

rubkit pymcdm
Question Does this clear our bar? Which is best among these?
You must supply Benchmarks, rules, weights Directions and weights (or let the data pick)
Business rules Yes (gates) No: filter before ranking
Small samples You can model them Invisible
Adding an option Other scores don’t move Other ranks can shuffle
Robustness checks Weight sensitivity Ten methods, six weightings, rank reversal, all in a few lines

My workflow from here: pymcdm first, to explore (what does the data say, where do methods disagree, which column is doing the work?), then rubkit to decide, once I know what the bar should be.

Next post: pyDecision, the same two problems through a library with 60-plus methods, fuzzy numbers for uncertain inputs, and a way to turn a marketer’s gut feeling into weights. Spoiler: once fit gets the weight a B2B marketer would give it, the creator rankings change again.

As always, if you think I’ve got this wrong, tell me. A ranking you can’t argue with is the one I’d trust least.