Skip to content

Scikit-Learn

Description

Scikit-Learn provides simple and efficient tools for data mining and data analysis, and is accessible to everybody. It is built on Numpy, Scipy and Matplotlib.

Access

Scikit-Learn is available on all HPRC clusters, including Grace, FASTER, ACES, and Launch. Scikit-Learn is open to all HPRC users.

Anaconda and Scikit-Learn Packages

To find what scikit-learn versions are available, use module spider:

module spider scikit-learn

To learn how to load a specific module version, use module spider:

module spider scikit-learn/1.4.0

You will need to load all module(s) on any one of the lines below before the "scikit-learn/1.4.0" module is available to load.

GCC/13.2.0

Read more about toolchains.

Finally, to load scikit-learn:

module load GCC/13.2.0 scikit-learn/1.4.0

To find what scikit-learn versions are available, use module spider:

module spider scikit-learn

To learn how to load a specific module version, use module spider:

module spider scikit-learn/1.2.1

You will need to load all module(s) on any one of the lines below before the "scikit-learn/1.2.1" module is available to load.

GCC/12.2.0

Read more about toolchains.

Finally, to load scikit-learn:

module load GCC/12.2.0 scikit-learn/1.2.1

To find what scikit-learn versions are available, use module spider:

module spider scikit-learn

To learn how to load a specific module version, use module spider:

module spider scikit-learn/1.3.1

You will need to load all module(s) on any one of the lines below before the "scikit-learn/1.3.1" module is available to load.

GCC/12.3.0

Read more about toolchains.

Finally, to load scikit-learn:

module load GCC/12.3.0 scikit-learn/1.3.1

To find what scikit-learn versions are available, use module spider:

module spider scikit-learn

To learn how to load a specific module version, use module spider:

module spider scikit-learn/1.3.1

You will need to load all module(s) on any one of the lines below before the "scikit-learn/1.3.1" module is available to load.

GCC/12.3.0

Read more about toolchains.

Finally, to load scikit-learn:

module load GCC/12.3.0 scikit-learn/1.3.1

You can learn more about the module system on our SW:Modules page.

Example Scikit-Learn Script

As with any job on the system, Scikit-Learn should be used via the submission of a job file. Scripts using Scikit-Learn are written in Python, and thus Scikit-Learn scripts should not be written directly inside a job file or entered in the shell line by line. Instead, a separate file for the Python/Scikit-Learn script should be created, which can then be executed by the job file.

To create a new script file, simply open up the text editor of your choice.

Below is an example script (for version 0.19.1) (entered in the text editor of your choice):

from sklearn import datasets
iris = datasets.load_iris()
digits = datasets.load_digits()
print(digits.data)
digits.target
digits.images[0]

It is recommended to save this script with a .py file extension, but not necessary.

Once saved, the script can be tested on a login node by entering:

[NetID@cluster ~]$ python testscript.py