Repository: pykeen/pykeen
Issue: ConceptNet dataset swaps head and relation IDs
Root cause: Algorithmic Error

**Describe the bug**
In the ConceptNet dataset the head and relation IDs are swapped.
The documentation for `CoreTriplesFactory.mapped_triples` states: "A three-column matrix where each row are the head identifier, relation identifier, then tail identifier.", but the relation identifier actually comes first, as is in the original ConceptNet csv.

**To Reproduce**
Steps to reproduce the behavior:
1. Create instance of `pykeen.datasets.ConceptNet`: 
```python
dataset = pykeen.datasets.ConceptNet()
```
2. Acess a triples factory, e.g. 
```python
triples_factory = dataset.training
```
3. Print triples:
```python
for triple in triples_factory.mapped_triples:
  head = entity_id_to_label[triple[0].item()]
  relation = relation_id_to_label[triple[1].item()]
  tail = entity_id_to_label[triple[2].item()]
  print(f'Head: {head} Relation: {relation} Tail: {tail}')
```
4. See that head and relation are swapped, example output:
```
Head: /r/Antonym Relation: /c/adx/thəχ_kwo/a Tail: /c/adx/ʂap_wə 
```

**Expected behavior**
Column 0 and column 1 of the dataframe, which is read from the ConceptNet csv, should be swapped.


Hi @46692, thanks for pointing this out. I will have a quick fix for you.

@cthoyt I implemented your fix in my custom ConceptNet class (for filtering by language and top n entities), but the order is still wrong.

You seem to have tried fixing the problem by changing the order of the columns in the usecols-argument for pandas.read_csv(...), but the documentation for this parameter states:
"...Element order is ignored, so usecols=[0, 1] is the same as [1, 0]...."

I change the order by passing these parameters to pd.read_csv(...): 
`usecols=[1, 2, 3], names=['relation', 'head', 'tail']`
and then calling 
`df.reindex(['head', 'relation', 'tail'])`

Hopefully I have not overlooked a part of your fix.
Kind regards

@46692 you're correct that the order given in `usecols` is not respected, that's why the PR also includes this:

https://github.com/pykeen/pykeen/blob/ad449ecc753eb603670de67cfa5f49020c61db12/src/pykeen/datasets/base.py#L759-L762

you can install the development code from the master branch of this repo  ([instructions here](https://pykeen.readthedocs.io/en/stable/installation.html#development)) and run the following code to check that this is indeed giving the correct results:

```python
from pykeen.datasets import ConceptNet
ConceptNet().summarize()
```

#290 also included an update to the `Dataset.summarize()` function to output the first five rows of the training triples for debugging purposes.

We'll be making a release soon that includes this code (there was a bit of a snafu with a mistaken release yesterday, but that shouldn't affect you)

@46692 btw I'd be interested to see your custom version of this class! If you find it useful, maybe others would too, and it would be a great PR to PyKEEN :)

The interfaces for datasets are pretty extensible since you're always passing `dataset_kwargs`, so you could effectively write it to have any custom arguments you want and still work with the pipeline and other high-level user-facing functions.