Skip to content
Snippets Groups Projects
Commit 20e6b750 authored by Nancy Polanyk's avatar Nancy Polanyk
Browse files

First Build of the model to check data being read.

parent b4f43733
No related merge requests found
#Importing relevant libraries to build model
from keras.models import Sequential
from keras.layers import Dense, Embedding, Flatten, concatenate
#Processing data libraries
from keras.preprocessing.text import Tokenizer
from keras.utils import pad_sequences
import pandas as pd
import numpy as np
#Read data from CSV
data = pd.read_csv('plantdata.csv')
#Process the strings from the plantdata
max_words = 5000
max_length = 83
tokenizer = Tokenizer(num_words=max_words)
tokenizer.fit_on_texts(data[['pH String','Moisture']])
pH_array = tokenizer.texts_to_sequences(data['pH String'])
moisture_array = tokenizer.texts_to_sequences(data['Moisture'])
# pH_input = pad_sequences(pH_array, maxlen=max_length)
# moisture_input = pad_sequences(moisture_array, maxlen=max_length)
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment