Giter Site home page Giter Site logo

split_groups's Introduction

Split groups

Takes a list of participants and splits into groups mixing/grouping specified categories.

Usage


usage: split_groups.py [-h] -n N_GROUPS [-i ITERATIONS] [-o OUTPUT] [-a]
                       [-m MIX_COLUMNS [MIX_COLUMNS ...]]
                       [-c CLUSTER_COLUMNS [CLUSTER_COLUMNS ...]]
                       participants

Takes a list of participants and splits into groups mixing/grouping specified
categories.

positional arguments:
  participants          tsv file containing list of participants.

optional arguments:
  -h, --help            show this help message and exit
  -n N_GROUPS           Number of groups to split.
  -i ITERATIONS         Number of iterations in the optimization process.
  -o OUTPUT             Output file with group number column appended.
  -a                    Use simulated annealing.
  -m MIX_COLUMNS [MIX_COLUMNS ...]
                        Mix groups by values found in the specified columns.
                        Useful to separate people belonging to the same
                        specified class. Use <column_index>:<weight> to
                        specify a weight for each column. If you want to group
                        classes instead of mixing them, use a negative weight.
  -c CLUSTER_COLUMNS [CLUSTER_COLUMNS ...]
                        Cluster similar values found in the specified columns.
                        Useful to get people with similar age together in the
                        same group. Use <column_index>:<weight> to specify a
                        weight for each column. If you want to disperse
                        instead of clustering values, use a negative weight.

Example

./split_groups.py participants.txt -n 3 -m 0:2 2:-0.3 -c 3 -i 1000 -o groups.txt

Divides participants in 3 groups, mixing column 0 categories with weight 2, column 2 categories with weight -0.3 (i.e. groups this category), cluster values in column 3 together. Uses 1000 iterations to optimize and outputs to file groups.txt

split_groups's People

Contributors

otavioalonso avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.