本文整理汇总了Python中sklearn.mixture.GaussianMixture._estimate_weighted_log_prob方法的典型用法代码示例。如果您正苦于以下问题:Python GaussianMixture._estimate_weighted_log_prob方法的具体用法?Python GaussianMixture._estimate_weighted_log_prob怎么用?Python GaussianMixture._estimate_weighted_log_prob使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sklearn.mixture.GaussianMixture
的用法示例。
在下文中一共展示了GaussianMixture._estimate_weighted_log_prob方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: LinearDiscriminantAnalysis
# 需要导入模块: from sklearn.mixture import GaussianMixture [as 别名]
# 或者: from sklearn.mixture.GaussianMixture import _estimate_weighted_log_prob [as 别名]
X_score_tsne = tsne.fit_transform(X_score)
# ====== lda ====== #
lda = LinearDiscriminantAnalysis(n_components=NUM_DIM)
lda.fit(X_train, y_train)
X_train_lda = lda.transform(X_train)
X_score_lda = lda.transform(X_score)
# ====== plda ====== #
plda = PLDA(n_phi=NUM_DIM, random_state=SEED)
plda.fit(X_train, y_train)
X_train_plda = plda.predict_log_proba(X_train)
X_score_plda = plda.predict_log_proba(X_score)
# ====== gmm ====== #
gmm = GaussianMixture(n_components=NUM_DIM, max_iter=100, covariance_type='full',
random_state=SEED)
gmm.fit(X_train)
X_train_gmm = gmm._estimate_weighted_log_prob(X_train)
X_score_gmm = gmm._estimate_weighted_log_prob(X_score)
# ====== rbm ====== #
rbm = BernoulliRBM(n_components=NUM_DIM, batch_size=8, learning_rate=0.0008,
n_iter=8, verbose=2, random_state=SEED)
rbm.fit(X_train)
X_train_rbm = rbm.transform(X_train)
X_score_rbm = rbm.transform(X_score)
# ===========================================================================
# Deep Learning
# ===========================================================================
# ===========================================================================
# Visualize
# ===========================================================================
def plot(train, score, title, applying_pca=False):