Skip to content

Instantly share code, notes, and snippets.

View yohm's full-sized avatar

Yohsuke Murase yohm

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yohm
yohm / de_optimizer.py
Last active January 6, 2017 08:27
Optimize function using a differential evolution algorithm
import random
class Domain():
def __init__(self, minimum, maximum):
self.min = minimum
self.max = maximum
assert self.min < self.max
def scale(self, r):
"""
@yohm
yohm / README.md
Last active January 6, 2017 07:06
A sample of iterative selection of parameters using OACIS.

Iterative Trial of Candidate Parameters

Some simulations, such as convergence calculations, need trials and errors for selecting appropriate parameters until an expected result is obtained.

In this sample, we demonstrate how to automate this kind of iterations. This sample tries candidate parameters, which are given by us in advance, one by one until an expected result is obtained.

Prerequisites

Register simulator as follows.

@yohm
yohm / README.md
Last active December 26, 2016 06:14
A sample of parameter optimization using OACIS and Differential Evolution algorithm.

A sample of optimzation of parameters

This is a sample of optimizing parameters using OACIS watcher. This program iteratively search for parameters which minimizes the results of the simulations. For the optimization, we adopted a differential evolutiion algorithm.

Prerequisites

Register simulator as follows.

@yohm
yohm / OACIS_API_primer_Python.ipynb
Last active February 14, 2017 14:06
An introductory sample of OACIS Python APIs.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yohm
yohm / .gitignore
Last active November 16, 2023 11:14
Ruby and Python samples of MessagePack-RPC.
Gemfile.lock
@yohm
yohm / how_to_use_host_group.md
Last active November 16, 2016 03:41
HostGroup機能の使い方

目的

OACISにHostGroupという機能を導入した。 ジョブの作成時にHostを個別に指定するのではなく、HostGroupというHostの集団を指定できるようにする。 ジョブの投入先としてHostGroupを指定した場合、workerがジョブの投入時にGroupの中の空いているHostに投入する。

仕様

  • Runの作成時にHostだけではなくHostGroupに投入先として指定できるようにする
  • HostGroupに投入する際にはHostParameterはすべてデフォルトの値で投入される
@yohm
yohm / 1d_RidgeRegression.ipynb
Last active November 4, 2016 07:27
A sample of Ridge regression using scikit-learn.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yohm
yohm / daru_tutorial.ipynb
Created October 4, 2016 11:33
DARU primer
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yohm
yohm / mnist_tensorflow.py
Created July 3, 2016 14:05
A MNIST tutorial code of TensorFlow.
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
import tensorflow as tf
x = tf.placeholder(tf.float32, [None, 784])
W = tf.Variable(tf.zeros([784, 10]))
b = tf.Variable(tf.zeros([10]))
y = tf.nn.softmax(tf.matmul(x, W) + b)
y_ = tf.placeholder(tf.float32, [None, 10])