text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
# Mixture Density Networks
Mixture density networks (MDN) (Bishop, 1994) are a class
of models obtained by combining a conventional neural network with a
mixture density model.
```
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import inferpy as inf
impor... | github_jupyter |
# Linear classifiers demo: `fit`
CPSC 340: Machine Learning and Data Mining
The University of British Columbia
2017 Winter Term 2
Mike Gelbart
```
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
from plot_classifier import plot_loss_diagram, plot_classifier
from sklearn.svm import SVC
from s... | github_jupyter |
<h1> Text Classification using TensorFlow/Keras on Cloud ML Engine </h1>
This notebook illustrates:
<ol>
<li> Creating datasets for Machine Learning using BigQuery
<li> Creating a text classification model using the Estimator API with a Keras model
<li> Training on Cloud ML Engine
<li> Deploying the model
<li> Predict... | github_jupyter |
##### Copyright 2018 The TensorFlow 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 or ... | github_jupyter |
## Practice Followings<br>์ค์ต ์
### Opening a `bash` window on Linux GUI
1. Start a linux machine<br>๋ฆฌ๋
์ค ์์
1. Log in using your id<br>ํ์์ id๋ก log in
1. Press <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>t</kbd> key to open a `bash` terminal<br><kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>t</kbd> ํค๋ฅผ ๋๋ฌ `bash` ์ฐฝ์ ์ถ
### Opening a `git-b... | github_jupyter |
##### Copyright 2018 The TensorFlow 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 or ... | github_jupyter |
*Lot of materials in today's workshop (including text, code, and figures) were adapted from the "SciPy 2017 Scikit-learn Tutorial" by Alexandre Gramfort and Andreas Mueller. The contents of their tutorial are licensed under Creative Commons CC0 1.0 Universal License as work dedicated to the public domain, and can be fo... | github_jupyter |
# NHISS Categorization Analysis of 60 Experimentally Tested Molecules for Indocyanine Nanoparticle Formation
Number of High Intrinsic State Substructures (NHISS) is calculated as the total number of functional groups in a molecule with fluorine (-F) and double bonded oxygen (=O).
NHISS = fluorine + carbonyl + sulfiny... | github_jupyter |
# ๆผ็ฟ5 - VQE(ๅคๅ้ๅญๅบๆๅคใฝใซใใผ)
***
## ๆญดๅฒ็่ๆฏ
้ๅป10ๅนด้ใงใ้ๅญใณใณใใฅใผใฟใผใฏๆฅ้ใซๆ็ใใ้ๅญ็ใชๆๆณใง่ช็ถใฎๆณๅใใทใใฅใฌใผใใงใใใณใณใใฅใผใใฃใณใฐใทในใใ ใจใใใใกใคใณใใณใฎๅคขใๅฎ็พใๅงใใพใใใ2014ๅนดใฎ่ซๆใซใใใฆใๆๅใซใใขใซใใซใใปใใซใใพใ **ๅคๅ้ๅญๅบๆๅคใฝใซใใผ(VQE)** ใ็บ่กจใใพใใใๅๅญใฎๅบๅบ็ถๆ
ใจใใซใฎใผ(ๆๅฐใจใใซใฎใผ)ใใใใพใงใฎๆๆณใใ็ญใๅ่ทฏใง่ฆใคใใใขใซใดใชใบใ ใงใใ[1]ใใใใฆใ2017ๅนดใซใIBMใฎ้ๅญใใผใ ใVQEใขใซใดใชใบใ ใไฝฟใฃใฆๆฐด็ด ๅใชใใฆใ ๅๅญใฎๅบๅบ็ถๆ
ใใทใใฅใฌใผใใใพใใใ[2]
VQEใฎใใธใใฏใฏใๅ้กใฎ่จ็ฎใฏใผใฏใญใผใใฎ... | github_jupyter |
# Benchmarking
## 0. Setup the logging
This step sets up logging in our environment to increase our visibility over
the steps that Draco performs.
```
import logging;
logging.basicConfig(level=logging.INFO)
logging.getLogger().setLevel(level=logging.ERROR)
logging.getLogger('draco').setLevel(level=logging.INFO)
im... | github_jupyter |

# Optimizing two models at once
One might be interested in optimizing for two "compteting" models at the same time. Consider having 3 separate samples A, B, C and we'd be interesting in extracting the significance for two out of the three at the same time. Two models would be fitted, e.g ... | github_jupyter |
##### Copyright 2018 The TensorFlow Authors.
Licensed under the Apache License, Version 2.0 (the "License").
# Image Captioning with Attention
<table class="tfo-notebook-buttons" align="left"><td>
<a target="_blank" href="https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/contrib/... | github_jupyter |
# Image processing for NGC 309: Part2
```
import numpy as np
import math
from astropy.io import fits
import os
import sys
import matplotlib.pyplot as plt
import logging
mpl_logger = logging.getLogger('matplotlib')
mpl_logger.setLevel(logging.WARNING)
global PIXEDFIT_HOME
PIXEDFIT_HOME = os.environ['PIXEDFIT_HOME']
sy... | github_jupyter |
```
def model_hyperparam_search(layers, activation_functions=['tanh', 'softmax', 'relu']):
iterations = len(activation_functions)**layers
af_combs = make_pairwise_list(max_depth=layers, options=activation_functions)
print(f'{layers}\t{activation_functions}\t{iterations} iterations required')
f... | github_jupyter |
```
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from tensorflow.keras.layers import Conv2D, Input, Flatten, Reshape
from tensorflow.keras.layers import Dense, Conv2DTranspose, BatchNormalization, Activation
from tensorflow.keras.models import Model
from tensorflow.keras.datasets import ci... | github_jupyter |
```
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
df1 = pd.read_csv("data_after_clustering.csv")
df1.head()
# ๆฐๆฎไธญ็ๅ็ฑป็ฑปๅๆฐ้
df1["TRUE VALUE"].value_counts()
# data1ๆฏๅปๆ็ๅฎๅ็ฑปไฟกๆฏ็ๆฐๆฎ้๏ผๅซๆ่็ฑปๅ็็ปๆ๏ผ
data1 = df1.drop("TRUE VALUE", axis=1)
data1.head()
df2 = pd.read_excel("data.xlsx", engine="openpyxl")
df2.h... | github_jupyter |
<img src="https://upload.wikimedia.org/wikipedia/commons/4/47/Logo_UTFSM.png" width="200" alt="utfsm-logo" align="left"/>
# MAT281
### Aplicaciones de la Matemรกtica en la Ingenierรญa
## Mรณdulo 02
## Clase 01: Computaciรณn Cientรญfica
## Objetivos
* Conocer las librerรญas de computaciรณn cientรญfica
* Trabajar con arreglo... | github_jupyter |
# Comparing the three algorithms by Neal
```
import numpy as np
import scipy.stats as stats
import subprocess
import matplotlib.pyplot as plt
from google.protobuf.internal.decoder import _DecodeVarint32
import sys
sys.path.insert(0, '..')
from proto.py.algorithm_state_pb2 import AlgorithmState
import arviz as az
# imp... | github_jupyter |
#**Ctrl4AI**
A helper package for Machine Learning and Deep Learning solutions
**Developers:** Shaji, Charu, Selva

