{"id":13653521,"url":"https://github.com/ComputerVisionLaboratory/cvlab_toolbox","last_synced_at":"2025-04-23T06:31:52.358Z","repository":{"id":79294056,"uuid":"105734490","full_name":"ComputerVisionLaboratory/cvlab_toolbox","owner":"ComputerVisionLaboratory","description":"CVLAB's tool box","archived":false,"fork":false,"pushed_at":"2023-08-02T04:52:47.000Z","size":19059,"stargazers_count":13,"open_issues_count":1,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-10T04:36:29.700Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ComputerVisionLaboratory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-10-04T05:24:14.000Z","updated_at":"2024-06-25T07:36:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"b259f344-0183-4f8b-942d-2fb1c59c2678","html_url":"https://github.com/ComputerVisionLaboratory/cvlab_toolbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComputerVisionLaboratory%2Fcvlab_toolbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComputerVisionLaboratory%2Fcvlab_toolbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComputerVisionLaboratory%2Fcvlab_toolbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComputerVisionLaboratory%2Fcvlab_toolbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ComputerVisionLaboratory","download_url":"https://codeload.github.com/ComputerVisionLaboratory/cvlab_toolbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250385174,"owners_count":21421872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T02:01:12.031Z","updated_at":"2025-04-23T06:31:47.337Z","avatar_url":"https://github.com/ComputerVisionLaboratory.png","language":"Python","readme":"# cvlab_toolbox\nThis is the repository of CVLAB toolbox\n\n\n## Usage\n- Scikit-learn API\n```python\nimport numpy as np\nfrom numpy.random import randint, rand\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import accuracy_score\nfrom cvt.models import KernelMSM\n\ndim = 100\nn_class = 4\nn_train, n_test = 20, 5\n\n# input data X is list of vector sets (list of 2d-arrays)\nX_train = [rand(randint(10, 20), dim) for i in range(n_train)]\nX_test = [rand(randint(10, 20), dim) for i in range(n_test)]\n\n# labels y is 1d-array\ny_train = randint(0, n_class, n_train)\ny_test = randint(0, n_class, n_test)\n\nmodel = KernelMSM(n_subdims=3, sigma=0.01)\n# fit\nmodel.fit(X_train, y_train)\n# predict\npred = model.predict(X_test)\n\nprint(accuracy_score(pred, y_test))\n\n```\n\n## Install\n- pip\n```bash\npip install -U git+https://github.com/ComputerVisionLaboratory/cvlab_toolbox\n```\n\n## Coding styles\n- Follow `PEP8` as much as possible\n  - [English](https://www.python.org/dev/peps/pep-0008/)\n  - [日本語](http://pep8-ja.readthedocs.io/ja/latest/)\n- Write a description as **docstring**\n  ```python\n  def PCA(X, whiten = False):\n    '''\n      apply PCA\n      components, explained_variance = PCA(X)\n\n      Parameters\n      ----------\n      X: ndarray, shape (n_samples, n_features)\n        matrix of input vectors\n\n      whiten: boolean\n        if it is True, the data is treated as whitened\n        on each dimensions (average is 0 and variance is 1)\n\n      Returns\n      -------\n      components: ndarray, shape (n_features, n_features)\n        the normalized component vectors\n\n      explained_variance: ndarray, shape (n_features)\n        the variance of each vectors\n    '''\n\n    ...\n  ```\n\n## Contribution rules\n1. Make a pull request\n2. Ask some lab members to review the code\n3. when all agreements are taken, ask any admin member to merge it\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FComputerVisionLaboratory%2Fcvlab_toolbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FComputerVisionLaboratory%2Fcvlab_toolbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FComputerVisionLaboratory%2Fcvlab_toolbox/lists"}