我一直在根据我想通过将参数布尔值传递给 false 来隐藏的列来隐藏表中的列。一切都工作正常,但问题是当我隐藏列时,整个表格看起来像是移到了左边,当我尝试隐藏 3 列或更多列时,它看起来更奇怪。我知道如何需要弄清楚并在隐藏需要隐藏的列后将表格带到容器的中心。我无法找到任何属性来在 jaspersoft 中进行此更改。请帮我做这件事。
我的桌子没有隐藏
隐藏列之后
我怎样才能使我的表格中心与相应乐队的容器对齐
我基本上是使用 mini_batch_kmeans 和 kmeans 算法对我的一些文档进行聚类。我只是按照教程是 scikit-learn 网站,其链接如下:http : //scikit-learn.org/stable/auto_examples/text/document_clustering.html
他们正在使用一些方法进行矢量化,其中之一是 HashingVectorizer。在 hashingVectorizer 中,他们使用 TfidfTransformer() 方法制作管道。
# Perform an IDF normalization on the output of HashingVectorizer
hasher = HashingVectorizer(n_features=opts.n_features,
stop_words='english', non_negative=True,
norm=None, binary=False)
vectorizer = make_pipeline(hasher, TfidfTransformer())
Run Code Online (Sandbox Code Playgroud)
一旦这样做,我从中得到的矢量化器就没有方法 get_feature_names()。但是由于我将它用于聚类,因此我需要使用此“get_feature_names()”来获取“条款”
terms = vectorizer.get_feature_names()
for i in range(true_k):
print("Cluster %d:" % i, end='')
for ind in order_centroids[i, :10]:
print(' %s' % terms[ind], end='')
print()
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个错误?
我的整个代码如下所示:
X_train_vecs, vectorizer = vector_bow.count_tfidf_vectorizer(_contents)
mini_kmeans_batch = MiniBatchKmeansTechnique()
# MiniBatchKmeans without the LSA dimensionality reduction
mini_kmeans_batch.mini_kmeans_technique(number_cluster=8, X_train_vecs=X_train_vecs, …Run Code Online (Sandbox Code Playgroud)