Q1: Why do I meet a 'matplotlib' error when I invoke box_plot()?
- A1: This issue may be caused by matplotlib version mismatch.
The version of matplotlib required for hana-ml 2.6.201016 is 3.1.3 and the latest matplotlib version 3.3.2 will cause errors as some APIs have been modified. This issue has been fixed in hana-ml 2.6.20110600 which could work with matplotlib 3.3.2.
Q2: Why do I meet a error "'NoneType' object has no attribute 'connection'" when I use model storage functionality for ARIMA/AutoARIMA in predict function?
- A2: This issue has been fixed in hana-ml 2.6.20110600.
If you use a lower version of hana-ml, please use set_conn() explicitly after loading ARIMA/AutoARIMA model to set the connection to SAP HANA. ARIMA/AutoARIMA is a special case for model storage because it does not require data input for prediction.
Q3: Why do I meet a error "[WinError 126] The specified module could not be found" when I import hana-ml?
A3: This error happens for Windows users if they have installed Shapely with pip install command in the conda environment. Current solution is to use "conda install -c conda-forge shapely" to install Shapely.
Q4: What dependencies are required for hana-ml?
- A4: If you use pip command to install hana-ml, all dependencies from PyPI are installed by default.
Some special cases are listed as follows.
Graphviz. If you want to use TreeModelDebriefing function to visualize the tree model, please download from https://graphviz.org/download/ and install locally.
Shapely. If you want to use spatial and graph features, please install Shapely. If you use conda environment in Windows, please refer to Q3 for installation.
Q5： How to solve the garbled Chinese font problem (e.g. □□) when I use library 'Matplotlib'?
- A5: To solve the issue, you need to configure the Chinese font for Matplotlib. Please follow the steps below:
1. Download and unpack the Chinese font zip. https://github.com/be5invis/source-han-sans-ttf/releases/download/v2.002.1/source-han-sans-ttf-2.002.1.7z
Find the font file 'SourceHanSansSC-Normal.ttf'.
Copy this file to the path '~/site-packages/matplotlib/mpl-data/fonts/ttf'.
Restart your notebook to make it work.
Q6： Why the output of FeatureNormalizer and KBinsDiscretizer is not what I expect? For example, transformed value is a integer when a float is expected in FeatureNormalizer.
A6: In these two functions, the data type of the output value is the same as that of the input value. Therefore, if the data type of the original data is integer, the output value will be converted to an integer instead of the result you expect.
The solution is to cast the feature column(s) from INTEGER to DOUBLE before invoking these functions.