<jupyter_start><jupyter_text>[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/QData/FastSK/blob/master/docs/2demo/fastDemo.ipynb) [![View Source on GitHub](https://img.shields.io/badge/github-view%20source-black.svg)](https://github.com/QData/FastSK/blob/master/docs/2demo/fastDemo.ipynb)<jupyter_code>!git clone --recursive https://github.com/QData/FastSK.git
%cd /content/FastSK
!pwd
!pip install -r requirements.txt
!pip install .<jupyter_output>fatal: destination path 'FastSK' already exists and is not an empty directory.
/content/FastSK
/content/FastSK
Requirement already satisfied: certifi==2020.4.5.1 in /usr/local/lib/python3.7/dist-packages (from -r requirements.txt (line 1)) (2020.4.5.1)
Requirement already satisfied: joblib==0.14.1 in /usr/local/lib/python3.7/dist-packages (from -r requirements.txt (line 2)) (0.14.1)
Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from -r requirements.txt (line 3)) (1.19.5)
Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from -r requirements.txt (line 4)) (1.1.5)
Requirement already satisfied: python-dateutil==2.8.1 in /usr/local/lib/python3.7/dist-packages (from -r requirements.txt (line 5)) (2.8.1)
Requirement already satisfied: pytz==2019.3 in /usr/local/lib/python3.7/dist-packages (from -r requirements.txt (line 6)) (2019.3)
Requirement already satisfied: scikit-learn in /usr/local/lib/python3.7/dist-packages (from -r [...]<jupyter_text>FastSK DemoHere is a quick tutorial on how to use the methods in FastSK package.<jupyter_code>from fastsk import FastSK

kernel= FastSK(g=3, m=2)

Xtrain = [[1,0,1,0,1], [1,1,1,0,1]]
Xtest = [[1,1,1,1,1], [1,0,1,0,1]]

kernel.compute_kernel(Xtrain, Xtest)

train_kernel = kernel.get_train_kernel()
test_kernel = kernel.get_test_kernel()


import seaborn as sns
import matplotlib.pyplot as plt

heat_map = sns.heatmap(train_kernel)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15388446215139442, 'fraction_numerical': 0.045318725099601595, 'mean_word_length': 5.200617283950617, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '360978', 'license': 'Apache-2.0', 'n_tokens_mistral': 777, 'n_tokens_neox': 736, 'n_words': 157, 'path': 'docs/2demo/fastDemo.ipynb', 'repo_name': 'k-ivey/FastSK', 'size': '2008'}