Skip to content

Instantly share code, notes, and snippets.

View sid321axn's full-sized avatar
🎯
Focusing

Manu Siddhartha sid321axn

🎯
Focusing
View GitHub Profile
from autoviz.AutoViz_Class import AutoViz_Class
AV = AutoViz_Class()
df = AV.AutoViz('chronic_cleaned.csv',depVar='class')
sv_report = sv.analyze(df,"class")
#display the report
sv_report.show_html('eda.html')
import sweetviz as sv
sv_report = sv.analyze(df)
#display the report
sv_report.show_html('eda.html')
from pandas_profiling import ProfileReport
profile=ProfileReport(df)
profile.to_file('report.html')
profile=ProfileReport(df,title='Chronic Kidney disease data profile',html={'style':{'full_width':True}})
profile
df=pd.read_csv('chronic_cleaned.csv')
import pandas as pd
from pandas_profiling import ProfileReport
#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)
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])
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()