This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from autoviz.AutoViz_Class import AutoViz_Class | |
AV = AutoViz_Class() | |
df = AV.AutoViz('chronic_cleaned.csv',depVar='class') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sv_report = sv.analyze(df,"class") | |
#display the report | |
sv_report.show_html('eda.html') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sweetviz as sv | |
sv_report = sv.analyze(df) | |
#display the report | |
sv_report.show_html('eda.html') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pandas_profiling import ProfileReport | |
profile=ProfileReport(df) | |
profile.to_file('report.html') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
profile=ProfileReport(df,title='Chronic Kidney disease data profile',html={'style':{'full_width':True}}) | |
profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df=pd.read_csv('chronic_cleaned.csv') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from pandas_profiling import ProfileReport |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#transforming predicted values | |
inv_yhat = sc.inverse_transform(y_pred_test_gru) | |
#transforming actual values of test set | |
inv_ytest = sc.inverse_transform(y_test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model_gru.compile(loss=tf.keras.metrics.mean_squared_error, | |
metrics=[tf.keras.metrics.RootMeanSquaredError(name='rmse')], optimizer='adam') | |
early_stop = EarlyStopping(monitor='loss', patience=10, verbose=1) | |
history_model_gru = model_gru.fit(X_tr_t, y_train, epochs=100, batch_size=1, verbose=1, shuffle=False, callbacks=[early_stop]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras.layers import GRU | |
K.clear_session() | |
model_gru = Sequential() | |
model_gru.add(GRU(7, input_shape=(1, X_train.shape[1]), activation='linear', kernel_initializer='lecun_uniform', return_sequences=False)) | |
model_gru.add(Dense(1)) | |
model_gru.summary() |
NewerOlder