AiLearning:数据分析+机器学习实战+线性代数+PyTorch+NLTK+TF2
python
nlp
svm
scikit-learn
sklearn
regression
logistic
dnn
lstm
pca
rnn
deeplearning
kmeans
adaboost
apriori
fp-growth
svd
naivebayes
mahchine-leaning
recommendedsystem
-
Updated
Mar 19, 2022 - Python
Hi I would like to propose a better implementation for 'test_indices':
We can remove the unneeded np.array casting:
Cleaner/New:
test_indices = list(set(range(len(texts))) - set(train_indices))
Old:
test_indices = np.array(list(set(range(len(texts))) - set(train_indices)))