Datasets:
update readme
Browse files- README.md +178 -0
- requirements.txt +1 -0
README.md
CHANGED
@@ -1,3 +1,181 @@
|
|
1 |
---
|
|
|
|
|
2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
license: mit
|
5 |
+
tags:
|
6 |
+
- knowledge-graph
|
7 |
+
- rdf
|
8 |
+
- owl
|
9 |
+
- ontology
|
10 |
+
annotations_creators:
|
11 |
+
- expert-generated
|
12 |
+
pretty_name: FIBO
|
13 |
+
size_categories:
|
14 |
+
- 100K<n<1M
|
15 |
+
task_categories:
|
16 |
+
- graph-ml
|
17 |
+
dataset_info:
|
18 |
+
features:
|
19 |
+
- name: subject
|
20 |
+
dtype: string
|
21 |
+
- name: predicate
|
22 |
+
dtype: string
|
23 |
+
- name: object
|
24 |
+
dtype: string
|
25 |
+
config_name: default
|
26 |
+
splits:
|
27 |
+
- name: train
|
28 |
+
num_bytes: 56045523
|
29 |
+
num_examples: 236579
|
30 |
+
dataset_size: 56045523
|
31 |
+
viewer: false
|
32 |
---
|
33 |
+
|
34 |
+
# FIBO: The Financial Industry Business Ontology
|
35 |
+
|
36 |
+
### Overview
|
37 |
+
In the world of financial technology, the vastness of data and the
|
38 |
+
complexity of financial instruments present both challenges and
|
39 |
+
opportunities. The Financial Industry Business Ontology (FIBO) offers
|
40 |
+
a structured framework that bridges the gap between theoretical
|
41 |
+
financial concepts and real-world data. I believe machine learning
|
42 |
+
researchers interested in the financial sector could use the
|
43 |
+
relationships in FIBO to innovate in financial feature engineering to
|
44 |
+
fine-tune existing models or build new ones.
|
45 |
+
|
46 |
+
### Use-cases
|
47 |
+
- Comprehensive Data Structure: FIBO encompasses a wide range of
|
48 |
+
financial concepts, from derivatives to securities. Its design ensures
|
49 |
+
an in-depth understanding of financial instruments from experts
|
50 |
+
in knowledge representation and the financial industry.
|
51 |
+
- Decoding Complex Relationships: The financial domain is
|
52 |
+
characterized by its intricate interdependencies. FIBO's structured
|
53 |
+
approach provides clarity on these relationships, enabling machine
|
54 |
+
learning algorithms to identify patterns and correlations within
|
55 |
+
large datasets.
|
56 |
+
- Linkage with Real-world Data: A distinguishing feature of FIBO is
|
57 |
+
its capability to associate financial concepts with real-world
|
58 |
+
financial data and controlled vocabularies. This connection is
|
59 |
+
crucial for researchers aiming to apply theoretical insights in
|
60 |
+
practical contexts in financial enterprises with their existing
|
61 |
+
data.
|
62 |
+
- Retrieval Augmented Generation: The emergence of Large Language
|
63 |
+
Models, especially when using Retrieval Augmented Generation (RAG),
|
64 |
+
has the potential to transform financial data processing and
|
65 |
+
interpretation.
|
66 |
+
- Document Classification: With the surge in financial documents,
|
67 |
+
utilizing RAG to classify financial datasets based on FIBO concepts
|
68 |
+
may help financial analysts get better accuracy and depth in data
|
69 |
+
interpretation with smart prompting.
|
70 |
+
|
71 |
+
#### Building and Verification:
|
72 |
+
1. **Construction**: The ontology was imported using the
|
73 |
+
[AboutFIBOProd-IncludingReferenceData](https://github.com/edmcouncil/fibo/blob/master/AboutFIBOProd-IncludingReferenceData.rdf)
|
74 |
+
into Protege version 5.6.1.
|
75 |
+
2. **Reasoning**: Due to the large size of the ontology I used the ELK
|
76 |
+
reasoner plugin to materialize (make explicit) inferences in the
|
77 |
+
ontology.
|
78 |
+
3. **Coherence Check**: The Debug Ontology plugin in Protege was used
|
79 |
+
to ensure the ontology's coherence and consistency.
|
80 |
+
4. **Export**: After verification, inferred axioms, along with
|
81 |
+
asserted axioms and annotations, were exported using Protege.
|
82 |
+
5. **Encoding and Compression**: [Apache Jena's
|
83 |
+
riot](https://jena.apache.org/documentation/tools/) was used to convert the
|
84 |
+
result to ntriples, which was then compressed with gzip.
|
85 |
+
|
86 |
+
## Features
|
87 |
+
The FIBO dataset is composed of triples representing the relationships
|
88 |
+
between different financial concepts and named individuals such as
|
89 |
+
market participants, corporations, and contractual agents.
|
90 |
+
|
91 |
+
### Usage
|
92 |
+
First make sure you have the requirements installed:
|
93 |
+
|
94 |
+
```python
|
95 |
+
pip install datasets
|
96 |
+
pip install rdflib
|
97 |
+
```
|
98 |
+
|
99 |
+
You can load the dataset using the Hugging Face Datasets library with the following Python code:
|
100 |
+
|
101 |
+
```python
|
102 |
+
from datasets import load_dataset
|
103 |
+
dataset = load_dataset('wikipunk/fibo2023Q3', split='train')
|
104 |
+
```
|
105 |
+
|
106 |
+
#### Note on Format:
|
107 |
+
The subject, predicate, and object features are stored in N3 notation
|
108 |
+
with no prefix mappings. This allows users to parse each component
|
109 |
+
using `rdflib.util.from_n3` from the RDFLib Python library.
|
110 |
+
|
111 |
+
### Example
|
112 |
+
Here is an example of a triple in the dataset:
|
113 |
+
- Subject: `"<https://spec.edmcouncil.org/fibo/ontology/FBC/FunctionalEntities/MarketsIndividuals/ServiceProvider-L-JEUVK5RWVJEN8W0C9M24>"`
|
114 |
+
- Predicate: `"<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>`
|
115 |
+
- Object: `"<https://spec.edmcouncil.org/fibo/ontology/BE/FunctionalEntities/FunctionalEntities/FunctionalEntity>"`
|
116 |
+
|
117 |
+
This triple represents the statement that the market individual
|
118 |
+
"ServiceProvider-L-JEUVK5RWVJEN8W0C9M24" has a type of "FunctionalEntity".
|
119 |
+
|
120 |
+
---
|
121 |
+
|
122 |
+
## Ideas for Deriving Graph Neural Network Features from FIBO:
|
123 |
+
Graph Neural Networks (GNNs) have emerged as a powerful tool for
|
124 |
+
machine learning on structured data. FIBO, with its structured
|
125 |
+
ontology, can be leveraged to derive features for GNNs.
|
126 |
+
|
127 |
+
### Node Features:
|
128 |
+
|
129 |
+
- **rdf:type**: Each entity in FIBO has one or more associated `rdf:type`,
|
130 |
+
`<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>`, that
|
131 |
+
indicates its class or category. This can serve as a primary node
|
132 |
+
feature to encode.
|
133 |
+
|
134 |
+
- **Entity Attributes**: Attributes of each entity, such as names or
|
135 |
+
descriptions, can be used as additional node features. Consider
|
136 |
+
embedding descriptions using a semantic text embedding model.
|
137 |
+
|
138 |
+
### Edge Features:
|
139 |
+
|
140 |
+
- **RDF Predicates**: The relationships between entities in FIBO are
|
141 |
+
represented using RDF predicates. These predicates can serve as edge
|
142 |
+
features in a GNN, capturing the nature of the relationship between
|
143 |
+
nodes.
|
144 |
+
|
145 |
+
### Potential Applications:
|
146 |
+
|
147 |
+
1. **Entity Classification**: Using the derived node and edge
|
148 |
+
features, GNNs can classify entities into various financial
|
149 |
+
categories, enhancing the granularity of financial data analysis.
|
150 |
+
|
151 |
+
2. **Relationship Prediction**: GNNs can predict potential
|
152 |
+
relationships between entities, aiding in the discovery of hidden
|
153 |
+
patterns or correlations within the financial data.
|
154 |
+
|
155 |
+
3. **Anomaly Detection**: By training GNNs on the structured data from
|
156 |
+
FIBO and interlinked financial datasets, anomalies or
|
157 |
+
irregularities in them may be detected, ensuring data integrity and
|
158 |
+
accuracy.
|
159 |
+
|
160 |
+
### Acknowledgements
|
161 |
+
We extend our sincere gratitude to the FIBO contributors for their
|
162 |
+
meticulous efforts in knowledge representation. Their expertise and
|
163 |
+
dedication have been instrumental in shaping a comprehensive and
|
164 |
+
insightful framework that serves as a cornerstone for innovation in
|
165 |
+
the financial industry.
|
166 |
+
|
167 |
+
If you are interested in modeling the financial industry you should
|
168 |
+
consider [contributing to
|
169 |
+
FIBO](https://github.com/edmcouncil/fibo/blob/master/CONTRIBUTING.md).
|
170 |
+
|
171 |
+
### Citation
|
172 |
+
```bibtex
|
173 |
+
@misc{fiboQ32023,
|
174 |
+
title={Financial Industry Business Ontology (FIBO) Q32023 Release},
|
175 |
+
author={EDM Council and Various Contributors},
|
176 |
+
year={2023},
|
177 |
+
note={Derived from the AboutFIBOProd-IncludingReferenceData.rdf},
|
178 |
+
howpublished={\url{https://spec.edmcouncil.org/fibo/}},
|
179 |
+
license={MIT License, \url{https://opensource.org/licenses/MIT}}
|
180 |
+
}
|
181 |
+
```
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
rdflib>=6.0.0
|