モデルによって音声合成の中でどこまでの仕事を担当しているかが異なる。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from sklearn.linear_model import SGDClassifier | |
from sklearn.cross_validation import StratifiedKFold | |
from sklearn.grid_search import GridSearchCV | |
class PUClassifier(object): | |
def __init__(self, trad_clf=None, n_folds=2): | |
self.trad_clf = trad_clf | |
self.n_folds = n_folds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from numpy import random | |
import seaborn as sns | |
from sklearn import metrics | |
from puwrapper import PUWrapper | |
from sklearn.linear_model import LogisticRegression,LogisticRegressionCV | |
sns.set_style("white") | |
random.seed(0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Implementation of Fastfood (Le, Sarlos, and Smola, ICML 2013). | |
Primarily by @esc (Valentin Haenel) and felixmaximilian | |
from https://github.com/scikit-learn/scikit-learn/pull/3665. | |
Modified by @dougalsutherland. | |
FHT implementation was "inspired by" https://github.com/nbarbey/fht. | |
''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$c | |
def turasa(status) | |
if status.text.include?("@murakamiginko tsurasa") then | |
text = status.text.sub("@murakamiginko tsurasa","") | |
$c += 1 | |
@rest_client.update_profile(:name => "kazoo#{$c.to_i}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding: utf-8 -*- | |
for n in 0...gets.to_i | |
print "「てら#{"あり" * n}w」" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- coding: utf-8 -*- | |
Plugin.create :jins_pc do | |
filter_message_background_color do | mp, color | | |
# 青成分を50%カット | |
[mp, [color[0],color[1],(color[2] * 0.5).to_i]] | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open util/ordering[Node] | |
sig Node { | |
lhs : lone Node, | |
rhs : lone Node | |
} | |
fact { | |
// 葉をたどればすべての要素が取得できるrootがただひとつ存在する | |
one root : Node | Node = root.*(lhs+rhs) | |
// 任意の節において成り立つ |
NewerOlder