You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-17Lines changed: 35 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,21 +71,25 @@ With -e pip will create links to the source folder so that changes to the code w
71
71
72
72
For simple usage, you can instantiate an Embedding object using one of the embeddings in the [data directory](src/elementembeddings/data/element_representations/README.md). For this example, let's use the magpie elemental representation.
73
73
74
-
```python
74
+
```pycon
75
75
# Import the class
76
76
>>> from elementembeddings.core import Embedding
77
77
78
78
# Load the magpie data
79
-
>>> magpie = Embedding.load_data('magpie')
79
+
>>> magpie = Embedding.load_data("magpie")
80
80
```
81
81
82
82
We can access some of the properties of the `Embedding` class. For example, we can find the dimensions of the elemental representation and the list of elements for which an embedding exists.
83
83
84
-
```python
84
+
```pycon
85
85
# Print out some of the properties of the ElementEmbeddings class
86
-
>>>print(f'The magpie representation has embeddings of dimension {magpie.dim}')
87
-
>>>print(f'The magpie representation contains these elements: \n{magpie.element_list}') # prints out all the elements considered for this representation
88
-
>>>print(f'The magpie representation contains these features: \n{magpie.feature_labels}') # Prints out the feature labels of the chosen representation
86
+
>>> print(f"The magpie representation has embeddings of dimension {magpie.dim}")
87
+
>>> print(
88
+
... f"The magpie representation contains these elements: \n{magpie.element_list}"
89
+
... ) # prints out all the elements considered for this representation
90
+
>>> print(
91
+
... f"The magpie representation contains these features: \n{magpie.feature_labels}"
92
+
... ) # Prints out the feature labels of the chosen representation
89
93
90
94
The magpie representation has embeddings of dimension 22
91
95
The magpie representation contains these elements:
@@ -102,26 +106,40 @@ We can quickly generate heatmaps of distance/similarity measures between the ele
102
106
from elementembeddings.plotter import heatmap_plotter, dimension_plotter
103
107
import matplotlib.pyplot as plt
104
108
105
-
magpie.standardise(inplace=True) # Standardises the representation
109
+
magpie.standardise(inplace=True) # Standardises the representation
Copy file name to clipboardExpand all lines: contributing.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Contributing
1
+
`# Contributing
2
2
3
3
This is a quick guide on how to follow best practice and contribute smoothly to `ElementEmbeddings`.
4
4
@@ -49,3 +49,4 @@ pre-commit run --all-files # optionally run hooks on all files
49
49
```
50
50
51
51
Pre-commit hooks will check all files when you commit changes, automatically fixing any files which are not formatted correctly. Those files will need to be staged again before re-attempting the commit.
@@ -8,25 +8,150 @@ For simple usage, you can instantiate an Embedding object using one of the embed
8
8
9
9
```python
10
10
# Import the class
11
-
>>>from elementembeddings.core import Embedding
11
+
from elementembeddings.core import Embedding
12
12
13
13
# Load the magpie data
14
-
>>>magpie = Embedding.load_data('magpie')
14
+
magpie = Embedding.load_data("magpie")
15
15
```
16
16
17
17
We can access some of the properties of the `Embedding` class. For example, we can find the dimensions of the elemental representation and the list of elements for which an embedding exists.
18
18
19
19
```python
20
20
# Print out some of the properties of the ElementEmbeddings class
21
-
>>>print(f'The magpie representation has embeddings of dimension {magpie.dim}')
22
-
>>>print(f'The magpie representation contains these elements: \n{magpie.element_list}') # prints out all the elements considered for this representation
23
-
>>>print(f'The magpie representation contains these features: \n{magpie.feature_labels}') # Prints out the feature labels of the chosen representation
24
-
25
-
The magpie representation has embeddings of dimension 22
26
-
The magpie representation contains these elements:
0 commit comments