Skip to content

KX Machine Learning library integration

KX Delta Platform offers full integration with the KX Machine Learning library through a KX Delta Platform asset package. The asset offers the full functionality of KxMl including the Machine Learning Toolkit, Natural Language Processing, and Automated Machine Learning modules.

The KxMl asset can be integrated on all Linux flavors supported by the KX Delta Platform including Ubuntu 20/22/24 and Red Hat 7/8/9.

Prerequisites

  • The KxMl asset requires Python - KDB+ integration through either PyKx or EmbedPy. KX Delta Platform supports the integration of both, with PyKx core package being the default. If you wish to use EmbedPy, before starting the install procedure replace the PyKx package from the KX Delta Platform bundle's packages directory with the embedPy Asset.

  • The KxMl asset comes with a requirements.txt file that contains the Python libraries that should be installed. These requirements can be auto-installed as part of the KX Delta Platform installation process. This can be configured through the KXML_INSTALL_REQUIREMENTS environment variable. Refer to the Installation section for more details.

  • The installation of the KxMl asset requires the ability to update the $QHOME with the necessary q libraries as part of the KX Delta Platform installation process.

  • Some functionality of the KxMl asset relies on the Keras python library which requires a CPU with AVX support.

Installation

The KxMl Platform asset is installed in the same way as all KX Delta Platform, KX Delta Platform assets and Solution packages are installed. Place the package in the relevant package directory and run through the installation script. For further details on KX Delta Platform and package deployment, refer to the Deployment guides.

By default, the Python requirements of the KxMl asset are set to be installed as part of the KX Delta Platform installation process. This feature can be turned off by adding KXML_INSTALL_REQUIREMENTS=NO to the install.config file within the bundle's script folder.

The Delta Platform PyKX package supports Python virtual environments. Refer to the PyKX installation section for details on using a virtual environment instead of the server's default Python.

Integration with KX Analyst

KxMl is fully integrated with the KX Analyst component of the KX Delta Platform. Run the following lines in an analyst session to load the required modules of KxMl: - Machine Learning Toolkit: \l ml/ml.q - Natural Language Processing: \l nlp/nlp.q - Automated Machine Learning: \l automl/automl.q

References

For more details on using the KX Machine Learning library, see: