Category : ktrain

i am trying to use deep learning model in order to create sentiment analysis project. For this i am using the ktrain package but the problem is in the preprocess_train() The above function takes as parameters def preprocess_train(texts, y=None, mode=’train’, verbose=1) Args: texts (list of strings): text of documents y: labels mode (str): If ‘train’ ..

Read more

I am creating a sentiment analysis project using Bert transformers and using ktrain package the dataset is unbalanced so i use SMOTE package to oversampling. I am using Google Colab The problem is when i try to apply the ktrain functions like preprocess_train() the system crash and display the below error : preprocessing train… ————————————————————————— ..

Read more

I’m trying to plot a precision recall curve for binary text classification using ktrain (wrapper for BERT) and getting the following error ————————————————————————— ValueError Traceback (most recent call last) <ipython-input-142-9069d96b6d6b> in <module> —-> 1 disp = plot_precision_recall_curve(predictor, df_testing.description.values, df_testing.pred_class) 2 disp.ax_.set_title(‘2-class Precision-Recall curve: ‘ 3 ‘AP={0:0.2f}’.format(average_precision)) C:condalibsite-packagessklearnmetrics_plotprecision_recall_curve.py in plot_precision_recall_curve(estimator, X, y, sample_weight, response_method, name, ax, ..

Read more

I am trying to install the ktrain package in Python (Using Jupyter Notebook) and I get a huge set of errors every time. I am on a Windows 10 laptop (if that contributes). As of now, my code in jupyter has only had one line: !pip install ktrain I have Python 3.9 installed from python.org ..

Read more

I am trying to solve a multi-class problem using BERT model. But, I would not able to visualize the validation loss and validation accuracy. Moreover, I have included the validation data as val_data = (x_val, y_val). But, the model automatically takes test data only val_data = (x_test, y_test) and it is also not mentioned in ..

Read more

How can we use a different pretrained model for the text classifier in the ktrain library? When using: model = text.text_classifier(‘bert’, (x_train, y_train) , preproc=preproc) This uses the multilangual pretrained model However, I want to try out a monolingual model as well. Namely the Dutch one: ”wietsedv/bert-base-dutch-cased’, which is also used in other k-train implementations, ..

Read more