[SOLVED] How to visualize differences in Product Portfolio

Computing metrics, community detection and data handling
h.turhan
Posts:5
Joined:14 Nov 2012 16:48
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[SOLVED] How to visualize differences in Product Portfolio

Post by h.turhan » 19 Nov 2012 14:32

Hello everyone,
I am an absolute newbie here and our task is to organize a product portfolio of a company. They have many products with similar features and many with unalike ones, and we want to collect them in certain family groups within certain common features. We will create an excel file with values like; name, design, material ... And we want to visualize it with gephi like people does it for network relation visualization or so.
We want to visualize our result to convince our boss that reveals the products that have similar features gathering in clusters, meaning that they can be simply in the same family.
So, in order to get such a result with gephi, should we give quantitative values to the variables like design, quality...?
We imagine the result in gephi being like this:

designs of products---> are defined by colours
each product --> is defined as a node
similarities between the products ---> defined as edges, so we can see diferent product families cluster in different locations in the final result.

so in order to see the similar products gathering and different products putting a gap to each other and finding their own similar products and clustering their own family, how can we manage the edges?
what could be your suggestions?

We are really bad at these things, we would really appretiate any help!

User avatar
seinecle
Gephi Community Support
Posts:546
Joined:08 Feb 2010 16:55
Location:Lyon, France
Contact:

Re: How to visualize the differences in Product Portfolio

Post by seinecle » 19 Nov 2012 23:14

Hi,

Cool project.

You could have a look at a small software I developed:

https://github.com/seinecle/Gaze/wiki/G ... r-networks

I use different examples to illustrate the mechanism, but the logic is the same. Imagine you have products in an excel file:

product A -> color = green; price = expensive; design = italian
product B -> color = purple; price = cheap; design = french
product C -> color = green; price = expensive; design = british

Then, you transform this into a file that looks like:
product A, green
product A, expensive
product A, italian
product B, purple
product B, cheap
product B, french
product C, green
product C, expensive
product C, british

This file can be read directly with Gaze, and the result should be that products A and C will be connected because they share features, whereas product B will be isolated. If you do that for 1000 products or more, your will see a network of products that cluster according to the features they share.

Good luck with your project!

Clement

pegerp
Posts:124
Joined:21 Dec 2011 17:10
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: How to visualize the differences in Product Portfolio

Post by pegerp » 20 Nov 2012 09:10

Links to the Gaze screenshots don't work when you click them - URLs are working if you copy & paste them in browser though.

User avatar
seinecle
Gephi Community Support
Posts:546
Joined:08 Feb 2010 16:55
Location:Lyon, France
Contact:

Re: How to visualize the differences in Product Portfolio

Post by seinecle » 20 Nov 2012 09:16

Hi pegerp,

Indeed, I had troubles with Github's way of doing things. You can also find the screenshots on the download page for Gaze on my website:
http://www.clementlevallois.net/portfolio.html

Best,

Clement

h.turhan
Posts:5
Joined:14 Nov 2012 16:48
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: How to visualize the differences in Product Portfolio

Post by h.turhan » 20 Nov 2012 14:10

Wow, great help! Thanks. This was exactly what we were looking for. I hope we can manage to do it. In case of more questions, I would contact again! Thanks again.

h.turhan
Posts:5
Joined:14 Nov 2012 16:48
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: How to visualize the differences in Product Portfolio

Post by h.turhan » 20 Nov 2012 16:09

So into which file should I transform my excel file? You mean save as in another format? like csv format? but gaze did not accept .csv file by the way.
seinecle wrote: product A -> color = green; price = expensive; design = italian
product B -> color = purple; price = cheap; design = french
product C -> color = green; price = expensive; design = british

Then, you transform this into a file that looks like:
product A, green
product A, expensive
product A, italian
product B, purple
product B, cheap
product B, french
product C, green
product C, expensive
product C, british

User avatar
seinecle
Gephi Community Support
Posts:546
Joined:08 Feb 2010 16:55
Location:Lyon, France
Contact:

Re: [SOLVED] How to visualize differences in Product Portfol

Post by seinecle » 20 Nov 2012 17:16

Yes, I mean saving it as a text file, in a csv format.

I just checked: Gaze accepts any text file (you can put a .csv extension, or .txt, it does not matter).

If Gaze did not work for you I realize that it is probably because in the options ("Under the Hood"), "weighted network" is selected by default. If your network is not weighted you have to toggle this button to see "Unweighted network" appear.

To clarify, an unweighted network (probably your case) looks like:
product A, green
product A, expensive
product A, italian
product B, purple
product B, cheap

And a weighted network looks like:

product A, green,3
product A, expensive,15
product A, italian,3
product B, purple,2
product B, cheap,3

I should also add that the two files created by Gaze are a nodes list and an edges list can be directly imported in Gephi!

