Good Morning everyone, I hope you all doing great. I have a problem that appears when I use decision tree classifier. As you see in the topic, fit() is not working. It Is generating this error: ValueError: could not convert string to float: ‘donald trump do you remember the year since he was elected’ Note: ..
I’m building a machine learning model on some quantum state data for a project where I’ve developed my own activation function that I need to implement. It involves some complex factors that there are no ways to mathematically remove. I was able to build this activation function using numpy, shown below: import numpy as np ..
**I am trying to save the model for use it in the web application but I get this error ** X =  sentences = list(review_df[‘text’]) for sen in sentences: X.append(clean_text(sen)) y = review_df[‘Label’] y = np.array(list(map(lambda x: 1 if x=="fake" else 0, y))) #Text Classification with Recurrent Neural Network (LSTM) from keras.layers.recurrent import LSTM ..
I’m trying to translate this loss function formula in python for SVM L2 and I’m having a hard time. I want to focus on the red part. w_j is a vector of the shape (8,) from w of the shape (3073, 8) so from this j= 0 … 8 x_i is a vector of the ..
My train set is 307,511 rows and test set is 48,744. I combined them into one dataframe (named ‘data’) which is 356255 rows. I created a series that flags whether an item belongs to train or test set. trainlen = pd.Series(*len(train)+*len(test)) Its length is 356255, as expected. When I add it to the dataset I ..
data = pd.read_csv(‘mydata.data’) # get the labels Y=data[‘status’] # get all the features, which is not status nor name X=data[data.columns.difference([‘status’,’name’])] X_train, X_test, y_train, y_test =train_test_split(X,Y,random_state = 123, train_size=0.8, shuffle = True) mlp = MLPRegressor(hidden_layer_sizes=(5,20,50,100),activation="relu", solver=’sgd’,learning_rate=’constant’, learning_rate_init=0.001).fit(X_train, y_train) mlp.fit(X_train, y_train) mlp_predict = mlp.predict(X_train) I keep receiving errors for the precision score, recall and f1. It works ..
I want to know how can I expand the list of Feature of Importances to get the full list? I am using Visual Studio 2014 and Python 3.8. Any idea? Source: Python..
I am very new to all of this and this is actually the first ML model I am trying to train. The model is used to predict the sentiment of text. The trainingdata looks like this: id sentiment source text 0 123 1 x please help 1 124 0 x i am lost I followed ..
I am trying to Use GLCM for my image processing but when I load my image in to list and apply GLCM method I get ValueError: The parameter image must be a 2-dimensional array. Please check the attached images. everything above the highlighted part works perfectly but when I tried to run glcm part it ..
i want to make an Ai to learn to play a game but i dont know how to implement an environment for it because i only know how to use this for openai. i also want to know how can i get value from the game so i can choose rewards for the agent some ..