2.1. pyke package¶
2.1.1. Subpackages¶
- 2.1.1.1. pyke.models package
- 2.1.1.1.1. Submodules
- 2.1.1.1.2. pyke.models.ComplEx module
- 2.1.1.1.3. pyke.models.DistMult module
- 2.1.1.1.4. pyke.models.HolE module
- 2.1.1.1.5. pyke.models.RESCAL module
- 2.1.1.1.6. pyke.models.TransD module
- 2.1.1.1.7. pyke.models.TransE module
- 2.1.1.1.8. pyke.models.TransH module
- 2.1.1.1.9. pyke.models.TransR module
- 2.1.1.1.10. pyke.models.base module
- 2.1.1.1.11. Module contents
2.1.2. Submodules¶
2.1.3. pyke.dataset module¶
2.1.4. pyke.embedding module¶
2.1.5. pyke.library module¶
-
class
pyke.library.
Library
[source]¶ Bases:
object
Manages the connection to the library.
-
CPP_BASE
= 'cpp_library/Base.cpp'¶
-
MAKE_SCRIPT
= 'cpp_library/make.sh'¶
-
static
compile_library
(destination: str)[source]¶ Compile the library to the path
destination
.Parameters: destination – path for the library
-
static
get_library
(temp_dir: str = None, library_name: str = None)[source]¶ Return the C++ library. The function compiles it if it doesn’t exist and it loads the library.
Parameters: - temp_dir – directory where the library is saved (optional)
- library_name – filename of the library
Returns: c++ library
-
library
= None¶
-
library_name
= 'pyke.so'¶
-
static
load_library
(path: str)[source]¶ Loads the library from path.
Parameters: path – path to the library (.so)
-
temp_dir
= '.pyke'¶
-
2.1.6. pyke.norm module¶
2.1.7. pyke.parser module¶
2.1.8. pyke.utils module¶
-
pyke.utils.
get_array_pointer
(a)[source]¶ Returns the address of the numpy array.
Parameters: a – Numpy array Returns: Memory address of the array