Building and running Bear
Bear is written in ANSI C (C89) with minimal dependencies.
Bear will build itself, but you need to have some
code development tools installed.
Building Bear
I provide detailed instructions for building and running Bear.
You can do it:
-
on your own Mac or Linux machine
if you are comfortable installing development tools; or
-
on an Amazon AWS EC2 machine
(Free Tier is fine).
Either way, first download this file:
-
bear.tar.gz
(440 KB; MD5: c7f7ad5df3a000cb05617cb0a2ec5d0a)
and untar it:
$ tar -xf bear.tar.gz
You will see a _README file.
To build and run on your own Mac or Linux machine,
follow the instructions in Section 1 of
the _README file.
To build and run on AWS EC2,
follow the instructions in Section 2 of
the _README file.
For working through the Bear tutorials,
add its bin directory to your path:
$ export PATH=`pwd`/build/opt/bin:$PATH
You can check that it is set correctly with
$ which memory_bear
If you intend to use this installation more permanently, add the
path export to one of your profile files.
Not building Bear
You can also work through the Bear tutorials without
building Bear at all.
I provide all of Bear’s output.
Testing your build of Bear
If you added Bear to your path, then just run this command:
$ memory_bear
You should see output that looks something like this:
The help screen that you should get from memory_bear
if you run it with no arguments
Bear is running properly if you see this.
Included programs
Your build of Bear contains 13 programs:
- memory_bear
-
In-memory implementation of Bear.
See the simple tutorial
and the intermediate tutorial
to learn how to use it.
- bear_model_details
-
Print or save some high-level details of the individual models
within any saved Bear model file.
- bear_model_features
-
Print or save the features actually used in a Bear model file.
- bear_features_list
-
Print the list of feature names for an input file
with a header row; useful for understanding the features used in
a Bear model file.
- bear_predict
-
Stream production data through a Bear model created by
memory_bear.
See the simple tutorial.
- simple_bear_tutorial_data
-
Creates the data used in
the simple tutorial
and the first part of
intermediate tutorial.
- intermediate_bear_tutorial_data
-
Creates the other data used in the
intermediate tutorial.
- intermediate_bear_tutorial_reformat
-
Reformats the data created by the above program and the output from
Bear so that it can be
easily visualized in Microsoft Excel.
- spiral_classification_data
-
Creates the spiral classification data used at the end of the
intermediate tutorial.
- compare_data
-
Simple program for comparing two data text files for essential equality.
- split_train_validate
-
Splits an input file of training data into training and validation subsets.
- roc_auc
-
Compute the ROC curve and the AUC for a file of classification predictions.
- rmse
-
Compute the RMSE for a file of predictions.
I also include 109 executables
of unit tests and death tests for the classes supporting Bear,
if you are interested.
Old versions
All released versions of Bear are here.
Fine print
These Bear pages describe personal hobby research
that I have undertaken since 2008.
All opinions are mine alone.
All code is from my personal codebase, supplied under
the MIT-0 License.
© 2022–2024 John Costella