Skip to content

Using GMM and KMeans implemented with julia do location prediction.

License

Notifications You must be signed in to change notification settings

zzp1012/GMM-KMeans-clustering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jilogo

GMM KMeans Clustering

SU 2020


Abstract

Once we open source the code and if you want to refer to our work, please follow the Joint Institute’s honor code and don’t plagiarize these codes directly.

Introduction

Please refer to project file.

Code Style

Example:

def sch_random(round_idx, time_counter):
    # set the seed
    np.random.seed(round_idx)

    # random sample clients
    cars = list(channel_data[channel_data['Time'] == time_counter]['Car'])
    client_indexes = []
    if cars:
        client_indexes = list(np.random.choice(cars, max(int(len(cars) / 2), 1), replace=False).ravel())
    logger.info("client_indexes = " + str(client_indexes) + "; time_counter = " + str(time_counter))

    # random local iterations
    local_itr = np.random.randint(2) + 1

    s_client_indexes = str(list(client_indexes))[1:-1].replace(',', '')
    s_local_itr = str(local_itr)

    return s_client_indexes + "," + s_local_itr
  1. Plz avoid meaningless combination of letters like a or abc when naming variables. Name of variable should be meaningful.
  2. Plz add appropriate indentation and blank lines to your code.
  3. Plz add enough comments to help others understand your code.
  4. If there is any hyper parameter in your code or global parameter, plz use argparse or create another file called config.py to store them. For example, config.py and argparse

Git Usage

Here are some simple instructions about how to use Git.

  1. If you want to download the whole project, run following command.
git clone https://github.com/zzp1012/VE370-Project2.git
  1. If you want add files to our local git project and remote git project on github, run following command.
# Firstly, plz avoid adding files to master branch on github directly. You can create your own branch locally and remotely.

git branch zzp1012 # create my local branch. Here I name the branch as 'zzp1012'. If you have already created a branch, you can jump to next command.

git checkout zzp1012 # switch to 'zzp1012' branch.

git add * # add all the files to local branch 'zzp1012'.

git commit -m "update" # confirm to add files to local branch 'zzp1012'

git push origin zzp1012 # create branch 'zzp1012' remotely on github and copy your the content on your local branch 'zzp1012' to the remote 'zzp1012'.
  1. If you want to synchronize files on remote project on github, you should run:
git pull origin master # synchronize files on remote master branch.
git pull origin "you branch name" # the 'master' can be replaced by the name of the other branch created on remote project on github, then you can synchronize files on the specific remote branch.

UM-SJTU Joint Institute 交大密西根学院

About

Using GMM and KMeans implemented with julia do location prediction.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published