Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# for MacOS
brew install wget
pip3 install vosk
pip3 install sounddevice
wget https://alphacephei.com/vosk/models/vosk-model-small-ja-0.22.zip
@tam17aki
tam17aki / krpd.py
Last active November 23, 2023 11:25
Outlier Detector based on Kernel Random Projection Depth (KRPD). https://arxiv.org/abs/2306.07056
# -*- coding: utf-8 -*-
"""Outlier Detector based on Kernel Random Projection Depth (KRPD).
Copyright (C) 2023 by Akira TAMAMORI
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@tam17aki
tam17aki / feat_speech_mos.ipynb
Created September 4, 2023 07:27
feat_speech_mos.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tam17aki
tam17aki / entropic_clustering_faster.py
Last active August 26, 2023 09:24
A demo script of "Differential Entropic Clustering of Multivariate Gaussians" in Python. This is a faster version thanks to numba and jit.
"""A demo script of "Differential Entropic Clustering of Multivariate Gaussians".
Copyright (C) 2023 by Akira TAMAMORI
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@tam17aki
tam17aki / entropic_clustering.py
Last active August 22, 2023 11:03
A demo script of "Differential Entropic Clustering of Multivariate Gaussians" in Python.
"""A demo script of "Differential Entropic Clustering of Multivariate Gaussians".
Copyright (C) 2023 by Akira TAMAMORI
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@tam17aki
tam17aki / gmhd_demo_many_datasets.ipynb
Last active December 16, 2023 14:51
Generalized Mahalanobis depth in the reproducing kernel Hilbert space (GMHD) in Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tam17aki
tam17aki / mhd_demo_many_datasets.ipynb
Last active December 16, 2023 14:54
mhd_demo_many_datasets.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tam17aki
tam17aki / mhd.py
Last active June 11, 2023 11:38
Mahalanobis Depth in Python.
# -*- coding: utf-8 -*-
"""Mahalanobis Depth."""
# Author: Akira Tamamori <tamamori5917@gmail.com>
# License: BSD 2 clause
from sklearn.covariance import EmpiricalCovariance, MinCovDet
from sklearn.utils import check_array, check_random_state
class MHD:
@tam17aki
tam17aki / gmhd.py
Last active June 11, 2023 11:39
Kernel mapped generalized Mahalanobis depth (kmGMHD) in Python.
# -*- coding: utf-8 -*-
"""Kernel mapped generalized Mahalanobis depth (kmGMHD).
"""
# Author: Akira Tamamori <tamamori5917@gmail.com>
# License: BSD 2 clause
from typing import NamedTuple, Union
import numpy as np
from sklearn.decomposition import KernelPCA
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.