Please if this install works or you find it helpful, make a comment and star so that this gist can propogate to help others.
We are going to install rust, clang and the latest redis, along with additional utilities described below.
| from keras.layers import Input, Dense, BatchNormalization | |
| from keras.models import Model | |
| from keras.callbacks import EarlyStopping | |
| # set input layer | |
| inputs = Input(shape=(X_train.shape[1],), name='input') | |
| # normalized the batches | |
| x = BatchNormalization(name='input_bn')(inputs) |
| import lime | |
| import lime.lime_tabular | |
| import pandas as pd | |
| import numpy as np | |
| import lightgbm as lgb | |
| # For converting textual categories to integer labels | |
| from sklearn.preprocessing import LabelEncoder |
| def apk(actual, predicted, k=3): | |
| """ | |
| Computes the average precision at k. | |
| This function computes the average prescision at k between two lists of | |
| items. | |
| Parameters | |
| ---------- | |
| actual : list | |
| A list of elements that are to be predicted (order doesn't matter) | |
| predicted : list |
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Thu Mar 17 00:50:16 2016 | |
| @author: Bernard | |
| """ | |
| from pandas import Series, DataFrame | |
| import pandas as pd | |
| import numpy as np |