Skip to content

Instantly share code, notes, and snippets.

View brpy's full-sized avatar

Bhargav v brpy

View GitHub Profile
class Speech2text(tf.keras.Model):
def __init__(self, vocab_size, lstm_units, rules):
super().__init__()
self.vocab_size = vocab_size
self.lstm_units= lstm_units
self.rule_data = rules # a dictionary
self.dense = Dense(vocab_size, activation="softmax")
def build(self, input_shape):
@brpy
brpy / response_coding.py
Last active January 25, 2021 12:36
Code for Response coding for binary/multi classification tasks using Python.
import numpy as np
import pandas as pd
# Column names of categorical features
categorical_features = (
"school_state",
"teacher_prefix",
"project_grade_category",
"clean_categories",
"clean_subcategories",