Posts

Showing posts with the label Python

Find your model's optimal hyperparameters with Hyperopt

While checking out some tools for automated hyperparameter optimization, I came across a quite popular library called Hyperopt . It provides an implementation for Random Search and Tree-of-Parzen-Estimators (TPE). Unfortunately, most examples out there us a dummy function to replace the model, but I could not find any example that uses TensorFlow. That's why I wanted to provide a basic simple Hyperopt example with TensorFlow. This example can be found on my Github . Do you have any experiences with other libraries for hyperparameter optimization? I would be happy if you share your experiences? For instance, I have read that a  Sacred  extension called Labwatch  also allows to define a search space for algorithmic hyperparameter optimization, but comes with different algorithms.

Better IDE support for Python with Type Hints

Image
About 12 years ago, I started to learn programming with Java and C#. Both languages are type-safe and have therefore a great support when using an IDE like Eclipse, IntelliJ or Visual Studio. But throughout my software development journey, I also made my hands dirty with other dynamically typed languages like JavaScript or Python. While checking out Angular2 more than a year ago, I used TypeScript for my first time, because it was recommended by the Angular team. I quickly realized how much painless it was to develop a web application with TypeScript instead of using classic JavaScript. The ability to strictly assigning a data type to a variable allows any IDE to offer much better tooling support, such as IntelliSense. At least in my point of view, programming in TypeScript felt much more like programming in C# than in JavaScript, where I always felt like I had to know every possible function name by heart. Which was especially difficult when you use JavaScript on a very non-regular...

Python + Matplotlib = Must Have on Every System

Image
In the last few weeks, I had to visualize some data from time to time. And for me, it turned out that the Python library Matplotlib is one of the best tools to do some quick plots. I cannot imagine that I have never installed Python on the Windows partition of my laptop, but only on my Linux partition. And I can really recommend to have Python and Matplotlib installed on every device, so that you have these tools at hand whenever you need to visualize some data. In this short post, I would like to write down the few simple steps you should do... 1. Install Python from Python Software Foundations Make sure you add python to your PATH , as well as select pip to be installed as well 2. Start your terminal, cmd or PowerShell 3. Install Matplotlib using the pip > pip install matplotlib 4. Start the python console > python 5. Import matplotlib.pyplot and make a plot with just a few lines of code > import matplotlib.pyplot as plt > plt.plot([8,4,2,1,0,1,2,4,8]...