Esempio n. 1
0
import kmeans

from sklearn import cross_validation, ensemble, metrics, svm

import random_search as rs

num_components = 128 # rs.pick_one(64, 128)()
# patch_height = int(np.round(rs.uniform(0.2, 1.0)() * (num_components/2 + 1)))
patch_height = int(np.round(rs.uniform(0.5, 1.0)() * (num_components/2 + 1)))

settings = {
    # prepro + specgram extraction
    'normalise_volume': True,
    'specgram_num_components': num_components,
    'specgram_redundancy': rs.pick_one(2, 4)(), # 1 is no overlap between successive windows, 2 is half overlap, 4 is three quarter overlap
    'log_scale': rs.log_uniform(10**0, 10**1)(), # rs.log_uniform(10**0, 10**2)(), # rs.log_uniform(10**-1, 10**6)(),

    # local specgram normalisation
    'lnorm': True, # rs.pick_one(True, False)(),
    'lnorm_sigma_mean': rs.log_uniform(2, 8)(),
    'lnorm_sigma_std': rs.log_uniform(3, 7)(), # rs.log_uniform(2, 8)(),

    # patch extraction
    'patch_height': patch_height, # number of spectrogram components
    'patch_width': rs.uniform_int(6, 16)(), # number of timesteps
    'num_patches_for_learning': 100000,

    # whitening
    'retain': 1 - rs.log_uniform(10**-1, 10**-5)(),
    'pca_bias': 0.0001,
Esempio n. 2
0
from sklearn import cross_validation, ensemble, metrics, svm

import random_search as rs

num_components = 128  # rs.pick_one(64, 128)()
# patch_height = int(np.round(rs.uniform(0.2, 1.0)() * (num_components/2 + 1)))
patch_height = int(np.round(rs.uniform(0.5, 1.0)() * (num_components / 2 + 1)))

settings = {
    # prepro + specgram extraction
    'normalise_volume': True,
    'specgram_num_components': num_components,
    'specgram_redundancy': rs.pick_one(2, 4)(
    ),  # 1 is no overlap between successive windows, 2 is half overlap, 4 is three quarter overlap
    'log_scale': rs.log_uniform(10**0, 10**1)
    (),  # rs.log_uniform(10**0, 10**2)(), # rs.log_uniform(10**-1, 10**6)(),

    # local specgram normalisation
    'lnorm': True,  # rs.pick_one(True, False)(),
    'lnorm_sigma_mean': rs.log_uniform(2, 8)(),
    'lnorm_sigma_std': rs.log_uniform(3, 7)(),  # rs.log_uniform(2, 8)(),

    # patch extraction
    'patch_height': patch_height,  # number of spectrogram components
    'patch_width': rs.uniform_int(6, 16)(),  # number of timesteps
    'num_patches_for_learning': 100000,

    # whitening
    'retain': 1 - rs.log_uniform(10**-1, 10**-5)(),
    'pca_bias': 0.0001,
import kmeans

from sklearn import cross_validation, ensemble, metrics, svm

import random_search as rs

num_components = rs.pick_one(64, 128)()
patch_height = int(np.round(rs.uniform(0.2, 1.0)() * (num_components/2 + 1)))

settings = {
    # prepro + specgram extraction
    'normalise_volume': True,
    'specgram_num_components': num_components,
    'specgram_redundancy': rs.pick_one(2, 4)(), # 1 is no overlap between successive windows, 2 is half overlap, 4 is three quarter overlap
    'log_scale': rs.log_uniform(10**-1, 10**6)(),

    # patch extraction
    'patch_height': patch_height, # number of spectrogram components
    'patch_width': rs.uniform_int(6, 16)(), # number of timesteps
    'num_patches_for_learning': 100000,

    # whitening
    'retain': 1 - rs.log_uniform(10**-1, 10**-5)(),
    'pca_bias': 0.0001,

    # kmeans
    'num_means': 1000,

    # extraction
    'threshold': rs.pick_one(None, rs.uniform(0.0, 3.0)())(),
Esempio n. 4
0
import kmeans

from sklearn import cross_validation, ensemble, metrics, svm

import random_search as rs

num_components = rs.pick_one(64, 128)()
patch_height = int(np.round(rs.uniform(0.2, 1.0)() * (num_components / 2 + 1)))

settings = {
    # prepro + specgram extraction
    'normalise_volume': True,
    'specgram_num_components': num_components,
    'specgram_redundancy': rs.pick_one(2, 4)(
    ),  # 1 is no overlap between successive windows, 2 is half overlap, 4 is three quarter overlap
    'log_scale': rs.log_uniform(10**-1, 10**6)(),

    # patch extraction
    'patch_height': patch_height,  # number of spectrogram components
    'patch_width': rs.uniform_int(6, 16)(),  # number of timesteps
    'num_patches_for_learning': 100000,

    # whitening
    'retain': 1 - rs.log_uniform(10**-1, 10**-5)(),
    'pca_bias': 0.0001,

    # kmeans
    'num_means': 1000,

    # extraction
    'threshold': rs.pick_one(None,