Skip to content

Instantly share code, notes, and snippets.

View JaeDukSeo's full-sized avatar
🙏
Praying

J JaeDukSeo

🙏
Praying
View GitHub Profile
@JaeDukSeo
JaeDukSeo / README-Template.md
Created March 11, 2017 01:58 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@JaeDukSeo
JaeDukSeo / README-Template.md
Created March 11, 2017 01:58 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@JaeDukSeo
JaeDukSeo / README.md
Created April 28, 2017 04:05 — forked from zenorocha/README.md
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@JaeDukSeo
JaeDukSeo / nn.py
Created October 30, 2017 00:08 — forked from ottokart/nn.py
3-layer neural network example with dropout in 2nd layer
# Tiny example of 3-layer nerual network with dropout in 2nd hidden layer
# Output layer is linear with L2 cost (regression model)
# Hidden layer activation is tanh
import numpy as np
n_epochs = 100
n_samples = 100
n_in = 10
n_hidden = 5
@JaeDukSeo
JaeDukSeo / fashion_mnist_theano.py
Created November 11, 2017 17:02 — forked from tomokishii/fashion_mnist_theano.py
fashion_mist_theano.py - one another mnist (fashion mnist) classification code using Theano. (Goodbye Theano!)
#
# fashion_mnist_theano.py
# date. 10/2/2017
#
# REM: I read the article for stopping development of "THEANO".
# The deep learning framework stimulated me and made me write codes.
# I'd like to say thank you to Theano supporting team.
#
import os
from sklearn import datasets
from sklearn.model_selection import train_test_split
from sklearn.model_selection import cross_val_score
X, y = datasets.make_classification(n_samples=10000, n_features=20,
n_informative=2, n_redundant=10,
random_state=42)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3,
random_state=42)
# code: https://github.com/dmlc/xgboost/blob/master/demo/gpu_acceleration/cover_type.py
import xgboost as xgb
import numpy as np
from sklearn.datasets import fetch_covtype
from sklearn.model_selection import train_test_split
import time
# Fetch dataset using sklearn
cov = fetch_covtype()
X = cov.data
import numpy as np
np.set_printoptions(2)
ground_truth_prob = np.random.rand(10)
number_of_levers_count = np.zeros(10)
agents_prob = np.zeros(10)
num_episode = 4000
e = 0.33
class SOM_Layer():
def __init__(self,m,n,dim,num_epoch,learning_rate_som ,radius_factor ,gaussian_std):
self.m = m
self.n = n
self.dim = dim
self.gaussian_std = gaussian_std
self.num_epoch = num_epoch
self.map = tf.Variable(tf.random_normal(shape=[m*n,dim],stddev=0.05))
class SOM_Layer():
def __init__(self,m,n,dim,num_epoch,learning_rate_som ,radius_factor ,gaussian_std):
self.m = m
self.n = n
self.dim = dim
self.gaussian_std = gaussian_std
self.num_epoch = num_epoch
self.map = tf.Variable(tf.random_normal(shape=[m*n,dim],stddev=0.05))