Skip to content

Instantly share code, notes, and snippets.

View AFAgarap's full-sized avatar

Abien Fred Agarap AFAgarap

View GitHub Profile
@AFAgarap
AFAgarap / gaussian-naive-bayes.ipynb
Last active March 31, 2018 06:00
A notebook for step-by-step explanation of the Gaussian Naive Bayes classification model.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AFAgarap
AFAgarap / capsLayer.py
Created November 26, 2017 16:10 — forked from debarko/capsLayer.py
CapsNet Capsule Definition
# It only has two dependencies numpy and tensorflow
import numpy as np
import tensorflow as tf
from config import cfg
# Class defining a Convolutional Capsule
# consisting of multiple neuron layers
#
@AFAgarap
AFAgarap / gru_svm_mnist.py
Last active September 30, 2017 13:06
Implementation of my proposed GRU+SVM model for Zalando's "fashion MNIST" dataset.
# Implementation of my proposed GRU+SVM model, for MNIST classification
# Copyright (C) 2017 Abien Fred Agarap
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@AFAgarap
AFAgarap / cubic-spline.py
Last active September 25, 2017 04:40
An implementation of the Natural Cubic Spline Algorithm.
# Copyright 2017 Abien Fred Agarap. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@AFAgarap
AFAgarap / polynomial-least-squares.py
Last active March 11, 2024 10:22
A program implementation of Polynomial Least Squares written in Python.
# Copyright 2017 Abien Fred Agarap. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@AFAgarap
AFAgarap / simple-bruteforce.py
Last active August 6, 2017 04:18
A simple bruteforce program for GPG-encrypted files with a 4-digit passphrase.
# Copyright 2017 Abien Fred Agarap. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@AFAgarap
AFAgarap / Euler.java
Last active November 26, 2017 16:15
Euler's Method for solving ODEs
/*
* Copyright 2017 Abien Fred Agarap
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@AFAgarap
AFAgarap / deep_net.py
Created October 9, 2016 17:40
Sample Deep Neural Network written in Python on top of TensorFlow
# Based on the tutorial by user `sentdex` : https://www.youtube.com/watch?v=PwAGxqrXSCs
import tensorflow as tf
'''
input -> weight -> hidden layer 1 (activation function) -> weight -> hidden layer 2 (activation function) -> weight -> output layer
'''
from tensorflow.examples.tutorials.mnist import input_data