Skip to content

Instantly share code, notes, and snippets.

@travisbrady
travisbrady / results.md
Last active November 20, 2020 16:30
Check differences in results given different cb_types

Testing cb_type parameter

Summary

This is a very simple test of vowpal wabbit's contextual bandits using the dataset from Tony Jebara's ML for Personalization class at Columbia. Specifically I wanted to see what varying the cb_type param would do.

The results here are surprising (to me) in that the take rate varies so much by cb_type. Is that expected behavior?

Script output

@travisbrady
travisbrady / Dune ocamlc error
Created April 20, 2020 18:19
An error I received while trying to run dune build
```
dune build --verbose examples/simple.exe Mon Apr 20 13:18:08 2020
Workspace root: /Users/tbrady/code/hub/ocaml-vw
Running[0]: /usr/bin/getconf _NPROCESSORS_ONLN > /var/folders/n1/fsscqfrd5fg8mybxkv2hl5t0m5v75k/T/dune7efecb.output 2> /dev/null
Auto-detected concurrency: 8
disable binary cache
Running[1]: /Users/tbrady/.opam/4.09.0/bin/ocamlc.opt -config > /var/folders/n1/fsscqfrd5fg8mybxkv2hl5t0m5v75k/T/dunebd0d41.output
Dune context:
{ name = "default"
; kind = "default"
This file has been truncated, but you can view the full file.
tree
num_class=1
num_tree_per_iteration=1
label_index=0
max_feature_idx=14
objective=lambdarank
feature_names=feat_0 feat_1 feat_2 feat_3 feat_4 feat_5 feat_6 feat_7 feat_8 feat_9 feat_10 feat_11 feat_12 feat_13 feat_14
feature_infos=[1:100] [0:0.4437137246131897] [1.666666613162598e-05:820.75813310700369] [1.673640129955244e-05:556.90296131598006] [0.020689655095338821:257] [1.928600249812007e-05:1] [0.23076923076923078:11] [1:5] [1:20] [0:500] [0:10.186400413513184] [0:1] [0:1] [0.0016478236704276536:1674.2628175707628] [3.0375130990721738e-07:25340.073928934617]
Tree=0
@travisbrady
travisbrady / JavaNaN.java
Created October 9, 2017 14:22
NaN NaN NaN
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
docker build -t "ocaml-libreactor:dockerfile" .
Sending build context to Docker daemon 3.072 kB
Step 1 : FROM ocaml/opam:ubuntu
---> b225418ab764
Step 2 : RUN sudo apt-get update -qq
---> Using cache
---> d9cef1c78f24
Step 3 : RUN sudo apt-get install -y software-properties-common
---> Using cache
---> 4cac1ad76208
set nocompatible
filetype off
let mapleader=","
let g:mapleader = ","
call plug#begin('~/.vim/plugged')
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
$ make
ocaml setup.ml -build
W: Cannot find source file matching module 'Vw_bindings' in library vw.
W: Use InterfacePatterns or ImplementationPatterns to define this file with feature "source_patterns".
W: Cannot find source file matching module 'Vw_generated' in library vw.
W: Use InterfacePatterns or ImplementationPatterns to define this file with feature "source_patterns".
Finished, 0 targets (0 cached) in 00:00:00.
+ /Users/travisbrady/.opam/4.03.0/bin/ocamlfind ocamlopt -g -I lib -linkpkg -package ctypes -package ctypes.foreign -package ctypes.stubs -package threads -thread lib/vw.cmxa examples/simple.cmx -o examples/simple.native
Undefined symbols for architecture x86_64:
"_VW_Initialize", referenced from:
Jan 13, 2017 6:35:51 PM org.jpmml.sklearn.Main run
INFO: Parsing PKL..
Jan 13, 2017 6:35:51 PM org.jpmml.sklearn.Main run
INFO: Parsed PKL in 17 ms.
Jan 13, 2017 6:35:51 PM org.jpmml.sklearn.Main run
INFO: Converting..
Jan 13, 2017 6:35:51 PM org.jpmml.sklearn.Main run
SEVERE: Failed to convert
java.lang.UnsupportedOperationException at org.jpmml.converter.CategoricalFeature.toContinuousFeature(CategoricalFeature.java:59)
at org.jpmml.xgboost.XGBoostUtil.toXGBoostSchema(XGBoostUtil.java:87)
@travisbrady
travisbrady / cargo_error.sh
Last active August 29, 2015 14:16
error when compiling COST
$ cargo --version
cargo 0.0.1-pre-nightly (a58ffd7 2015-02-27) (built 2015-02-27)
$ rustc --version
rustc 1.0.0-dev (built 2015-02-22)
$ cargo run --release
Compiling rustc-serialize v0.2.12
Compiling regex v0.1.14
note: write `[..]` instead
note: write `[..]` instead
/Users/travisbrady/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.2.12/src/collection_impls.rs:17:24: 17:29 error: unresolved import `std::collections::DList`. There is no `DList` in `std::collections`
http://open.spotify.com/user/1213527472/playlist/7n4ZtvOiYfYBY8ayzQcsEB