Skip to content

Instantly share code, notes, and snippets.

View mikhailklassen's full-sized avatar

Mikhail Klassen mikhailklassen

View GitHub Profile
import numpy as np
import matplotlib.pyplot as plt
from sklearn import datasets, mixture
# Create some random clustered data in 2 dimensions
n_clusters = 3
n_features = 2
n_samples = 500
data = datasets.make_blobs(n_samples=n_samples,
import math
# Better activation function
def take_umbrella(input_1, input_2, w_1=1.0, w_2=1.0):
'''Let input_1 be a probability between 0.0 and 1.0
with 0.0 meaning no chance of rain and 1.0 meaning 100%
chance of rain.
Let input_2 be a time duration describing minutes spent
outdoors.'''
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<small><i>This notebook was put together by [Jake Vanderplas](http://www.vanderplas.com). Source and license info is on [GitHub](https://github.com/jakevdp/sklearn_tutorial/).</i></small>"
]
},
{