GSoC - III
17 Jul 2017Hi guys,
I am done with week 5-6, and here is a brief summary of the development work done.
For detailed daily reports, please look here
-
For covering examples which can be demonstrated through the jupyter approach, I have investigated the source code of the following models:
- Linear Regression
- Ridge Regression
- Kernel Ridge Regression
- SVR
- KMeans Clustering
- Naive Bayes
-
Also have written the PIMS implementation of the model’s examples, along with the original python script. These have been committed on the forge at this link.
-
All these model attributes have been retrieved from the Jupyter server in the python implementation. For the transfer of learned model attributes from jupyter server to the local machine, I have considered using ‘pickle’ library to store the numpy objects in a ‘.p’ file.Here are few rough steps to achieve this:
- After training is complete and attributes.p file is saved on remote server.
- The pickle file will be transferred to the local machine at a location specified using the IP and working directory of the local machine.
- Here the python_local.py will extract the attributes from the pickle file
- and send these attributes to Scilab.
-
So pickle will be able to handle steps 1 and 3 mentioned above.
-
For now I have read the pickle usage documentation for saving and loading python objects in different python instance. And was able to demonstrate this for ML model attributes through the kernel_ridge regression example. I have committed the sample code here.
-
For step 2, we need to use a ssh protocol for sending the pickle file back to the local machine. For this I was considering usage of a python package like paramiko or fabric for it.
-
In the discussion with Philippe Saade about these protocols, “sshfs” was suggested if both client and server machines are linux based. But in my case I have a Windows and a Linux machine , so it would be better to use Samba on the server and allow folder sharing, as Philippe suggested. Also this would be more suitable for the general usage of Scilab by Windows and Linux users alike.
-
I will reading more about them , along with covering more scikit-learn classes for the jupyter approach.