I hereby claim:
- I am arunreddy on github.
- I am arunreddy (https://keybase.io/arunreddy) on keybase.
- I have a public key whose fingerprint is 70DE 4849 57EB F197 1C6C B887 AB43 972A 33B0 3B5C
To claim this, I am signing this object:
a = [1 -2 ; -3 4]; | |
aPos = (a.>0.0).*a; | |
aInd = (a.<0.0).*a*-1; |
# Install ARCH Linux with encrypted file-system and UEFI | |
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
# Download the archiso image from https://www.archlinux.org/ | |
# Copy to a usb-drive | |
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
# Set swedish keymap |
using PyPlot; | |
using Distributions; | |
TOPIC_N = 5; | |
VOCABULARY_SIZE = 1000; | |
DOC_NUM = 100; | |
TERM_PER_DOC = 200; | |
X = zeros(DOC_NUM,VOCABULARY_SIZE); |
import os | |
import random | |
import string | |
import tempfile | |
import subprocess | |
def random_id(length=8): | |
return ''.join(random.sample(string.ascii_letters + string.digits, length)) | |
TEMPLATE_SERIAL = """ |
I hereby claim:
To claim this, I am signing this object:
/** | |
* Stochastic Gradient Descent is a technique for minimizing a function which | |
* can be expressed as a sum of other functions. That is, suppose we have | |
* | |
*/ | |
class SGDMomentum{ | |
public: | |
/** | |
* Constructor |
// Without policy class.. | |
Optimize(arma::mat& iterate){ | |
arma::mat v = arma::zeros<arma::mat>(iterate.n_rows, iterate.n_cols); | |
for(;;){ | |
v = momentum*v - stepSize * gradient; | |
iterate += v; | |
} |
StandardSGD <LogisticRegressionFunction<>> sgdOpt(lrf); | |
sgdOpt.MaxIterations() = maxIterations; | |
sgdOpt.Tolerance() = tolerance; | |
sgdOpt.StepSize() = stepSize; | |
Log::Info << "Training model with SGD optimizer." << endl; | |
// This will train the model. | |
model.Train(sgdOpt); |
// logistic_regression_test.cpp Lines[504-512] | |
// Very simple fake dataset. | |
arma::mat data("1 2 3;" | |
"1 2 3"); | |
arma::Row<size_t> responses("1 1 0"); | |
// Create a logistic regression object using a custom SGD object with a much | |
// smaller tolerance. | |
LogisticRegressionFunction<> lrf(data, responses, 0.001); |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
cout << "Hello World" << endl; | |
return 0; | |
} |