**Highlights**
- Open Source Package with emphasis on data preprocessing so far.
- Self intelligent... | github_jupyter |
# TensorFlow 2.0
```
import os
from glob import glob
from datetime import datetime
import numpy as np
import tensorflow as tf
from tensorflow.keras import layers
from tensorflow.keras import datasets
import matplotlib.pyplot as plt
%load_ext tensorboard
%matplotlib inline
```
## Hyperparameter Tunning
```
num_... | github_jupyter |
# Variational AutoEncoder
**Author:** [fchollet](https://twitter.com/fchollet)<br>
**Date created:** 2020/05/03<br>
**Last modified:** 2020/05/03<br>
**Description:** Convolutional Variational AutoEncoder (VAE) trained on MNIST digits.
## Setup
```
import numpy as np
import tensorflow as tf
from tensorflow import ke... | github_jupyter |
```
from google.colab import drive
drive.mount('/content/drive')
```
#**Part 1 - Data gathering and feature engineering**
**Libraries**
```
import numpy as np #Linear_Algebra
import matplotlib.pyplot as plt
import pandas as pd #Data_Processing
import pandas_datareader as pdr
from scipy import stats
%matplotlib inlin... | github_jupyter |
# 1. Import libraries
```
#----------------------------Reproducible----------------------------------------------------------------------------------------
import numpy as np
import tensorflow as tf
import random as rn
import os
seed=0
os.environ['PYTHONHASHSEED'] = str(seed)
np.random.seed(seed)
rn.seed(seed)
#sess... | github_jupyter |
## Interactive Computing in Jupyter and Python with OmniSci
 
