# Generated by Django 2.1.14 on 2019-12-06 05:48

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    replaces = [('tagger', '0001_initial'), ('tagger', '0002_taggergroup_num_tags'), ('tagger', '0003_auto_20191113_1706'), ('tagger', '0004_auto_20191121_1406'), ('tagger', '0005_auto_20191125_0935'), ('tagger', '0006_tagger_model_size')]

    dependencies = [
        ('embedding', '0001_initial'),
        ('core', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Tagger',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=100)),
                ('query', models.TextField(default='{"query": {"match_all": {}}}')),
                ('fields', models.TextField(default='[]')),
                ('stop_words', models.TextField(default='[]')),
                ('vectorizer', models.CharField(default='Hashing Vectorizer', max_length=100)),
                ('classifier', models.CharField(default='Logistic Regression', max_length=100)),
                ('negative_multiplier', models.FloatField(blank=True, default=1.0)),
                ('maximum_sample_size', models.IntegerField(blank=True, default=10000)),
                ('score_threshold', models.FloatField(blank=True, default=0.0)),
                ('precision', models.FloatField(default=None, null=True)),
                ('recall', models.FloatField(default=None, null=True)),
                ('f1_score', models.FloatField(default=None, null=True)),
                ('num_features', models.IntegerField(default=None, null=True)),
                ('location', models.TextField()),
                ('plot', models.FileField(null=True, upload_to='data/media', verbose_name='')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('embedding', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='embedding.Embedding')),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Project')),
                ('task', models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.Task')),
            ],
        ),
        migrations.CreateModel(
            name='TaggerGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=1000)),
                ('fact_name', models.CharField(max_length=1000)),
                ('minimum_sample_size', models.IntegerField(default=50)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Project')),
                ('taggers', models.ManyToManyField(default=None, to='tagger.Tagger')),
                ('num_tags', models.IntegerField(default=0)),
            ],
        ),
        migrations.AlterField(
            model_name='tagger',
            name='stop_words',
            field=models.TextField(default=''),
        ),
        migrations.AlterField(
            model_name='tagger',
            name='classifier',
            field=models.CharField(default='Logistic Regression', max_length=1000),
        ),
        migrations.AlterField(
            model_name='tagger',
            name='description',
            field=models.CharField(max_length=1000),
        ),
        migrations.AlterField(
            model_name='tagger',
            name='vectorizer',
            field=models.CharField(default='Hashing Vectorizer', max_length=1000),
        ),
        migrations.AddField(
            model_name='tagger',
            name='num_negatives',
            field=models.IntegerField(default=None, null=True),
        ),
        migrations.AddField(
            model_name='tagger',
            name='num_positives',
            field=models.IntegerField(default=None, null=True),
        ),
        migrations.AddField(
            model_name='tagger',
            name='model_size',
            field=models.FloatField(default=None, null=True),
        ),
    ]
