Update 'train.py'
This commit is contained in:
parent
d67aec6747
commit
11768a9460
5
train.py
5
train.py
@ -1,15 +1,14 @@
|
|||||||
import pandas as pd
|
import pandas as pd
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
from sklearn.preprocessing import StandardScaler, OneHotEncoder
|
from sklearn.preprocessing import StandardScaler, OneHotEncoder
|
||||||
|
from sklearn.model_selection import train_test_split
|
||||||
|
from sklearn import preprocessing
|
||||||
|
|
||||||
water = pd.read_csv('waterQuality1.csv')
|
water = pd.read_csv('waterQuality1.csv')
|
||||||
|
|
||||||
water = water[water['is_safe'].apply(lambda x: str(x).isdigit())]
|
water = water[water['is_safe'].apply(lambda x: str(x).isdigit())]
|
||||||
water['is_safe'].value_counts()
|
water['is_safe'].value_counts()
|
||||||
|
|
||||||
|
|
||||||
from sklearn.model_selection import train_test_split
|
|
||||||
from sklearn import preprocessing
|
|
||||||
water_min_max = preprocessing.MinMaxScaler()
|
water_min_max = preprocessing.MinMaxScaler()
|
||||||
water_min_max = water_min_max.fit_transform(water)
|
water_min_max = water_min_max.fit_transform(water)
|
||||||
water_min_max = pd.DataFrame(water_min_max, columns=water.columns)
|
water_min_max = pd.DataFrame(water_min_max, columns=water.columns)
|
||||||
|
Loading…
Reference in New Issue
Block a user