<commit_before># ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2016, Numenta, Inc.  Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see http://www.gnu.org/licenses.
#
# http://numenta.org/licenses/
# ----------------------------------------------------------------------

# This uses plotly to create a nice looking graph of average false positive
# error rates as a function of N, the dimensionality of the vectors.  I'm sorry
# this code is so ugly.

import os

import plotly.graph_objs as go
# import plotly.plotly as py
import chart_studio.plotly as py
plotly_user = os.environ["PLOTLY_USERNAME"]
plotly_api_key = os.environ["PLOTLY_API_KEY"]

py.sign_in(plotly_user, plotly_api_key)

# Calculated error values

# a=64 cells active, s=24 synapses on segment, dendritic threshold is theta=12
errors_a64 = [0.00109461662333690, 5.69571108769533e-6, 1.41253230930730e-7,
              8.30107183322324e-9, 8.36246969414003e-10, 1.21653747887184e-10,
              2.30980246348674e-11, 5.36606800342786e-12, 1.46020443491340e-12,
              4.51268292560082e-13, 1.54840085336688e-13, 5.79872960230082e-14,
              2.33904818374099e-14, 1.00570025123595e-14, 4.57067109837325e-15,
              2.18074665975532e-15, 1.08615761649705e-15, 5.62075747510851e-16,
              3.01011222991216e-16, 1.66258638217391e-16, 9.44355122475050e-17,
              5.50227860973758e-17, 3.28135862312369e-17, 1.99909942419741e-17,
              1.24208005365401e-17, 7.85865625150437e-18, 5.05651456769333e-18,
              3.30476684404715e-18, 2.19155538525467e-18, 1.47322040125054e-18,
              1.00301732527126e-18, 6.91085187713756e-19, 4.81531998098323e-19,<commit_msg>JIRA RES 2219: Updated first commit, adding README for sdr_math<commit_after># ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2016, Numenta, Inc.  Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see http://www.gnu.org/licenses.
#
# http://numenta.org/licenses/
# ----------------------------------------------------------------------

# This uses plotly to create a nice looking graph of average false positive
# error rates as a function of N, the dimensionality of the vectors.  I'm sorry
# this code is so ugly.

import os

import plotly.graph_objs as go
import plotly.plotly as py

plotly_user = os.environ["PLOTLY_USERNAME"]
plotly_api_key = os.environ["PLOTLY_API_KEY"]

py.sign_in(plotly_user, plotly_api_key)

# Calculated error values

# a=64 cells active, s=24 synapses on segment, dendritic threshold is theta=12
errors_a64 = [0.00109461662333690, 5.69571108769533e-6, 1.41253230930730e-7,
              8.30107183322324e-9, 8.36246969414003e-10, 1.21653747887184e-10,
              2.30980246348674e-11, 5.36606800342786e-12, 1.46020443491340e-12,
              4.51268292560082e-13, 1.54840085336688e-13, 5.79872960230082e-14,
              2.33904818374099e-14, 1.00570025123595e-14, 4.57067109837325e-15,
              2.18074665975532e-15, 1.08615761649705e-15, 5.62075747510851e-16,
              3.01011222991216e-16, 1.66258638217391e-16, 9.44355122475050e-17,
              5.50227860973758e-17, 3.28135862312369e-17, 1.99909942419741e-17,
              1.24208005365401e-17, 7.85865625150437e-18, 5.05651456769333e-18,
              3.30476684404715e-18, 2.19155538525467e-18, 1.47322040125054e-18,
              1.00301732527126e-18, 6.91085187713756e-19, 4.81531998098323e-19,
{'fraction_non_alphanumeric': 0.13717364276833816, 'fraction_numerical': 0.23787815996684625, 'mean_word_length': 2.8037825059101653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3208243', 'n_tokens_mistral': 2307, 'n_tokens_neox': 1633, 'n_words': 450}