text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
# Turning Points and Inflection Points This example will walk the user through implementing DCF fits to data sets with turning points and inflection points. It builds on the details in the 'Simple Example Code' and uses the 'constraints' keyword argument introduced there. The 'constraints' keyword argument is used to ...
github_jupyter
# Planar data classification with one hidden layer Welcome to your week 3 programming assignment. It's time to build your first neural network, which will have a hidden layer. You will see a big difference between this model and the one you implemented using logistic regression. **You will learn how to:** - Implemen...
github_jupyter
# 6. Weight Initializations & Activation Functions ## Recap of Logistic Regression <img src="./images/cross_entropy_final_4.png" alt="deeplearningwizard" style="width: 900px;"/> ## Recap of Feedforward Neural Network Activation Function <img src="./images/logistic_regression_comparison_nn5.png" alt="deeplearningwizar...
github_jupyter
[View in Colaboratory](https://colab.research.google.com/github/abhigoogol/Autoencoders-using-Pytorch/blob/master/Autoencoder_CIFAR10,_Denoising_MNIST.ipynb) ``` from os import path from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_ab...
github_jupyter
# Generating Useful Wikidata Files This notebook generates files that contain derived data that is useful in many applications. The input to the notebook is the full Wikidata or a subset of Wikidata. It also works for arbitrary KGs as long as they follow the representation requirements of Wikidata: - the *instance of...
github_jupyter
<img src="http://hilpisch.com/tpq_logo.png" alt="The Python Quants" width="35%" align="right" border="0"><br> # Python for Finance **Analyze Big Financial Data** O'Reilly (2014) Yves Hilpisch <img style="border:0px solid grey;" src="http://hilpisch.com/python_for_finance.png" alt="Python for Finance" width="30%" a...
github_jupyter
# 範例 : 計程車費率預測 https://www.kaggle.com/c/new-york-city-taxi-fare-prediction # [作業目標] - 使用並觀察特徵組合, 在計程車費率預測競賽的影響 # [作業重點] - 仿造範例並參考今日課程內容, 使用經緯度一圈的長度比的概念造出新特徵, 觀察有什麼影響 (In[6], Out[6]) - 只使用上面所造的這個新特徵, 觀察有什麼影響 (In[7], Out[7]) ``` # 做完特徵工程前的所有準備 import pandas as pd import numpy as np import datetime from sklearn.preproc...
github_jupyter
##### Copyright 2020 The TensorFlow IO Authors. ``` #@title Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
github_jupyter
``` import os import numpy as np import pandas as pd % run FeatureTrace.ipynb def getFeatureProfiles(filePaths): featureObj = FeatureTrace featureProfiles = dict() for f in filePaths: if not os.path.isdir(f): fName = os.path.basename(f) # featureProfile = featureObj(f).getOri...
github_jupyter
# Interpret Models You can use Azure Machine Learning to interpret a model by using an *explainer* that quantifies the amount of influence each feature contribues to the predicted label. There are many common explainers, each suitable for different kinds of modeling algorithm; but the basic approach to using them is t...
github_jupyter
# AI Explanations: Explaining a tabular data model ## Overview In this tutorial we will perform the following steps: 1. Build and train a Keras model. 1. Export the Keras model as a TF 1 SavedModel and deploy the model on Cloud AI Platform. 1. Compute explainations for our model's predictions using Explainable AI on...
github_jupyter
# 신경망 성능 개선 신경망의 예측 성능 및 수렴 성능을 개선하기 위해서는 다음과 같은 추가적인 고려를 해야 한다. * 오차(목적) 함수 개선: cross-entropy cost function * 정규화: regularization * 가중치 초기값: weight initialization * Softmax 출력 * Activation 함수 선택: hyper-tangent and ReLu ## 기울기와 수렴 속도 문제 일반적으로 사용하는 잔차 제곱합(sum of square) 형태의 오차 함수는 대부분의 경우에 기울기 값이 0 이므로 (near-zero gr...
github_jupyter
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. # Distributed CNTK using custom docker images In this tutorial, you will train a CNTK model on the [MNIST](http://yann.lecun.com/exdb/mnist/) dataset using a custom docker image and distributed training. ## Prerequisites * Unde...
github_jupyter
<!-- dom:TITLE: Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks --> # Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks <!-- dom:AUTHOR: Morten Hjorth-Jensen at Departmen...
github_jupyter
# Assignment 6 - Boosting ## Before you begin Remember to: 1. Make your own copy of the notebook by pressing the "Copy to drive" button. 2. Expend all cells by pressing **Ctrl+[** ### Your IDs ✍️ Fill in your IDs in the cell below: ``` ## %%%%%%%%%%%%%%% Your code here - Begin %%%%%%%%%%%%%%% ## Fill in your IDs ...
github_jupyter
``` #G4 from google.colab import drive drive.mount('/content/gdrive') cp gdrive/My\ Drive/fingerspelling5.tar.bz2 fingerspelling5.tar.bz2 !tar xjf fingerspelling5.tar.bz2 cd dataset5 #remove depth files import glob import os import shutil # get parts of image's path def get_image_parts(image_path): """Given a ful...
github_jupyter
``` from googleapiclient.discovery import build # для получения информации по API import petl as etl # для загрузки и обработки данных import pandas as pd # для выгрузки таблицы в postgresql import sqlalchemy # для создания подключения к базе данных import re # регулярные выражения youTubeApiKey = 'BIrandomsimbolsandno...
github_jupyter
``` import RegTomoRecon as rtr import numpy as np %matplotlib notebook from matplotlib import pyplot as plt ``` ## Import data and tilt series In this example we simulate data from a simple blob phantom for demonstrative purposes. Here we use the axis ordering etc. which is default in astra. The following example give...
github_jupyter
# Lab 2: Classification ### Machine Learning 1, September 2015 * The lab exercises should be made in groups of two, three or four people. * The deadline is October 4th (Sunday) 23:59. * Assignment should be sent to Philip Versteeg (p.j.j.p.versteeg@uva.nl). The subject line of your email should be "lab\#\_lastname1\_...
github_jupyter
<img src="images/ipython_logo.png"> # Jupyter and IPython overview In this day, we will cover the core parts of Jupyter and IPython, including how to use the various frontends, the Jupyter notebook, and how the IPython kernel goes beyond the plain Python language. **Jupyter** includes the notebook interface and vari...
github_jupyter
<a href="https://colab.research.google.com/github/cxbxmxcx/EvolutionaryDeepLearning/blob/main/EDL_9_2_GAN_Optimization.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` !pip install livelossplot --quiet #@title The Imports from tensorflow.keras.da...
github_jupyter
## Creating a composite image from multiple PlanetScope scenes In this exercise, you'll learn how to create a composite image (or mosaic) from multiple PlanetScope satellite images that cover an area of interest (AOI). We'll use `rasterio`, along with its vector-data counterpart `fiona`, to do this. ### Step 1. Aquir...
github_jupyter
# 1D harmonic oscillator physics-informed neural network (PINN) This notebook contains the code to reproduce the plots presented in my blog post ["So, what is a physics-informed neural network?"](https://benmoseley.blog/my-research/so-what-is-a-physics-informed-neural-network/). Please read the post for more details...
github_jupyter
# Desafio 5 Neste desafio, vamos praticar sobre redução de dimensionalidade com PCA e seleção de variáveis com RFE. Utilizaremos o _data set_ [Fifa 2019](https://www.kaggle.com/karangadiya/fifa19), contendo originalmente 89 variáveis de mais de 18 mil jogadores do _game_ FIFA 2019. > Obs.: Por favor, não modifique o ...
github_jupyter
# 3.5 Dictionaries ## 3.5.5 Dictionarys vergleichen & sortieren Im Anschluss dieser Übungseinheit kannst du ... + Dictionarys nach ihren Keys, Values und Key-Value-Paaren auf verschiedene Weisen miteinander vergleichen + Dictionarys in Sets umwandeln und damit Set-Funktionen zum Vergleich von Dictionarys heranziehen...
github_jupyter
# Python Parsing with NLTK **(C) 2017-2021 by [Damir Cavar](http://damir.cavar.me/)** **Download:** This and various other Jupyter notebooks are available from my [GitHub repo](https://github.com/dcavar/python-tutorial-notebooks). **License:** [Creative Commons Attribution-ShareAlike 4.0 International License](https...
github_jupyter
``` import numpy as np import pandas as pd from PIL import Image, ImageEnhance import torchvision.transforms as transforms import os from tqdm import tqdm # the folder from 256_ObjectCategories.tar file train_dir = '/home/ubuntu/data/256_ObjectCategories/' # a folder where resized and split data will be stored data_...
github_jupyter
# Introducción En este documento vamos a expandir una serie de consultas utilizando dos modelos basados en word embeddings: Word2Vec$^{[1]}$ y Glove$^{[2]}$. Al principio, se explicará brevemente como funciona cada uno de estos modelos y sus respectivas librerías de Python. Posteriormente, se realizará una pequeña comp...
github_jupyter
``` from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from six.moves import xrange # pylint: disable=redefined-builtin from tensorflow.python.eager import context from tensorflow.python.framework import common_shapes from tensorflow.python...
github_jupyter
### Pandas Pandas is a Python library which makes working with large datasets convenient; it utilizes an object called a DataFrame, which stores data in a CSV like format. A Pandas DataFrame allows you to perform Exploratory Data Analysis and run various models for both supervised and unsupervised learning. ``` impor...
github_jupyter
# Setup ``` import sys import os import re import collections import itertools import bcolz import pickle sys.path.append('../../lib') sys.path.append('../') import numpy as np import pandas as pd import gc import random import smart_open import h5py import csv import json import functools import time import string ...
github_jupyter
``` from notebook.services.config import ConfigManager cm = ConfigManager() cm.update('livereveal', { 'width': 1024, 'height': 768, 'scroll': True, }) import pandas as pd import pylab as plt import pystan import seaborn as sns import numpy as np from matplotlib.transforms import Transform from m...
github_jupyter
# teex ### Generating image data with g.t. saliency maps Let's explore the 'seneca' method for generating artificial images with available ground truth saliency maps. It was presented in [Evaluating local explanation methods on ground truth, Riccardo Guidotti, 2021](https://www.researchgate.net/publication/346916247_...
github_jupyter
# Self-Driving Car Engineer Nanodegree ## Project: **Finding Lane Lines on the Road** *** In this project, you will use the tools you learned about in the lesson to identify lane lines on the road. You can develop your pipeline on a series of individual images, and later apply the result to a video stream (really j...
github_jupyter
# EvolvePy Example 4 - Logger In this example, we will show how to user Loggers to store all optimization history. - MemoryStoreLogger - FileLogger - Wandblogger ``` import evolvepy import numpy as np from matplotlib import pyplot as plt ``` # Fitness function, Generator We will use the same fitness function and ...
github_jupyter
# RadarCOVID-Report ## Data Extraction ``` import datetime import json import logging import os import shutil import tempfile import textwrap import uuid import matplotlib.pyplot as plt import matplotlib.ticker import numpy as np import pandas as pd import pycountry import retry import seaborn as sns %matplotlib in...
github_jupyter
``` import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import pandas as pd import numpy as np from matplotlib.pyplot import plot as plt torch.manual_seed(1) from data import * import cleaningtool as ct from helpers import * from model impor...
github_jupyter
# Train Models The central goal of machine learning is to train predictive models that can be used by applications. In Azure Machine Learning, you can use scripts to train models leveraging common machine learning frameworks like Scikit-Learn, Tensorflow, PyTorch, SparkML, and others. You can run these training scrip...
github_jupyter
# Face Deblurring Trained an End-to-End model for deblurring of images (CelebA) following the work in CNN For Direct Text Deblurring, using Keras. The first layer filter size is adjusted to be approximately equal to the blur kernel size. Pre-Trained model with weights and some images from test set are uploaded. **Imp...
github_jupyter
# Quantile Regression Q-Learning ## Imports ``` import gym import numpy as np import torch import torch.optim as optim import torch.nn as nn import torch.nn.functional as F from IPython.display import clear_output from matplotlib import pyplot as plt %matplotlib inline from timeit import default_timer as timer fro...
github_jupyter
<a href="https://colab.research.google.com/github/pra17dod/Waste-Segregation/blob/main/model/v3_waste_segregation.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` import numpy as np import pandas as pd import matplotlib.pyplot as plt import os...
github_jupyter
# Kili Tutorial: Importing assets In this tutorial, we will walk through the process of using Kili to import assets. The goal of this tutorial is to illustrate some basic components and concepts of Kili in a simple way. Additionally: For an overview of Kili, visit https://kili-technology.com. You can also check out ...
github_jupyter
# Quickstart: Use Cases and Examples with *Interpretable OPE Evaluator* This notebook demonstrates an example of conducting Interpretable Evaluation for Off-Policy Evaluation (IEOE). We use synthetic logged bandit feedback data generated using [`obp`](https://github.com/st-tech/zr-obp) and evaluate the performance of ...
github_jupyter
# XRF Monte-carlo simulations ``` from spectrocrunch.materials import multilayer from spectrocrunch.materials import compoundfromformula from spectrocrunch.materials import compoundfromdb from spectrocrunch.materials import compoundfromlist from spectrocrunch.materials import element from spectrocrunch.materials impor...
github_jupyter
# **The Effect of Psychology on B12** #### İrem Dereli This project aims to detect a person's B12 level by looking him/her psychology and mental health. ## **Table of Content** [Problem](#problem) [Data Understanding](#data_understanding) [Data Preparation](#data_preparation) [Modeling](#modeling) [Eval...
github_jupyter
<h1 style="font-size:35px;color:deeppink;"> Data Analysis -Case Study 3</h1> In this case study we will take data of job postings.This case study focuses on wrangling the data and then answer a simple question. Dta present in this is both dirty and untidy # Step 1: Asking Questions Q1)How much of the population requi...
github_jupyter
# Extract indications in clinical trial from clinicaltrials.gov + [documentation](https://clinicaltrials.gov/ct2/help/how-read-study "How to read a study record") ``` import bz2 import collections import itertools import os import random import re import urllib.parse import urllib.request import xml.etree.ElementTree...
github_jupyter
<a href="https://colab.research.google.com/github/aamini/introtodeeplearning/blob/master/lab3/RL.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> <table align="center"> <td align="center"><a target="_blank" href="http://introtodeeplearning.com"> ...
github_jupyter
# Cross Validation 1. [What is Cross Validation](#1) 1. [Methods used for Cross-Validation](#2) 1. [Validation Set Approach](#3) 1. [Leave-P-out cross-validation](#4) 1. [K-Fold Cross-Validation](#5) 1. [Stratified k-fold cross-validation](#6) 1. [Holdout Method](#7) 1. [Comparison of Cross-validation to train/test sp...
github_jupyter
# Riskfolio-Lib Tutorial: <br>__[Financionerioncios](https://financioneroncios.wordpress.com)__ <br>__[Orenji](https://www.orenj-i.com)__ <br>__[Riskfolio-Lib](https://riskfolio-lib.readthedocs.io/en/latest/)__ <br>__[Dany Cajas](https://www.linkedin.com/in/dany-cajas/)__ ## Part IV: Bond Portfolio Optimization and Im...
github_jupyter
``` import pandas as pd import sklearn.datasets import numpy as np import matplotlib.pyplot as plt from os import environ environ['TF_FORCE_GPU_ALLOW_GROWTH'] = "true" from utils import hello_world hello_world() from pprint import pprint import matplotlib.pyplot as plt import numpy as np import seaborn as sns import...
github_jupyter
# First Order Ego Graph Analysis on Facebook User 2 In this notebook we analyze the first order egograph of a Facebook account with $\sim10^3$ friends. ## Modules ``` # Enable interactive numpy and matplotlib %pylab inline # Data Wrangling import pandas as pd import numpy as np # Data Analysis import powerlaw as ...
github_jupyter
<a href="https://colab.research.google.com/github/https-deeplearning-ai/tensorflow-1-public/blob/master/C3/W4/ungraded_labs/C3_W4_Lab_1.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Ungraded Lab: Generating Text with Neural Networks For this we...
github_jupyter
# Python Machine Learning # Chapter 3 - A Tour of Machine Learning Classifiers Using Scikit-Learn ### Overview - [Decision tree learning](#Decision-tree-learning) - [Maximizing information gain – getting the most bang for the buck](#Maximizing-information-gain-–-getting-the-most-bang-for-the-buck) - [Buildin...
github_jupyter
``` import numpy as np import matplotlib.pyplot as plt %matplotlib inline # %matplotlib inline é uma Magic Function do Jupyter. Sem ela, teríamos que chamar plt.show() ao fim de cada plot. ``` # Matplotlib ## O que é? Não tem como a explicação ser melhor do que a que está no próprio site, mas basicamente é uma bib...
github_jupyter
# Convolutional Networks So far we have worked with deep fully-connected networks, using them to explore different optimization strategies and network architectures. Fully-connected networks are a good testbed for experimentation because they are very computationally efficient, but in practice all state-of-the-art resu...
github_jupyter
``` #from ssm.models import SLDS #from ssm.emissions import GaussianIdentityEmissions #from ssm.variational import SLDSMeanFieldVariationalPosterior, SLDSTriDiagVariationalPosterior import ssm import numpy as np import scipy.io #from pybasicbayes.util.text import progprint_xrange import matplotlib.pyplot as plt from ss...
github_jupyter
``` import sys,os PROJECT_ROOT=r"C:\Users\Matteo\Documents\projects\sdd\sdd_sports_scraper" sys.path.insert(0, PROJECT_ROOT) os.environ['PROJECT_ROOT']=PROJECT_ROOT import pandas as pd from common import sql_utils from matplotlib import pyplot as plt pd.options.display.max_columns=999 %matplotlib inline matchups=pd.rea...
github_jupyter
``` import tensorflow as tf print(tf.__version__) import numpy as np import matplotlib.pyplot as plt def plot_series(time, series, format="-", start=0, end=None): plt.plot(time[start:end], series[start:end], format) plt.xlabel("Time") plt.ylabel("Value") plt.grid(True) !wget --no-check-certificate \ ...
github_jupyter
## MLS Case study: Unsupervised Learning ---------------------------------------- Welcome to the case study on Unsupervised Learning. We will be using the Credit Card Customer Data for this case study. ---------------------------- ## Problem Statement: ----------------------------- AllLife Bank wants to focus on its...
github_jupyter
# Compare k-mer abundance and presence/absence vs "traditional" single-cell RNA-seq processing - 500 k-mers, with abundance, were hashed from ~50k cells in Tabula Muris using `sourmash` ## Load Tabula Muris Senis data with fixed annotations ``` import dask.dataframe as dd import numpy as np import pandas as pd impo...
github_jupyter
# MLP vs. CNN image classification ## Import data and packages ``` from tensorflow.keras import datasets, layers, models, callbacks import tensorflow as tf import numpy as np import matplotlib.pyplot as plt (x_train, y_train), (x_test, y_test) = datasets.fashion_mnist.load_data() class_names = ['T-shirt/top', 'Trou...
github_jupyter
<a id="intro_ID"></a> # Intermediate: Search and Download GI Program Light Curves ## Introduction This notebook uses the MAST Portal's advanced search options to retrieve the light curves for a single guest investigator program. The notbook will show how to do an advanced query on the MAST's database of holdings, de...
github_jupyter
<!--BOOK_INFORMATION--> <img align="left" style="width:80px;height:98px;padding-right:20px;" src="https://raw.githubusercontent.com/joe-papa/pytorch-book/main/files/pytorch-book-cover.jpg"> This notebook contains an excerpt from the [PyTorch Pocket Reference](http://pytorchbook.com) book by [Joe Papa](http://joepapa.a...
github_jupyter
### Setup ``` from __future__ import print_function import numpy as np import time import matplotlib.pyplot as plt import tensorflow as tf import sys sys.path.append('..') import models.VAE as vae import os from io import BytesIO import PIL.Image import scipy.misc import scipy.io from IPython.display import clear_o...
github_jupyter
``` %matplotlib inline import matplotlib.pyplot as plt import numpy as np ``` # Aprendizaje supervisado parte 2 -- Regresión En regresión intentamos predecir una variable continua de salida -- al contrario que las variables nominales que predecíamos en los ejemplos anteriores de clasificación. Vamos a empezar con un...
github_jupyter
``` import sys import warnings if not sys.warnoptions: warnings.simplefilter('ignore') import tensorflow as tf import numpy as np import matplotlib.pyplot as plt import seaborn as sns import pandas as pd from sklearn.preprocessing import MinMaxScaler from datetime import datetime from datetime import timedelta fro...
github_jupyter
``` import numpy as np from scipy import io from scipy import sparse from scipy.sparse import csgraph from scipy import fftpack from scipy import signal from scipy import linalg from matplotlib import pyplot as plt from matplotlib import collections import mpl_toolkits.mplot3d.art3d as art3d import seaborn as sns impor...
github_jupyter
``` import numpy as np import os import tensorflow as tf import keras from keras import optimizers from keras.layers import Input from keras.models import Model from keras.layers import Dense, Flatten, Reshape, Dropout from keras.layers import Convolution1D, MaxPooling1D, BatchNormalization from keras.layers import Lam...
github_jupyter
# Gaussian Naive Bayes Classifier with Normalizer This Code template is for Classification task using Gaussian Naive Bayes Algorithm where the scaling technique used is Normalize. ### Required Packages ``` !pip install imblearn import warnings import numpy as np import pandas as pd import matplotlib.pyplot as p...
github_jupyter
# Aplicação: cores PANTONE ## Leitura de arquivos _json_ ``` import os, json # diretório base base = '../database/pantone-colors/' for fi in os.listdir(base): n,e = os.path.splitext(fi) if e == '.json': with open(os.path.join(base,fi), 'r') as f: # define variáveis dinamicamente ...
github_jupyter
``` sc.addPyFile('/local/path/to/sb/soft-boiled.zip') from src.algorithms import slp, gmm import numpy as np import matplotlib.pyplot as plt %matplotlib inline ``` # Raw Data Sources ``` data_path = 'hdfs:///post_etl_datasets/twitter/year=2015' all_tweets = sqlCtx.read.parquet(data_path) all_tweets.registerTempTable(...
github_jupyter
# Classifying Fashion-MNIST Now it's your turn to build and train a neural network. You'll be using the [Fashion-MNIST dataset](https://github.com/zalandoresearch/fashion-mnist), a drop-in replacement for the MNIST dataset. MNIST is actually quite trivial with neural networks where you can easily achieve better than 9...
github_jupyter
# Laboratório de Biomecânica e Controle Motor ## [BMClab](http://demotu.org)@[UFABC](http://www.ufabc.edu.br/): Why, How, What For? <br> <div class='center-align'><figure><img src="http://demotu.org/wp-content/uploads/2016/05/cropped-BMClab0.png" alt="BMClab image header"/></figure></div> ``` from datetime import dat...
github_jupyter
# Part 2 - Data Analysis For this project, the requirement is to use the flights dataset to predict if a particular flight in the future will be cancelled. This first notebook is used to explore the data. **NOTE -** This notebook will only execute if you have run the project with `STORAGE_MODE == external` and if you...
github_jupyter
<center><img src='img/ms_logo.jpeg' height=40% width=40%></center> <center><h1>Support Vector Machines</h1></center> In this notebook, we'll cover one of the major algorithms used in Supervised Learning--**_Support Vector Machines_** (or _SVMs_ for short!). We'll start by playing around with a visual implementation t...
github_jupyter
# Introduction to Altair [Altair](https://altair-viz.github.io/) is a declarative statistical visualization library for Python. Altair offers a powerful and concise visualization grammar for quickly building a wide range of statistical graphics. By *declarative*, we mean that you can provide a high-level specificatio...
github_jupyter
# Convolutional Neural Networks: Step by Step Welcome to Course 4's first assignment! In this assignment, you will implement convolutional (CONV) and pooling (POOL) layers in numpy, including both forward propagation and (optionally) backward propagation. **Notation**: - Superscript $[l]$ denotes an object of the $l...
github_jupyter
``` import gym import torch from src.Learner.AWAC import AWAC from src.Learner.DQN import DQN from src.Learner.Random import DiscreteRandomAgent from src.nn.MLP import MLP from src.utils.memory import ReplayMemory from src.utils.train_utils import prepare_training_inputs import matplotlib.pyplot as plt gamma = 0.9 me...
github_jupyter
This is a notebook with all experiments in the DEDPUL paper on synthetic data sets ``` import numpy as np import pandas as pd import random import torch.nn as nn import torch.optim as optim import torch import torch.nn.functional as F import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from matplo...
github_jupyter
# DAFI's Random Field Module This document shows the use of DAFI's random field module *dafi.random_field* to work with random fields. Particularly, the examples show how to generate samples and how to perform a modal decomposition. ``` import numpy as np import matplotlib as mpl from matplotlib import pyplot as plt f...
github_jupyter
# 02 - Exploring Preprocessing Data preprocessing is a set of activities performed to prepare data for future analysis and data mining activities. ## Load data from file The dataset used in this tutorial is GeoLife GPS Trajectories. Available in https://www.microsoft.com/en-us/download/details.aspx?id=52367 ``` fro...
github_jupyter
<img src="../../img/logo_amds.png" alt="Logo" style="width: 128px;"/> # AmsterdamUMCdb - Freely Accessible ICU Database version 1.0.2 March 2020 Copyright &copy; 2003-2020 Amsterdam UMC - Amsterdam Medical Data Science # Vasopressors and inotropes Shows medication for artificially increasing blood pressure (vasopr...
github_jupyter
``` %pylab inline %load_ext autoreload %autoreload 2 import tensorflow as tf import numpy as np import DifferentiableHOS as DHOS import flowpm import pickle import flowpm.tfpower as tfpower import flowpm.scipy.interpolate as interpolate from flowpm.tfpower import linear_matter_power import jax from flowpm import tfpm ...
github_jupyter
``` import numpy as np import pandas as pd data_path = "dataset/winequality-red.csv" wine_df = pd.read_csv(data_path) wine_df.head() #print the shape wine_df.shape wine_df.count() wine_df.describe() wine_df.info() #check for missing values wine_df.isna().sum() #draw box for all columns plot for checking distribution an...
github_jupyter
<small><small><i> All the IPython Notebooks in this lecture series by Dr. Milan Parmar are available @ **[GitHub](https://github.com/milaan9/04_Python_Functions)** </i></small></small> # Python `global` Keyword In this class, you’ll learn about the **`global`** keyword, global variable and when to use **`global`** ke...
github_jupyter
# Data Driven Dealings Development * EDA on Sales Data * Feature Engineering and Clustering * Predicting Sales * Market Basket * Recommending Items per Customer ``` # To be able to use your data stored in your Google Drive you first need to mount your Google Drive so you can load and save files to it. fro...
github_jupyter
## Updating Editor Tracking Data in a Hosted Feature Service (Online) #### This example is an adaptation from the blog post: https://community.esri.com/people/smoore-esristaff/blog/2019/03/21/updating-editor-tracking-data-in-a-hosted-feature-service-online #### This example was developed for a specific user use case ...
github_jupyter
<div style="color:#303030;font-family:'arial blACK', sans-serif,monospace; text-align: center; padding: 50px 0; vertical-align:middle;" > <img src="https://github.com/PIA-Group/ScientIST-notebooks/blob/master/_Resources/Images/Lightbulb.png?raw=true" style=" background:linear-gradient(to right,#FDC86E,#fbb144);border-...
github_jupyter
<a href="https://colab.research.google.com/github/aTom-Pie/dw_matrix/blob/master/matrix_1_day5.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` !pip install eli5 import pandas as pd import numpy as np from sklearn.tree import DecisionTreeRegress...
github_jupyter
``` # !wget https://raw.githubusercontent.com/huseinzol05/Malaya-Dataset/master/dependency/gsd-ud-train.conllu.txt # !wget https://raw.githubusercontent.com/huseinzol05/Malaya-Dataset/master/dependency/gsd-ud-test.conllu.txt # !wget https://raw.githubusercontent.com/huseinzol05/Malaya-Dataset/master/dependency/gsd-ud-d...
github_jupyter
<a href="https://colab.research.google.com/github/ChielChiel/TextToMySpeech/blob/master/textToMySpeech.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # IMPORT --- ``` pip install pydub from bs4 import BeautifulSoup from IPython.display import Aud...
github_jupyter
``` import pandas as pd import matplotlib.pyplot as plt import numpy as np from sklearn import tree from sklearn.model_selection import train_test_split from sklearn.ensemble import RandomForestClassifier # reading csv file athlete_events = pd.read_csv('../CSV for ML models/athlete_events.csv') athlete_events.head() fi...
github_jupyter
# Depixelizing Pixel Art using Deep Neural Networks --- - Author: Diego Inácio - GitHub: [github.com/diegoinacio](https://github.com/diegoinacio) - Notebook: [pixel-art-depixelization-deepNN.ipynb](https://github.com/diegoinacio/creative-coding-notebooks/blob/master/ML-and-AI/pixel-art-depixelization-deepNN.ipynb) --- ...
github_jupyter
【ThisNotebook】 [`Local`](./03_arrays.ipynb) [`Github`](https://github.com/RenyuanL/ElementsOfDataScience/blob/master/03_arrays.ipynb) [`Colab`](https://colab.research.google.com/github/RenyuanL/ElementsOfDataScience/blob/master/03_arrays.ipynb) # Lists and arrays Elements of Data Science by [Allen Downey](https://al...
github_jupyter
<a href="https://colab.research.google.com/github/jeffheaton/t81_558_deep_learning/blob/master/t81_558_class_10_2_lstm.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # T81-558: Applications of Deep Neural Networks **Module 10: Time Series in Keras*...
github_jupyter
``` # %load ../start.py # Imports import os import sys from pathlib import Path import re import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns # Project level imports sys.path.insert(0, '../../lib') from larval_gonad.notebook import Nb from larval_gona...
github_jupyter
``` %load_ext autoreload %autoreload 2 import espaloma as esp import torch import numpy as np from simtk import unit GAS_CONSTANT = 8.31446261815324 * unit.joule / (unit.kelvin * unit.mole) GAS_CONSTANT = GAS_CONSTANT.value_in_unit( esp.units.ENERGY_UNIT / (unit.kelvin) ) kT = GAS_CONSTANT * 300 WINDOWS = 50 def le...
github_jupyter
# Ethan's Modeling ``` import numpy as np import pandas as pd from sklearn.linear_model import Lasso, Ridge, LinearRegression, ElasticNet from sklearn.pipeline import Pipeline from sklearn.preprocessing import OneHotEncoder, LabelEncoder from sklearn.impute import KNNImputer from sklearn.metrics import mean_squared_er...
github_jupyter
# Sparseloop Tutorial - 02 - Matrix Multiply This notebook contains a series of examples of a **matrix multiply** computation. The **fibertree** emulator is used to illustrate the impact of a set of optimizations to exploit sparsity. The basic computation is represented by the Einsum: $$ Z_{m,n} = A_{m,k} \times B_{k...
github_jupyter