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

Needed to add more processing to the labels.

parent 8203bf64
Branches
No related merge requests found
......@@ -87,6 +87,25 @@ test_data = np.asarray(test_data).astype(np.float32)
print(train_labels.dtypes)
print(train_data.dtype)
#Need to do further data processing
plants = np.array(plants).astype((str))
uv = np.unique(plants)
#getting unique values to encode
print(uv)
print(encode.transform(plants[1]))
print(plants.shape)
#data_points = np.zeros((160,3,5))
#Need a 2 array
encoded = np.zeros((160,80))
for i in range(160):
encoded[i] = encode.transform(plants[i])
print(encoded)
encode = preprocessing.LabelEncoder()
encode.fit(uv)
print(encode.transform(uv))
#Splitting the dataset into testing & training
from sklearn.model_selection import train_test_split
......
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