I attach to this post an example file that you can run with Gaze (again, don't forget to toggle the button to "Unweighted network" in the Gaze options)
Attachments
test.csv
(93Bytes)Downloaded 232 times

h.turhan
Posts:5
Joined:14 Nov 2012 16:48
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: [SOLVED] How to visualize differences in Product Portfol

Post by h.turhan » 30 Nov 2012 15:53

Hi Seinecle,

First of all, thank you so much for your great help. I just want to understand how the gaze and gephi works together. So I tried your test.csv as an example work.

I have created one nodes and one edges file of this test.csv file by using gaze. Then I have imported them into Gephi data laboratory in that order. Everything went smoothly so far.

What I do not understand why fifi is missing as a node, and why do I have nodes called "blue" and "green"? These are features of products for my case and I do not want the features appearing in the nodes list as a node. I thought these features would define the closeness of products to each other. And I also do not want to miss any product in the nodes list (which we did miss "fifi").

Your help was so helpful to us, and we just want to understand now deeply how the features interact and take part in this process so that we can use gaze and gephi in a smooth and clear way.

Thanks a lot again!

User avatar
seinecle
Gephi Community Support
Posts:546
Joined:08 Feb 2010 16:55
Location:Lyon, France
Contact:

Re: [SOLVED] How to visualize differences in Product Portfol

Post by seinecle » 01 Dec 2012 00:11

Hi,

Very glad you find it interesting, I believe it's quite useful indeed.

So, you were totally right that the nodes list was missing some values in the example provided. That's because I basically used only the edges list generated by Gaze, and let Gephi create the nodes automatically (this is an option when you import an edge's list in Gephi through the datalab), so this glitch in the nodes list generator remained invisible to me. That's fixed now, please download the new version of gaze at the same address: http://www.clementlevallois.net/portfolio.html

How does Gaze work in the case of directed networks? (your case)

I base the following explanation on this very simple example file:
https://github.com/seinecle/Gaze/blob/m ... 20gaze.csv

For clarification, in the case of an edge that looks like "John, ice-cream" I call "John" the source node and "ice-cream" the target node.
- for each different source node, I create a list (you can call that an array, or a vector too). This list is as long as you have different targets in the file.
- this list is filled with 0 when the target node does not exist (John does not like sodas? I put "0" at the place of sodas in the list)
- but I put 1 (unweighted network) or the value that John likes ice-cream (8) if you selected "weighted network" in the list if the source node is connected to the target (John likes ice-cream with an intensity of 8? I put 8 in the position for ice-cream in the vector for John).

- now the crucial part: Gaze compares each pair of vector and computes their similarity with a similarity measure called the cosine (for the Java coders here, see: http://sujitpal.blogspot.nl/2008/09/ir- ... sures.html). A similarity above zero (John and Clifford share at least one taste in common) leads to the creation of an edge between John and Clifford. Maximum similarity is = 1 when two persons share all the same tastes: that is the case of John and Kate for example.

- said differently, this similarity measure basically tells us how much is John similar to Clifford in terms of what they like - simply by looking at how their respective vectors are similar.

- I add a bit of code to present this result into 2 files (a list of nodes, a list of edges, both formatted to be readable with the "import spreadsheet" functionality in the Gephi datalab).

- what about the centrality measure that you see in the nodes list? That has to do with undirected network, which is not your use case. Undirected networks are the case when you have a network with just persons, no sodas or ice-creams!
John, Clifford
Clifford, Alice
John, Ross
Vivian, Edmund
Alice, Edmund
=> we know who is connected to whom. But we don't know who shares most connections with whom (said differently: are Alice and Ross connected, *in terms of how many friends they share*? Gaze provides an answer to this question if you select the "undirected" option. The logic of the computation is the same as above: create a vector for each node, and compute similarities between each pair of vectors, then return the result as an edges list.

I hope this clarifies!

Oh, and the connection with Gephi: besides providing a neat way to visualize networks, Gephi has also become a hub for the conversion of file formats. I find it very convenient that the output of Gaze can be imported in the datalab of Gephi, because then you can export it via Gephi to any file format is convenient for you for further analysis (including Pajek and UCINET if you are into statistical analysis).

Best,

Clement

h.turhan
Posts:5
Joined:14 Nov 2012 16:48
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: [SOLVED] How to visualize differences in Product Portfol

Post by h.turhan » 12 Feb 2013 11:19

Hi,
This time I have another question. As I said, we are trying to use gephi for our product portfolio analysis to see the similarities and differences between products, and observe if there is abnormalities in product families.
So I will use your example to keep things simple for this question. (John, icecream, 8 ; Kate, icecream, 6...)

We want to create some sort of weighting between the importance of the features of products. For instance, there are some features which are so important (and unique) and there are some of other product features which are not that important. So we want to create a hierarchy in the product features as well, as if gephi will look at our weightings and say, "ok. I look at first feature A, which products have this feature? (because that feature is the most important for us). and then next feature, feature D for ex., then gephi looks which products have feature D..." it goes like this.

Turning back to the example with icecream, soda and cake; it would be as it follows:

let´s say that the most important for us is if someone drinks soda. and then if someone eats cake, and then someone eats icecream. We thought something like this for the solution:

(remember our hierarchy among the features was like: soda > cake > icecream ; and they even have their certain weighting between each other. For instance, soda is 5 times more important than cake, and cake is 2 times more important than icecream, which leads to mathematically soda is 10 times more important than icecream)

Serge, soda, 100 (10 times more important than icecream, 10 x 10 =100)
Alice, soda, 80
Harold, soda, 70
Alice, cake, 10 (2 times more important than icecream, 5 x 2 =10)
Clifford, icecream, 9
John, icecream, 8
Kate, icecream, 6
Alice, icecream, 6

(remember that we assumed the least important feature is icecream, and the most important feature is soda in the following mathematical ratio:

icecream --> x
cake --> 2x
soda --> 10x

at the end result, we will see serge, alice and harold stands very close to each other with a stronger connection compared to other connections, because they all share an overwhelming feature, which is soda.

By doing this kind of weighting, we are planning to give importance to the features of our products, so that the products who share the most important features will stand closer to each other at the end. We still did not try this out in gephi, actually because we still did not start the project on gephi level, we were working on other parts of the project, and soon we are planning to write down all what we have in hand into gephi.

So, do you think weighting in such mathematical order would work out for our case?

Thank you for all your help indeed!
Bests.

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable