background preloader

8.2 documentation

8.2 documentation

JasperSnoek/spearmint FMin · hyperopt/hyperopt Wiki This page is a tutorial on basic usage of hyperopt.fmin(). It covers how to write an objective function that fmin can optimize, and how to describe a search space that fmin can search. Hyperopt's job is to find the best value of a scalar-valued, possibly-stochastic function over a set of possible arguments to that function. The way to use hyperopt is to describe: the objective function to minimizethe space over which to searchthe database in which to store all the point evaluations of the searchthe search algorithm to use This (most basic) tutorial will walk through how to write functions and search spaces, using the default Trials database, and the dummy random search algorithm. Parallel search is possible when replacing the Trials database with a MongoTrials one; there is another wiki page on the subject of using mongodb for parallel search. Choosing the search algorithm is as simple as passing algo=hyperopt.tpe.suggest instead of algo=hyperopt.random.suggest. 1. 1.1 The Simplest Case 2.

9.7. itertools — Functions creating iterators for efficient looping This module implements a number of iterator building blocks inspired by constructs from APL, Haskell, and SML. Each has been recast in a form suitable for Python. The module standardizes a core set of fast, memory efficient tools that are useful by themselves or in combination. For instance, SML provides a tabulation tool: tabulate(f) which produces a sequence f(0), f(1), .... These tools and their built-in counterparts also work well with the high-speed functions in the operator module. Infinite Iterators: Iterators terminating on the shortest input sequence: Combinatoric generators: 9.7.1. The following module functions all construct and return iterators. itertools.chain(*iterables) Make an iterator that returns elements from the first iterable until it is exhausted, then proceeds to the next iterable, until all of the iterables are exhausted. def chain(*iterables): # chain('ABC', 'DEF') --> A B C D E F for it in iterables: for element in it: yield element Roughly equivalent to: 9.7.2.

Beautiful Soup Documentation — Beautiful Soup 4.2.0 documentation Beautiful Soup is a Python library for pulling data out of HTML and XML files. It works with your favorite parser to provide idiomatic ways of navigating, searching, and modifying the parse tree. It commonly saves programmers hours or days of work. These instructions illustrate all major features of Beautiful Soup 4, with examples. I show you what the library is good for, how it works, how to use it, how to make it do what you want, and what to do when it violates your expectations. This document covers Beautiful Soup version 4.12.1. You might be looking for the documentation for Beautiful Soup 3. This documentation has been translated into other languages by Beautiful Soup users: Getting help If you have questions about Beautiful Soup, or run into problems, send mail to the discussion group. When reporting an error in this documentation, please mention which translation you’re reading. Here’s an HTML document I’ll be using as an example throughout this document. $ python setup.py install

rawdog Download: rawdog-2.19.tar.gz (65K, released 2014-02-02)Signature (about); SHA1 e889ac948f57c8dfdd57506d00365ef2ca96dfed Available through Git (Atom feed of changes):git clone About rawdog rawdog is an RSS Aggregator Without Delusions Of Grandeur. rawdog is designed to be invoked periodically by cron (or a similar task-scheduling mechanism). Written in Python, rawdog is highly customisable and extendable. Full documentation is included in the source package to get you started with rawdog. Dependencies rawdog requires Python 2.6 or later, and feedparser 5.1.2 or later. I'd also strongly recommend installing PyTidyLib, which rawdog can use to generate cleaner output HTML. rawdog is designed to run on POSIX-compliant free operating systems such as Linux and FreeBSD, and requires Unix-like filesystem semantics. rawdog is not supported on proprietary operating systems. Mailing list Packaged versions of rawdog rawdog packages are available for some systems. Plugins

Easy threading with Futures To run a function in a separate thread, simply put it in a Future: >>> A=Future(longRunningFunction, arg1, arg2 ...) It will continue on its merry way until you need the result of your function. You can read the result by calling the Future like a function, for example: >>> print A() If the Future has completed executing, the call returns immediately. A few caveats: Since one wouldn't expect to be able to change the result of a function, Futures are not meant to be mutable. The Future only runs the function once, no matter how many times you read it. For more information on Futures, and other useful parallel programming constructs, read Gregory V.

Welcome — Pylearn2 dev documentation Warning This project does not have any current developer. We will continue to review pull requests and merge them when appropriate, but do not expect new development unless someone decides to work on it. There are other machine learning frameworks built on top of Theano that could interest you, such as: Blocks, Keras and Lasagne. Don’t expect a clean road without bumps! Pylearn2 is a machine learning library. Researchers add features as they need them. There is no PyPI download yet, so Pylearn2 cannot be installed using e.g. pip. git clone To make Pylearn2 available in your Python installation, run the following command in the top-level pylearn2 directory (which should have been created by the previous command): You may need to use sudo to invoke this command with administrator privileges. python setup.py develop --user This command will also compile the Cython extensions required for e.g. pylearn2.train_extensions.window_flip. Data path Ian J.

Welcome — Theano 0.6 documentation Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. Theano features: tight integration with NumPy – Use numpy.ndarray in Theano-compiled functions.transparent use of a GPU – Perform data-intensive computations much faster than on a CPU.efficient symbolic differentiation – Theano does your derivatives for functions with one or many inputs.speed and stability optimizations – Get the right answer for log(1+x) even when x is really tiny.dynamic C code generation – Evaluate expressions faster.extensive unit-testing and self-verification – Detect and diagnose many types of errors. Theano has been powering large-scale computationally intensive scientific investigations since 2007. 2017/11/15: Release of Theano 1.0.0. You can watch a quick (20 minute) introduction to Theano given as a talk at SciPy 2010 via streaming (or downloaded) video: git clone How to Seek Help¶

Statistical Data Analysis in Python, SciPy2013 Tutorial, Part 1 of 4 numexpr - Fast numerical array expression evaluator for Python and NumPy. Please be aware that the numexpr project has been migrated to GitHub. This site has been declared unmaintained as of 2014-01-21. Sorry for the inconveniences. -- Francesc Alted What It Is The numexpr package evaluates multiple-operator array expressions many times faster than NumPy can. Also,numexpr implements support for multi-threading computations straight into its internal virtual machine, written in C. It is also interesting to note that, as of version 2.0, numexpr uses the new iterator introduced in NumPy 1.6 so as to achieve better performance in a broader range of data arrangements. Finally, numexpr has support for the Intel VML (Vector Math Library) -- integrated in Intel MKL (Math Kernel Library) --, allowing nice speed-ups when computing transcendental functions (like trigonometrical, exponentials...) on top of Intel-compatible platforms. Examples of Use Using it is simple: >>> import numpy as np>>> import numexpr as ne >>> a = np.arange(1e6)>>> b = np.arange(1e6) and fast...

Related: