Python neural network

Employer
no avatar
mer39
Description

.Build a RNN model, that will evaluate the sentiment of a text describing a product from the "mobile electronics" category. 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:

import tensorflow_datasets as tfds

ds=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, df variable will containa data frame with the text to be assessed in the short_review column and the sentiment scoring in the Sentiment column.

complete code using the Keras library implementing, training and testing at least 1modelsolving thegiven problem.

Published
on 2022-07-19
Required functions:
Python

Offers sent (3)

Budget
100.00 PLN
Copyright
-
Expires in
30 days