<commit_before>"""Command line tool to plot classifiers decision boundary on 2D samples.

Usage:
    $ python3 -m legendary_potato.graph [classifier]
"""
import argparse
import random
from itertools import product

import numpy as np
import pandas as pd

from legendary_potato import classifiers


def comparision_plot(classifs=None, *args, **kwargs):
    """Plot 2D decision lines for classifiers.
    """
    if classifs is None:
        classifs = ("SVDD",)

    # generate sample
    random.seed("legendary")
    samp_size = 68
    X = [
        [random.normalvariate(-1, 0.5), random.normalvariate(1, 0.5)]
        for _ in range(samp_size)
    ]
    X.extend(
        [
            [random.uniform(-1, 2), random.uniform(0, 1)]
            for _ in range(samp_size)
        ]
    )<commit_msg>[GRAPH] Reduce training set size<commit_after>"""Command line tool to plot classifiers decision boundary on 2D samples.

Usage:
    $ python3 -m legendary_potato.graph [classifier]
"""
import argparse
import random
from itertools import product

import numpy as np
import pandas as pd

from legendary_potato import classifiers


def comparision_plot(classifs=None, *args, **kwargs):
    """Plot 2D decision lines for classifiers.
    """
    if classifs is None:
        classifs = ("SVDD",)

    # generate sample
    random.seed("legendary")
    samp_size = 35
    X = [
        [random.normalvariate(-1, 0.5), random.normalvariate(1, 0.5)]
        for _ in range(samp_size)
    ]
    X.extend(
        [
            [random.uniform(-1, 2), random.uniform(0, 1)]
            for _ in range(samp_size)
        ]
    )
{'fraction_non_alphanumeric': 0.10513296227581942, 'fraction_numerical': 0.01855287569573284, 'mean_word_length': 2.7367205542725173, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '791580', 'n_tokens_mistral': 530, 'n_tokens_neox': 498, 'n_words': 150}