Web: https://www.reddit.com/r/MachineLearning/comments/sevl7q/p_how_can_you_use_gridsearchcv_to_find_the/

Jan. 28, 2022, 5:13 p.m. | /u/sangstar

Machine Learning reddit.com

I'm trying to use GridSearchCV to find the best hyperparameters for an LSTM model, including the best parameters for vocab size and the word embeddings dimension. First, I prepared my testing and training data..

x = df['tweet_text'] y = df['potentially_harmful'] from sklearn.model_selection import train_test_split x_train, x_test, y_train, y_test = train_test_split(x, y, test_size= 0.2, random_state=0) x_train= x_train.to_numpy().reshape(-1, 1) y_train= y_train.to_numpy().reshape(-1, 1) x_test = x_test.to_numpy().reshape(-1, 1) y_test = y_test.to_numpy().reshape(-1,1) 

And then I tried to create a model that I could …

embedding gridsearchcv lstm machinelearning

Data Analytics and Technical support Lead

@ Coupa Software, Inc. | Bogota, Colombia

Data Science Manager

@ Vectra | San Jose, CA

Data Analyst Sr

@ Capco | Brazil - Sao Paulo

Data Scientist (NLP)

@ Builder.ai | London, England, United Kingdom - Remote

Senior Data Analyst

@ BuildZoom | Scottsdale, AZ/ San Francisco, CA/ Remote

Senior Research Scientist, Speech Recognition

@ SoundHound Inc. | Toronto, Canada