### Bio
Tony Fast is a Developer Advocate at Quansight with a passion for literate programing and a contributor to Jupyt... | github_jupyter |
# DL Indaba Practical 2
# Feedforward Neural Networks on Real Data & Best Practices
*Developed by Stephan Gouws, Avishkar Bhoopchand & Ulrich Paquet.*
**Introduction**
In this practical we will move on and discuss best practices for building and training models on real world data (the famous MNIST dataset of hand-wri... | github_jupyter |
# Cartographic Visualization
_โThe making of maps is one of humanity's longest established intellectual endeavors and also one of its most complex, with scientific theory, graphical representation, geographical facts, and practical considerations blended together in an unending variety of ways.โ_ — [H. J. Stewar... | github_jupyter |
In this part of the tutorial, we run two ontology based methods to produce vector representations of biological entities: Onto2Vec and OPA2Vec.
## Onto2vec
Onto2vec produces vectory representations based on the logical axioms of an ontology and the known associations between ontology classes and biological entities. ... | github_jupyter |
## Copyright 2021 Antoine Simoulin.
<i>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](https://www.apache.org/licenses/LICENSE-2.0)
Unless required by ... | github_jupyter |
# The Atoms of Computation
Programming a quantum computer is now something that anyone can do in the comfort of their own home.
But what to create? What is a quantum program anyway? In fact, what is a quantum computer?
These questions can be answered by making comparisons to standard digital computers. Unfortuna... | github_jupyter |
# Ensemble sorting of a Neuropixel recording (2)
This notebook reproduces supplemental figure S2 from the paper [**SpikeInterface, a unified framework for spike sorting**](https://www.biorxiv.org/content/10.1101/796599v2).
The recording was made by [Andrรฉ Marques-Smith](https://andremarques-smith.com/) in the lab of ... | github_jupyter |
<a href="https://colab.research.google.com/github/probml/pyprobml/blob/master/book1/supplements/autodiff_jax.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Automatic differentiation using JAX
In this section, we illustrate automatic differentat... | github_jupyter |
Este breve tutorial explica alguna de las herramientas bรกsicas de Ciencia de Datos disponibles en Python
# ยฟQuรฉ es Python?
- Python es un lenguaje de programaciรณn interpretado.
- Su nombre proviene de la aficiรณn de su creador original, [Guido van Rossum](https://es.wikipedia.org/wiki/Guido_van_Rossum), por los humori... | github_jupyter |
# Setting up + Problem Solving in Python
### [y3l2n](http://twitter.com/y3l2n)
# Outline
* Development environment
* Writing/running code
* Useful python modules for data anaylsis
* Basic data analysis without any modules
# Development Environment
* Caveat: Linux/Mac OS X oriented
* Distributions of python (python2 v... | github_jupyter |
# Sparse Autoencoder
็ถๅจ่จ็ทดไธๅๆฎ้็ `autoenoder` ๆ๏ผๅฆๆๅ่ฉฆไธๅ
ฅไธไบ่ผธๅ
ฅ๏ผๆ็ๅฐไธญ้่จฑๅค็็ฅ็ถๅ
(hidden unit) ๅคง้จๅ้ฝๆๆๆๅๆ (activate)๏ผๅๆ็ๆๆๆฏ้ๅ็ฅ็ถๅ
็่ผธๅบไธๆ็ญๆผ้ถ๏ผไนไธๆๅพๆฅ่ฟ้ถ๏ผ่ๆฏๅคงๆผ้ถ่จฑๅค๏ผ็ฝ่ฉฑ็ๆๆๅฐฑๆฏ็ฅ็ถๅ
่ชช๏ผใๅฆ๏ผ้ๅ่ผธๅ
ฅๆ่ช่ญๅข๏ฝใ
็ถ่ๆๅๆฏไธๆณ่ฆ็ๅฐ้ๆจฃ็ๆ
ๅฝข็๏ผๆๅๆณ่ฆ็ๅฐ็ๆ
ๅฝขๆฏๆฏๅ็ฅ็ถๅ
ๅชๅฐไธไบไบ่จ็ทด่ผธๅ
ฅๆๅๆ๏ผไพๅฆๆๅฏซๆธๅญ 0-9๏ผ้ฃ็ฅ็ถๅ
A ๅชๅฐๆธๅญ 5 ๆๅๆ๏ผ็ฅ็ถๅ
B ๅชๅฐ 7 ๆๅๆ ... ็ญ๏ผ็บไป้บผ่ฆ้ๆจฃ็็ตๆๅข๏ผๅจ [Quora](https://www.quora.com/Why-are-sparse... | github_jupyter |
##### Copyright 2020 Google LLC.
Licensed under the Apache License, Version 2.0 (the "License");
```
#@title License header
# Copyright 2020 Google LLC
#
# 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 ... | github_jupyter |
# Python graphics: Matplotlib fundamentals
We illustrate three approaches to graphing data with Python's Matplotlib package:
* [Approach 1](#Approach-1:--Apply-plot-methods-to-dataframes): Apply a `plot()` method to a dataframe
* [Approach 2](#Approach-2:--plt.plot): Use the `plot(x,y)` function from `matplot... | 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);borde... | github_jupyter |
# Week 2
## Introduction to Solid State
```
import numpy as np
import matplotlib.pyplot as plt
import os
import subprocess
from polypy.read import History
from polypy.msd import MSD
from polypy import plotting
def get_diffusion(file, atom):
with open(file) as f:
y = False
for line in f:
... | github_jupyter |
# Adversarial-Robustness-Toolbox for scikit-learn ExtraTreesClassifier
```
from sklearn.ensemble import ExtraTreesClassifier
from sklearn.datasets import load_iris
import numpy as np
from matplotlib import pyplot as plt
from art.estimators.classification import SklearnClassifier
from art.attacks.evasion import ZooAt... | github_jupyter |
CER010 - Install generated Root CA locally
==========================================
This notebook will copy locally (from a Big Data Cluster) the generated
Root CA certificate that was installed using either:
- [CER001 - Generate a Root CA
certificate](../cert-management/cer001-create-root-ca.ipynb)
- [CER0... | github_jupyter |
# AoC Day 3
Jenna Jordan
3 December 2021
## Prompt
--- Day 3: Binary Diagnostic ---
The submarine has been making some odd creaking noises, so you ask it to produce a diagnostic report just in case.
### Part 1
The diagnostic report (your puzzle input) consists of a list of binary numbers which, when decoded prop... | github_jupyter |
# Efficient RAW file generation by subsampling
This tutorial discusses generating high resolution synthetic data with smaller volumes by using lower sample rates.
If you have access to a GPU, it is highly recommended to install CuPy, which performs the equivalent NumPy array operations on the GPU (https://docs.cupy.de... | github_jupyter |
##### Copyright 2019 The TensorFlow 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 or ... | github_jupyter |
# Session 5: Generative Networks
## Assignment: Generative Adversarial Networks and Recurrent Neural Networks
<p class="lead">
<a href="https://www.kadenze.com/courses/creative-applications-of-deep-learning-with-tensorflow/info">Creative Applications of Deep Learning with Google's Tensorflow</a><br />
<a href="http://... | github_jupyter |
## Dependencies
```
import json, glob
from tweet_utility_scripts import *
from tweet_utility_preprocess_roberta_scripts_aux import *
from transformers import TFRobertaModel, RobertaConfig
from tokenizers import ByteLevelBPETokenizer
from tensorflow.keras import layers
from tensorflow.keras.models import Model
```
# L... | github_jupyter |
```
%matplotlib inline
import pandas as pd
idx = pd.IndexSlice
from IPython.core.display import HTML
css = open('style-table.css').read() + open('style-notebook.css').read()
HTML('<style>{}</style>'.format(css))
%%time
cast = pd.DataFrame.from_csv('data/cast.csv', index_col=None)
cast.head()
%%time
release_dates = pd.r... | github_jupyter |
<a href="https://colab.research.google.com/github/THargreaves/beginners-python/blob/master/session_one/session_one_blank_template.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
<center>Spotted a mistake? Report it <a href="https://github.com/THargr... | github_jupyter |
Deep Learning
=============
Assignment 1
------------
The objective of this assignment is to learn about simple data curation practices, and familiarize you with some of the data we'll be reusing later.
This notebook uses the [notMNIST](http://yaroslavvb.blogspot.com/2011/09/notmnist-dataset.html) dataset to be used... | github_jupyter |
# Climate classification with neural networks
The [Kรถppen Climate classification](https://en.wikipedia.org/wiki/Kรถppen_climate_classification) is a widely used climate classification system. It classifies locations around the world as climates like "Tropical rainforest" or "Warm summer continental".

- [Apply the correction function](#apply_vcor)
- [Display the results](#display)
**EVENT**: A tornado associated to a rotating cell that took place ne... | github_jupyter |
# Round Trip Tear Sheet Example
When evaluating the performance of an investing strategy, it is helpful to quantify the frequency, duration, and profitability of its independent bets, or "round trip" trades. A round trip trade is started when a new long or short position is opened and then later completely or partiall... | github_jupyter |
# Collaborative filtering on the MovieLense Dataset
## Learning Objectives
1. Know how to explore the data using BigQuery
2. Know how to use the model to make recommendations for a user
3. Know how to use the model to recommend an item to a group of users
###### This notebook is based on part of Chapter 9 of [BigQuer... | github_jupyter |
# Within Top 10% with Simple Regression Model.
# Step By Step Procedure To Predict House Price
# Importing packages
We have **numpy** and **pandas** to work with numbers and data, and we have **seaborn** and **matplotlib** to visualize data. We would also like to filter out unnecessary warnings. **Scipy** for normali... | github_jupyter |
```
import random
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.model_selection import train_test_split
from keras.layers import Embedding, Dense, Input, Flatten, Concatenate, Dropout
from keras.models import Model, load_model, Sequential
from keras.utils import to_categori... | github_jupyter |
### 1. Import This Stuff
```
import gym
import matplotlib.pyplot as plt
%matplotlib inline
import numpy as np
def step(action, num_steps=1):
e =env.unwrapped
actions_meanings = e.get_action_meanings()
# print(actions_meanings)
act_dict = {actions_meanings[i].lower():i for i in range(len(actions_meanin... | github_jupyter |
# NODDI-Watson
*(Zhang et al. 2012)* proposed a model to estimate the dispersion of neurites (i.e. both axons and neuron dendrites), and is called Neurite Orientation Dispersion and Density Imaging (NODDI). It models dispersion for a single axon bundle using a Watson distribution $W(\kappa,\boldsymbol{\mu})$, that is ... | github_jupyter |
```
%matplotlib inline
```
# Build a Neural Network
Neural networks comprise of layers/modules that perform operations on data.
The [torch.nn](https://pytorch.org/docs/stable/nn.html) namespace provides all the building blocks you need to
build your own neural network. Every module in PyTorch subclasses the [nn.Mod... | github_jupyter |
# AIT Development notebook
## notebook of structure
|#|area name|cell num|description|edit or not|
|---|---|---|---|---|
| 1|flags set|1|setting of launch jupyter or ait flag.|no edit|
| 2|ait-sdk install|1|Use only jupyter launch.<br>find ait-sdk and install.|no edit|
| 3|create requirements and pip install|3|Use o... | github_jupyter |
# Collision Avoidance - Train Model
Welcome to this host side Jupyter Notebook! This should look familiar if you ran through the notebooks that run on the robot. In this notebook we'll train our image classifier to detect two classes
``free`` and ``blocked``, which we'll use for avoiding collisions. For this, we'll... | github_jupyter |
### Import Libraries
```
import gym
import utils
import numpy as np
import random
from tqdm import tqdm
import matplotlib.pyplot as plt
%matplotlib inline
```
### Create Bandit class as environment
```
# Here the default setting is to have 2 arms,
# first one having a probability of winning 0.5 and reward 1, and
# ... | github_jupyter |
```
import sys
import numpy as np
import pandas as pd
import itertools
from collections import Counter
import pysubgroup as ps
sys.setrecursionlimit(3000)
import pickle
from SDDeclinations import *
from SGDiscovery import *
from SDPostprocessing import *
from DynamicThreshold import *
from scipy.stats import expon, gam... | github_jupyter |
# Hands-on: Training and deploying Question Answering with BERT
Pre-trained language representations have been shown to improve many downstream NLP tasks such as question answering, and natural language inference. Devlin, Jacob, et al proposed BERT [1] (Bidirectional Encoder Representations from Transformers), which f... | github_jupyter |
```
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import mglearn
from sklearn.linear_model import Ridge
from sklearn.model_selection import train_test_split
%matplotlib inline
X, y = mglearn.datasets.load_extended_boston()
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0... | github_jupyter |
[](https://colab.research.google.com/github/mravanba/comp551-notebooks/blob/master/MLE.ipynb)
# Maximum Likelihood
```
import numpy as np
#%matplotlib notebook
%matplotlib inline
import matplotlib.pyplot as plt
from IPython.core.debugger import... | github_jupyter |
```
import pandas as pd
import altair as alt
import altair_latimes as lat
alt.themes.register('latimes', lat.theme)
alt.themes.enable('latimes')
alt.data_transformers.enable('json')
pitches = pd.read_csv("./input/curveballs.csv")
pitches.info()
pitches.release_speed.describe()
pitches.release_spin_rate.describe()
pitch... | github_jupyter |
# Network Training
Having implemented and tested all the components of the final networks in steps 1-3, we are now ready to train the network on a large dataset (ImageNet).
```
import gc
import datetime
import pandas as pd
import numpy as np
from copy import deepcopy
from tqdm import tqdm
from keras.preprocessing.i... | github_jupyter |
## Dependencies
```
!pip install --quiet /kaggle/input/kerasapplications
!pip install --quiet /kaggle/input/efficientnet-git
import warnings, glob
from tensorflow.keras import Sequential, Model
import efficientnet.tfkeras as efn
from cassava_scripts import *
seed = 0
seed_everything(seed)
warnings.filterwarnings('ig... | github_jupyter |
# Creating a simple Auto-encoders from scratch with Fashion-MNIST dataset.
## 1) Import modules
```
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import seaborn as sns
import warnings
warnings.filterwarnings('ignore')
from t... | github_jupyter |
```
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import numpy as np
sns.axes_style("white")
def show_lineplot(df, hue='model', x='iteration', y='item_rank', xlabel='Iteration', ylabel='Item Rank', name="item_rank_iteration", save=True):
fig, ax = plt.subplots(figsize=(6, 3))
# df = ... | github_jupyter |
<h1><center> INTRODUCTION TO PYTHON BASICS
```
# Taking input from the user
num = int(input("Enter a number:"))
print("The number entered by the user: ", num)
type(num)
a = 5
type(a)
type(float(a))
b = 5.5
type(b)
type(int(b))
```
<h2> Arithmetic Operators
```
print(a+b)
print(a-b)
print(a*b)
print(a/b)
pri... | github_jupyter |
# Load unique tweet tokens from file
# Remove mentions and hashtags from tweets
### Save in another file the number of mentions for that tweet and the mentions list (same for hashtags)
```
import time
from TokenizerWrapper import TokenizerWrapper
from TokenizerWrapper import special_tokens
import numpy as np
```
##... | github_jupyter |
# Tutorial Part 6: Introduction to Graph Convolutions
In this tutorial we will learn more about "graph convolutions." These are one of the most powerful deep learning tools for working with molecular data. The reason for this is that molecules can be naturally viewed as graphs.
 _โMorphological tessellation as a way of partitioning space: Improving consis... | github_jupyter |
```
import pandas as pd, numpy as np, string, re, pytz
import matplotlib.pyplot as plt, matplotlib.font_manager as fm
from datetime import datetime as dt
%matplotlib inline
# define the fonts to use for plots
family = 'DejaVu Sans'
title_font = fm.FontProperties(family=family, style='normal', size=20, weight='normal', ... | github_jupyter |
<a href="https://colab.research.google.com/github/Jaydenzk/DS-Unit-1-Sprint-3-Statistical-Tests-and-Experiments/blob/master/module3-introduction-to-bayesian-inference/LS_DS_133_Introduction_to_Bayesian_Inference.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Col... | github_jupyter |
```
# Copyright 2021 NVIDIA Corporation. All Rights Reserved.
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | github_jupyter |
<a href="https://colab.research.google.com/github/SiegfriedZhen/ptt-analysis/blob/master/ptt_etl_201910.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# ptt็็ถฒ่ทฏๅๆ(network analysis)
#### ่ฟๆๅคฉไธ็ๅฐ้ก[่ผฟ่ซๆฐ็ญ](https://www.cw.com.tw/article/article.action?id=5... | github_jupyter |
```
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
```
## Aprendizaje de variedades
Una de las debilidades del PCA es que no puede detectar caracterรญsticas no lineales. Un conjunto de algoritmos que evitan este problema son los algoritmos de aprendizaje de variedades (*manifold learning*). Un c... | github_jupyter |
## __INTRODUCTION__
### __ARTIFICIAL NEURAL NETWORKS__
* ML models that have a graph structure,inspired by the brain structure, with many interconnected units called artificial naurons https://www.youtube.com/watch?v=3JQ3hYko51Y
* ANN have the ability to learn from raw data imputs, but it also makes them slower ... | github_jupyter |
# Classification on Iris dataset with sklearn and DJL
In this notebook, you will try to use a pre-trained sklearn model to run on DJL for a general classification task. The model was trained with [Iris flower dataset](https://en.wikipedia.org/wiki/Iris_flower_data_set).
## Background
### Iris Dataset
The dataset c... | github_jupyter |
# ๆบๅจๅญฆไน ๅทฅ็จๅธ็บณ็ฑณๅญฆไฝ
## ๅผบๅๅญฆไน
## ้กน็ฎ 4: ่ฎญ็ปๆบ่ฝๅบ็ง่ฝฆๅญฆไผ้ฉพ้ฉถ
ๆฌข่ฟๆฅๅฐๆบๅจๅญฆไน ๅทฅ็จๅธ็บณ็ฑณๅญฆไฝ็็ฌฌๅไธช้กน็ฎ๏ผๅจ่ฟไธชnotebookๆไปถไธญ๏ผๆจกๆฟไปฃ็ ๅทฒ็ปๆไพ็ปไฝ ๏ผๆๅฉไบไฝ ๅฏน*ๆบ่ฝๅบ็ง่ฝฆ*็ๅๆๅๅฎ็ฐๅญฆไน ็ฎๆณใไฝ ๆ ้กปๆนๅจๅทฒๅ
ๅซ็ไปฃ็ ๏ผ้ค้ๅฆๆ่ฆๆฑใ ไฝ ้่ฆๅ็ญnotebookๆไปถไธญ็ปๅบ็ไธ้กน็ฎๆๅฏ่งๅ็ธๅ
ณ็้ฎ้ขใๆฏไธไธชไฝ ่ฆๅ็ญ็้ฎ้ขๅ้ฝไผๅ ไปฅ**'้ฎ้ข X'**ใไป็ป้
่ฏปๆฏไธช้ฎ้ข๏ผๅนถๅจๅ้ข**'ๅ็ญ'**ๆๆฌๆกๅ
็ปๅบๅฎๆด็ๅ็ญใไฝ ๆไบค็้กน็ฎไผๆ นๆฎไฝ ๅฏนไบๆฏไธช้ฎ้ข็ๅ็ญไปฅๅๆไบค็`agent.py`็ๅฎ็ฐๆฅ่ฟ่ก่ฏๅใ
>**ๆ็คบ๏ผ** Code ๅ Markdown ๅๅ
ๆ ผๅฏ้่ฟ **Shift + Enter*... | github_jupyter |
# Tutorial 2. Solving a 1D diffusion equation
```
# Document Author: Dr. Vishal Sharma
# Author email: sharma_vishal14@hotmail.com
# License: MIT
# This tutorial is applicable for NAnPack version 1.0.0-alpha4
```
### I. Background
The objective of this tutorial is to present the step-by-step solution of a 1D diffus... | github_jupyter |
# Overview
- nb022ใฎๆน่ฏ
- focal loss ใฎๆ้ฉๅใ่กใชใ
- nb019ใฎfolcal lossใไฝฟใ
- top8ใ้คใ
```
# gitใฎhash
import subprocess
cmd = "git rev-parse --short HEAD"
hash = subprocess.check_output(cmd.split()).strip().decode('utf-8')
print(hash)
```
# Const
```
# basic
NB = '023'
DEBUG = False
isPI = False
isShowLog = False
PATH_TRAIN... | github_jupyter |
```
from datetime import date, timedelta
import pandas as pd
import numpy as np
from sklearn.metrics import mean_squared_error
import lightgbm as lgb
cd E:\Time-Series Data
df_train_train = pd.read_csv("train.csv", usecols=[1, 2, 3, 4, 5],
dtype={'onpromotion': bool},
converters={'unit_sales': lambda u: np.log... | github_jupyter |
# Working with raster data in python
## Table of Contents
1. [About the dataset](#dataset)<br>
2. [Part 1 - Weather maps with netCDF4 and matplotlib](#part1)<br>
2.1. [Import packages](#import1)<br>
2.2. [Load gridded data with netCDF4](#load1)<br>
2.3. [Create a global map of the average temperature in ... | github_jupyter |
##### Copyright 2020 Google LLC.
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 or agreed to in writing, softwar... | github_jupyter |
# Data Processing with Python and Pandas Part One
## Today's Topics
* What/Why Pandas
* Data Structures
* Loading Data
* Basic Data Manipulation
## What is Pandas
* Pandas is a 3rd-party library for doing data analysis
* It is a foundational component of Python data science
* Developed by [Wes McKinney](http://we... | github_jupyter |
```
import numpy as np
from itertools import permutations
from collections import defaultdict
import random
```
# load and parse dataset
```
!file umls -I
raw_data = []
entities = set()
with open('umls', 'r') as to_read:
for i, line in enumerate(to_read.readlines()):
s, p, o = line.strip().split(' ')
... | github_jupyter |
```
# THIS CELL SETS STUFF UP FOR DEMO / COLLAB. THIS CELL CAN BE IGNORED.
#-------------------------------------GET RID OF TF DEPRECATION WARNINGS--------------------------------------#
import warnings
warnings.filterwarnings('ignore', category=FutureWarning)
import tensorflow as tf
tf.compat.v1.logging.set_verbosit... | github_jupyter |
```
import numpy as np
import pandas as pd
import sklearn
import seaborn as sn
import time
import matplotlib.pyplot as plt
from collections import defaultdict
from collections import Counter
from imblearn.under_sampling import RandomUnderSampler
from sklearn.metrics import confusion_matrix,classification_report
from sk... | github_jupyter |
```
" Import the libraries "
import os
import sys
import math
import copy
import numpy as np
import pandas as pd
from sklearn.neural_network import MLPClassifier
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import StandardScaler
" Import the scripts of SD for Explaining and the supplementa... | github_jupyter |
# Distributed Estimation
This notebook goes through a couple of examples to show how to use `distributed_estimation`. We import the `DistributedModel` class and make the exog and endog generators.
```
import numpy as np
from scipy.stats.distributions import norm
from statsmodels.base.distributed_estimation import D... | github_jupyter |
```
from setup import *
import sys
# if DATA_PATH not in sys.path: sys.path.append(DATA_PATH)
%matplotlib inline
display(HTML("<style>.container { width:100% !important; }</style>"))
pd.set_option('display.max_rows', 4)
pd.set_option('display.max_columns', 200)
tfdf = pd.read_csv(os.path.join(DATA_PATH, 'tweet_vocab.cs... | github_jupyter |
# MUTRAFF - Congestion Map Drawing
Congestion tracing based on Mutraff Experiments over Google Maps
References:
* Mutraff
* Jupyter gmaps: https://jupyter-gmaps.readthedocs.io/en/v0.3.3/gmaps.html
* Blog examples: https://people.revoledu.com/kardi/tutorial/Python/Displaying+Locations+using+Heatmap.html
## Imports sect... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.