Category : machine-learning

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 ..

Read more

**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 ..

Read more

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 ..

Read more

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 ..

Read more