Direkt zum Hauptbereich

Posts

Es werden Posts vom 2017 angezeigt.

Data Analytics: How to protect against random correlations

Many analysts know it: You find a significant correlation - and then you wonder how secure the knowledge actually is. Of course, a good model inevitably requires an evaluation based on test data, because there is no way around it. But sometimes doubts remain - because even test data can be unreliable. At the beginning of this year, during my work, I found such a significant correlation (0.8 after Spearman). However, an evaluation was only possible to a limited extent, because due to external circumstances many attributes of the data can change in the respective department and not all changes are documented. Incompleteness in the dataset - that too will be known to analysts. Now I asked myself the question: how can I secure my knowledge nevertheless. The nature of the correlation was of central importance. The situation was similar to a well-insulated building in which the room temperature is dependent on both the outside temperature and a heating. Due to the thick insulation of t...

Introduction to Design Patterns (2): The Singleton

The Singleton The Singleton design pattern can be seen as a special case of a Lazy Getter . Indeed, the Lazy Getter is the basic construct of a Singleton. Additional, the Singleton does not use a member variable, but a global (static) variable, so that any call to the class would return the same variable. Why is this useful? Just imagine, You are developing an e-mail application with an address book function. Hence an address book can contain a lot of contacs, stored somehow in a data file that maybe need to be loaded by an SQLite database, this can take a few moments on initial data access. So when a user opens the address book the first time, the Laze Gette will cteate the address book object and load the contacts from SQLite. Now it is not that difficult to imagine, that the user may opens more than one e-mail window and writes some e-mails in those windows and every e-mail window is using the address book. To avoid multiple timespans for initially loading the contacts for each...

Introduction to Design Patterns (1): The Lazy Getter

The Laze Getter pattern Example for Java Example for Lazarus and language hint The term "Lazy Getter" refers to the Java vocabular, where a Getter is a method, that returns a feedback value or object. And lazy means, that the effect of this Getter method is somehow delayed. Some more precise, it is delayed until one need it. But what do we need? An object, of course! So we need an instantiation of an object delayed. or maybe we don't need this object at all and this is, why we are using a Lazy Getter. To save resources, it is inevitable to not create the maybe required object at startup. But of course we need to create it, when it is needed. To reach this, the Lazy Getter method is used as a synonyme for the late created object in the source code. This method does nothing else than looking, if the object is created - if yes, then return it - or not - then create and return it. That's all. A simple basic pattern. Example for Java: // somewhere you have de...

CREATE DATABASE via ODBC

When using ODBC, there are some facts to be considered. One of these facts is good to know when one is about to create a new database with an ODBC connection. General you should avoid ODBC if possible. But in some cases this is not possible because ODBC is still the only connection you have. This can happen if you use (for example) Mircrosoft Access to connect to a MySQL Server or a similar scenario. If you already worked successfully with data on that kind of connection, but now you have to create a database, there will occur a problem. Oh the existing connection you usually will have no success when trying to create a database because you maybe dont have the privilege. But even if you have, there will occur a problem.