This is a template for IntegratedML - InterSystems Github repository.
This repository comes with a few example Jupyter notebooks (http://jupyter.org) which demonstrate how to use IntegratedML in InterSystems IRIS Community Edition (Advanced Analytics including IntegratedML) in a docker container.
What is IntegratedML?
IntegratedML is a feature of the InterSystems IRIS data platform that brings machine learning to SQL developers.
- all-SQL -- Build and train machine learning models using intuitive custom SQL commands, fully integrated within the InterSystems IRIS SQL processor
- turnkey -- no packages or programming languages to learn, nothing to install
- modular -- leverages "best of breed" open source and proprietary AutoML frameworks
Learn more about InterSystems IRIS and IntegratedML at the InterSystems Learning site
What's inside this template
Pre-configured environment, and sample data
This template creates a docker environment (via "docker-compose up") of 2 pre-configured containers:
- tf2jupyter: Jupyter+Tensorflow2.2(without GPU), with a few sample notebook files (in its Dockerfile)
- irisimlsvr another one for an IRIS 2020.3 Community Edition, with pre-loaded sample data in USER namespace(see its Dockerfile and iris.script that is run at startup)
Sample notebooks to get you started
3 sample notebook files -- by default this template starts Jupyter at http://localhost:8896/tree :
- campaign-integratedml-jdbc.ipynb: A simple JDBC connection from tf2jupyter into a sample data table (Marketing Campaign data) within InterSystems IRIS's USER namespace, showing some use of IntegratedML including VALIDATE MODEL command usage.
- readmission-integratedml-jdbc.ipynb: Demonstrates use of IntegratedML on a hospital readmission prediction dataset.
- biomedical-integratedml-PyODBC.ipynb: Connection to InterSystems IRIS server over PyODBC, building and using an IntegratedML machine learning mode, with a complex SQL query using the PREDICT() and PROBABILITY() IntegratedML SQL functions.
Demo environment topology
Make sure you have git and Docker desktop installed.
This template is tested breifly on AWS Ubuntu, Mac OS, and Windows 10(using Docker Toolbox only). It should work on other Docker environment too - let us know if you encounter any issues.
Clone/git pull the repo into any local directory
$ git clone https://github.com/intersystems-community/integratedml-demo-template.git
Open a Docker terminal in this directory and run:
$ docker-compose build
- Run the IRIS container, and Jupyter notebook server images:
$ docker-compose up -d
- Open browser to access the notebooks
docker-compose ps to confirm tf2juyter's ports; make sure right localhost port is used if over SSL tunneling to remotehost)
- Examine the test data with webterminal
Open terminal with: SuperUser / SYS credentials
Enter /sql mode and make SQL queries to examine data in IRIS.
How to develop your IntegragedML solution with the IntegratedML Template Repository
Use this template
Click the button "Use this template" on Github to create a new repository which will be the copy of this one.
Checkout the repo
Clone your new repo to a local folder.
Install VSCode, Docker Desctop and ObjectScript plugin and open the folder in VSCode.
Import your data as listed below, rebuild containers to let the data be imported, and use IntegratedML via SQL tools, as described in Jupyter notebooks.
How to Import data into InterSystems IRIS
Importing data from CSV file
- Add csv file into the repository, e.g. like this titanic.csv
- Introduce an import data call into your IRIS initalisation script.
This is an example line to import titanic.csv into IRIS User.Passengers class along with data.
- Query the data from any SQL tool, web terminal or from InterSystems ObjectScript with:
SELECT * From Passengers
Importing data from CSV URL
If your file is accessible remotely, you can import it as follows:
- Add the import CSV from URL line into iris.script.
Here is an example line to import countries.csv data from URL
- Rebuild the docker image (the easiest way is to rebuild via docker-compose --
docker-compose build). This will create User.Countries class and import data which you can query with SQL from Countries table:
SELECT * FROM COUNTRIES