Job description
Build a neural network model, that will evaluate the sentiment of a text describing a product from the "mobile electronics" category.
Use one of the pre-trained Transformer-based models as embedding source.
Perform model training on the data contained in the "amazon_us_reviews" file available in the TensorFlow library
.Hint: to load the data from use the following commands:importtensorflow_datasetsastfdsds=tfds.load('amazon_us_reviews/Mobile_Electronics_v1_00',split='train',shuffle_files=True)df=tfds.as_dataframe(ds)df["Sentiment"]=df["data/star_rating"].apply(lambdascore:"positive"ifscore>=3else"negative")df['Sentiment']=df['Sentiment'].map({'positive':1,'negative':0})df['short_review']=df['data/review_body'].str.decode("utf-8")df=dfhttp://"short_review","Sentiment"
As a result, dfvariable will containa data frame with the text to be assessed in the short_review column and the sentiment scoring in the Sentimentcolumn. As a solution to the problem, send the Jupyter Notebook / Jupyter Lab / Colaboratory file containing:
• complete code written in Python using the Keras/TensorFlowlibrary implementing, training and testing at least 1model solving the given problem.