# Computer Science ## Logistic Regression in Python Scikit-Learn

Logistic regression is a popular algorithm for classification problems (despite its name indicating that it is a “regression” algorithm). It belongs to one of the most important algorithms in the machine learning space. Linear Regression Background Let’s review linear regression. Given the training data, we compute a line that fits this training data so that …

## How To Execute System Commands With Python?

In this article, we will learn numerous ways to execute system commands in Python. ➥ Problem: Given an external command that can run on your operating system, how to call the command using a Python script? ➥ Example: Say you want to ping a remote server using your operating system’s ping command—all from within your Python program. How … ## Random Forest Classifier with sklearn

Does your model’s prediction accuracy suck but you need to meet the deadline at all costs? Try the quick and dirty “meta-learning” approach called ensemble learning. In this article, you’ll learn about a specific ensemble learning technique called random forests that combines the predictions (or classifications) of multiple machine learning algorithms. In many cases, it … ## SVM sklearn: Python Support Vector Machines Made Simple

Support Vector Machines (SVM) have gained huge popularity in recent years. The reason is their robust classification performance – even in high-dimensional spaces: SVMs even work if there are more dimensions (features) than data items. This is unusual for classification algorithms because of the curse of dimensionality – with increasing dimensionality, data becomes extremely sparse …

## Python Bitwise Left-Shift << Operator

The Python bitwise left-shift operator x << n shifts the binary representation of integer x by n positions to the left. For a positive integer, it inserts a 0 bit on the right and shifts all remaining bits by one position to the left. For example, if you left-shift the binary representation 0101 by one …

## Python Bitwise Right-Shift >> Operator

The Python bitwise right-shift operator x >> n shifts the binary representation of integer x by n positions to the right. It inserts a 0 bit on the left and removes the right-most bit. For example, if you right-shift the binary representation 0101 by one position, you’d obtain 0010. Semantically, the bitwise right-shift operator is … ## Python Scikit-Learn Decision Tree [Video + Blog]

Decision Trees are powerful and intuitive tools in your machine learning toolbelt. Decision trees are human-readable – in contrast to most other machine learning techniques. You can easily train a decision tree and show it to your supervisors who do not need to know anything about machine learning in order to understand how your model …

## Python Bitwise NOT Operator

Python’s bitwise NOT operator ~x inverts each bit from the binary representation of integer x so that 0 becomes 1 and 1 becomes 0. This is semantically the same as calculating ~x == -x-1. For example, the bitwise NOT expression ~0 becomes -1, ~9 becomes -10, and ~32 becomes -33. As you go over the … ## Neural Networks with SKLearn MLPRegressor

Neural Networks have gained massive popularity in the last years. This is not only a result of the improved algorithms and learning techniques in the field but also of the accelerated hardware performance and the rise of General Processing GPU (GPGPU) technology. In this article, you’ll learn about the Multi-Layer Perceptron (MLP) which is one …

## Creating a Port Scanner with Python Networking Sockets

This is in continuation of the first part of Python networking with sockets. In this blog post we will further learn how to use more socket API’s. We will dig deeper into what a networking port is. Then we start implementing a simple port scanner. Finally, we will enhance this port scanner further. For Part …

## Python Bitwise XOR ^ Operator

Python’s bitwise XOR operator x ^ y performs logical XOR on each bit position on the binary representations of integers x and y. Each output bit evaluates to 1 if and only if exactly one of the two input bits at the same position are 1. For example, the integer expression 4 ^ 3 is …

## Python Bitwise OR | Operator

Python’s bitwise OR operator x | y performs logical OR on each bit position on the binary representations of integers x and y. Each output bit evaluates to 1 if and only if at least one of the two input bits at the same position are 1. For example, the integer expression 4 | 3 …