path
stringlengths
7
265
concatenated_notebook
stringlengths
46
17M
exercises/ex1-DAR/teched2020-INT260_Data_Attribute_Recommendation.ipynb
###Markdown Cleaning up a service instance*Back to [table of contents](Table-of-Contents)*To clean all data on the service instance, you can run the following snippet. The code is self-contained and does not require you to execute any of the cells above. However, you will need to have the `key.json` containing a servi...
examples/Train_ppo_cnn+eval_contact-(pretrained).ipynb
###Markdown if you wish to set which cores to useaffinity_mask = {4, 5, 7} affinity_mask = {6, 7, 9} affinity_mask = {0, 1, 3} affinity_mask = {2, 3, 5} affinity_mask = {0, 2, 4, 6} pid = 0os.sched_setaffinity(pid, affinity_mask) print("CPU affinity mask is modified to %s for process id 0" % affinity_mask) DEFAULT '...
courses/08_Plotly_Bokeh/Fire_Australia19.ipynb
###Markdown Vuoi conoscere gli incendi divampati dopo il 15 settembre 2019? ###Code mes = australia_1[(australia_1["acq_date"]>= "2019-09-15")] mes.head() mes.describe() map_sett = folium.Map([-25.274398,133.775136], zoom_start=4) lat_3 = mes["latitude"].values.tolist() long_3 = mes["longitude"].values.tolist() austral...
presentations/How To - Estimate Pi.ipynb
###Markdown Estimating $\pi$ by Sampling PointsBy Evgenia "Jenny" Nitishinskaya and Delaney Granizo-MackenzieNotebook released under the Creative Commons Attribution 4.0 License.---A stochastic way to estimate the value of $\pi$ is to sample points from a square area. Some of the points will fall within the area of a c...
Concise_Chit_Chat.ipynb
###Markdown Concise Chit ChatGitHub Repository: Code TODO:1. create a DataLoader class for dataset preprocess. (Use tf.data.Dataset inside?)1. Create a PyPI package for easy load cornell movie curpos dataset(?)1. Use PyPI module `embeddings` to load `GLOVES`, or use tfhub to load `GLOVES`?1. How to do a `clip_norm`(...
community/awards/teach_me_qiskit_2018/quantum_machine_learning/1_K_Means/Quantum K-Means Algorithm.ipynb
###Markdown Trusted Notebook" width="500 px" align="left"> _*Quantum K-Means algorithm*_ The latest version of this notebook is available on https://github.com/qiskit/qiskit-tutorial.*** Contributors Shan Jin, Xi He, Xiaokai Hou, Li Sun, Dingding Wen, Shaojun Wu and Xiaoting Wang$^{1}$1. Institute of Fundamental and ...
run/monitor-flir-service.ipynb
###Markdown Install and monitor the FLIR camera serviceInstall ###Code ! sudo cp flir-server.service /etc/systemd/system/flir-server.service ###Output _____no_output_____ ###Markdown Start the service ###Code ! sudo systemctl start flir-server.service ###Output _____no_output_____ ###Markdown Stop the service ###Code ...
Problem_3.ipynb
###Markdown ###Code import math def f(x): return(math.exp(x)) #Trigo function a = -1 b = 1 n = 10 h = (b-a)/n #Width of Trapezoid S = h * (f(a)+f(b)) #Value of summation for i in range(1,n): S += f(a+i*h) Integral = S*h print('Integral = %0.4f' %Integral) ###Output Integral = 2.1731 ###Markdown ###Code im...
eda/hyper-parameter_tuning/random_forest-Level0.ipynb
###Markdown Get Training Data ###Code # get training data train_df = pd.read_csv(os.path.join(ROOT_DIR,DATA_DIR,FEATURE_SET,'train.csv.gz')) X_train = train_df.drop(ID_VAR + [TARGET_VAR],axis=1) y_train = train_df.loc[:,TARGET_VAR] X_train.shape y_train.shape y_train[:10] ###Output _____no_output_____ ###Markdown Set...
05-statistics.ipynb
###Markdown Statistics **Quick intro to the following packages**- `hepstats`.I will not discuss here the `pyhf` package, which is very niche.Please refer to the [GitHub repository](https://github.com/scikit-hep/pyhf) or related material at https://scikit-hep.org/resources. **`hepstats` - statistics tools and utilities...
wgan_experiment/WGAN_experiment.ipynb
###Markdown Let's look at:Number of labels per image (histogram)Quality score per image for images with multiple labels (sigmoid?) ###Code import csv from itertools import islice from collections import defaultdict import pandas as pd import matplotlib.pyplot as plt import torch import torchvision import numpy as np CS...
site/en/guide/data.ipynb
###Markdown Copyright 2018 The TensorFlow Authors.Licensed under the Apache License, Version 2.0 (the "License"); ###Code #@title Licensed under the Apache License, Version 2.0 (the "License"); { display-mode: "form" } # you may not use this file except in compliance with the License. # You may obtain a copy of the Li...
Clustering Chicago Public Libraries.ipynb
###Markdown Clustering Chicago Public Libraries by Top 10 Nearby Venues Author: Kunyu HeUniversity of Chicago CAPP'20 Executive Summary In this notebook, I clustered 80 public libraries in the city of Chicago into 7 clusters, based on the categories of their top ten venues nearby. It would be a nice guide for those wh...
src/ipython/45 Simulation_Test.ipynb
###Markdown Simulation Test Introduction ###Code import sys import random import numpy as np import pylab from scipy import stats sys.path.insert(0, '../simulation') from environment import Environment from predator import Predator params = { 'env_size': 1000, 'n_patches': 20, 'n_trials': 100, 'max_mo...
23 - Python for Finance/2_Calculating and Comparing Rates of Return in Python/11_Calculating the Rate of Return of Indices (5:03)/Calculating the Return of Indices - Solution_Yahoo_Py3.ipynb
###Markdown Calculating the Return of Indices *Suggested Answers follow (usually there are multiple ways to solve a problem in Python).* Consider three famous American market indices – Dow Jones, S&P 500, and the Nasdaq for the period of 1st of January 2000 until today. ###Code import numpy as np import pandas as pd f...
docs/notebooks/negative_binomial.ipynb
###Markdown Negative Binomial Regression (Students absence example) Negative binomial distribution review I always experience some kind of confusion when looking at the negative binomial distribution after a while of not working with it. There are so many different definitions that I usually need to read everything m...
Step3_SVM-ClassifierTo-LabelVideoData.ipynb
###Markdown Check the distribution of the true and false trials ###Code mu, sigma = 0, 0.1 # mean and standard deviation s = np.random.normal(mu, sigma, 1000) k2_test, p_test = sc.stats.normaltest(s, axis=0, nan_policy='omit') print("p = {:g}".format(p_test)) if p_test < 0.05: # null hypothesis - the distribution is ...
lectures/ng/Lecture-07-Support-Vector-Machines.ipynb
###Markdown Versions and Acknowledgements ###Code import sys sys.path.append("../../src") # add our class modules to the system PYTHON_PATH from ml_python_class.custom_funcs import version_information version_information() ###Output Module Versions -------------------- ------------------------------...
module-1/Intro-Pandas/your-code/main.ipynb
###Markdown Introduction to PandasComplete the following set of exercises to solidify your knowledge of Pandas fundamentals. 1. Import Numpy and Pandas and alias them to `np` and `pd` respectively. ###Code # your code here import numpy as np import pandas as pd ###Output _____no_output_____ ###Markdown 2. Create a ...
Discussion Section Notes/Discussion Week 1.ipynb
###Markdown Question 1 ###Code string = " Hello World" print(string) string*3 ###Output Hello World ###Markdown Question 2 ###Code looper = [1,2,3,4,6,8] for thing in looper: print(thing) for thing in string: print(thing) string_n = "123468" for thing in string_n: print(thing) ###Output 1 ...
PyTorch/.ipynb_checkpoints/Matrizes_Arrays_Tensores-checkpoint.ipynb
###Markdown Matrizes, Arrays, Tensores Referências - Documentação oficial de Tensores do PyTorch http://pytorch.org/docs/master/tensors.html- PyTorch para usuários NumPy: https://github.com/torch/torch7/wiki/Torch-for-Numpy-users NumPy array ###Code import numpy as np a = np.array([[2., 8., 3.], ...
problem_code.ipynb
###Markdown ProblemImplement the **k-means**, **SLIC**, and **Ratio Cut** algorithms for segmenting a given bioimage into multiple segments. Use attached image or any other bioimage to show the segmentation results of your algorithms. Utility Functions ###Code def visualize_clusters(image, labels, n_clusters, subp): ...
intro-to-pytorch/Part 1 - Tensors in PyTorch (Exercises).ipynb
###Markdown Introduction to Deep Learning with PyTorchIn this notebook, you'll get introduced to [PyTorch](http://pytorch.org/), a framework for building and training neural networks. PyTorch in a lot of ways behaves like the arrays you love from Numpy. These Numpy arrays, after all, are just tensors. PyTorch takes th...
notebooks/eXate_samples/pysyft/duet_multi/.ipynb_checkpoints/5.0-mg-central-aggregator-checkpoint.ipynb
###Markdown Syft Duet for Federated Learning - Central Aggregator SetupFirst we need to install syft 0.3.0 because for every other syft project in this repo we have used syft 0.2.9. However, a recent update has removed a lot of the old features and replaced them with this new 'Duet' function. To do this go into your t...
pyscal/part3/05_distinguishing_solid_liquid.ipynb
###Markdown Distinction of solid liquid atoms and clustering In this example, we will take one snapshot from a molecular dynamics simulation which has a solid cluster in liquid. The task is to identify solid atoms and cluster them. More details about the method can be found [here](https://pyscal.readthedocs.io/en/lat...
Housing Predi/house_pre.ipynb
###Markdown Data Cleaning- Most Machine Learning algorithms cannot work with missing features, so let’s create a few functions to take care of them. You noticed earlier that the total_bedroomsattribute has some missing values, so let’s fix this. You have three options:- Get rid of the corresponding districts.- Get rid...
lane_finding/lane_finding.ipynb
###Markdown 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 (real...
notebook/S03A_Scalars_Annotated.ipynb
###Markdown Scalars ###Code %matplotlib inline import numpy as np import matplotlib.pyplot as plt ###Output _____no_output_____ ###Markdown Integers Binary representation of integers ###Code format(16, '032b') ###Output _____no_output_____ ###Markdown Bit shifting ###Code format(16 >> 2, '032b') 16 >> 2 format(16 <...
5/rode.ipynb
###Markdown Lab 05 Solving a rigid system of differential equations Konks Eric, Б01-818X.9.7 $$y_1'=-0.04y_1+10^4y_2y_3$$ $$y_2'=0.04y_1-10^4y_2y_3-3*10^7y_2^2$$ $$y_3'=3*10^7y_2^2$$ $$y_1(0)=1,\ y_2(0)=0,\ y_3(0)=0$$ ###Code import unittest import logging import numpy as np import pandas as pd import matplotlib.pyplo...
week-3/week-3-1-class-empty.ipynb
###Markdown Week 3-1 - Linear Regression - class notebookThis notebook gives three examples of regression, that is, fitting a linear model to our data to find trends. For the finale, we're going to duplicate the analysis behind the Washington Post story ###Code import pandas as pd import numpy as np import matplotli...
neural_style_transfer.ipynb
###Markdown Neural style transfer**Author:** [fchollet](https://twitter.com/fchollet)**Date created:** 2016/01/11**Last modified:** 2020/05/02**Description:** Transfering the style of a reference image to target image using gradient descent. IntroductionStyle transfer consists in generating an imagewith the same "co...
cgames/05_sonic/sonic_a2c.ipynb
###Markdown Sonic The Hedgehog 1 with Advantage Actor Critic Step 1: Import the libraries ###Code import time import retro import random import torch import numpy as np from collections import deque import matplotlib.pyplot as plt from IPython.display import clear_output import math %matplotlib inline import sys sys....
use_case/use_case_2.ipynb
###Markdown Use Case PROFAB is a benchmarking platform that is expected to fill the gap of datasets about protein functions with total 7656 datasets. In addition to protein function datasets, ProFAB provides complete sets of preprocessing-training-evaluation triangle to speed up machine learning usage in biological st...
results_ipynb/single_neuron_exploration/cnn_initial_exploration.ipynb
###Markdown this notebook first collect all stats obtained in intial exploration.it will be a big table, indexed by subset, neuron, structure, optimization. result:I will use k9cX + k6s2 + vanilla as my basis. ###Code import h5py import numpy as np import os.path from functools import partial from collections import Or...
solutions/4 Deep Learning Intro Exercises Solution.ipynb
###Markdown Deep Learning Intro ###Code %matplotlib inline import matplotlib.pyplot as plt import pandas as pd import numpy as np ###Output _____no_output_____ ###Markdown Exercise 1 The [Pima Indians dataset](https://archive.ics.uci.edu/ml/datasets/Pima+Indians+Diabetes) is a very famous dataset distributed by UCI a...
14_linear_algebra/14_String_Problem-Students-1.ipynb
###Markdown 14 Linear Algebra: String Problem – Students (1) Motivating problem: Two masses on three stringsTwo masses $M_1$ and $M_2$ are hung from a horizontal rod with length $L$ in such a way that a rope of length $L_1$ connects the left end of the rod to $M_1$, a rope of length $L_2$ connects $M_1$ and $M_2$, and...
CERN - Practical Introduction To Quantum Computing/Lecture 4 Resources/8.-Deutsch-Jozsa And Grover With Aqua[Run In IBM Quantum Experience].ipynb
###Markdown Deutsch-Jozsa and Grover with Aqua The Aqua library in Qiskit implements some common algorithms so that they can be used without needing to program the circuits for each case. In this notebook, we will show how we can use the Deutsch-Jozsa and Grover algorithms. Detusch-Jozsa To use the Deutsch-Jozsa algo...
09/Lab12.ipynb
###Markdown Genetic Algorithm ###Code import random as rnd # returns the random array def random_arr(lower, upper, size): return [rnd.randrange(lower, upper+1) for _ in range(size)] # cross over between chromosomes def reproduce(x, y): tmp = rnd.randint(0, len(x)-1) return x[:tmp]+y[tmp:] # randomly chang...
Assignments/Assignment04_iris.ipynb
###Markdown Get Data ###Code import os import zipfile import urllib DOWNLOAD_ROOT = "https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data" IRIS_PATH = os.path.join("datasets", "iris") IRIS_URL = DOWNLOAD_ROOT def extract_iris_data(iris_url=IRIS_URL,iris_path=IRIS_PATH): if not os.path.isdir(...
guides/feature_tour_guide.ipynb
###Markdown 🌋 Quick Feature Tour [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/RelevanceAI/RelevanceAI-readme-docs/blob/v2.0.0/docs/getting-started/_notebooks/RelevanceAI-ReadMe-Quick-Feature-Tour.ipynb) 1. Set up Relevance AIGet started using o...
UG_S17/Mba-Kalu_Onwughalu-Brazil.ipynb
###Markdown ![Brazil Flag](http://www.brazil.org.za/brazil-images/brazil-flag.png) **Chukwuemeka Mba-Kalu** **Joseph Onwughalu** **An Analysis of the Brazilian Economy between 2000 and 2012** Final Project In Partial Fulfillment of the Course Requirements [**Data Bootcamp**](http://nyu.data-bootcamp.com/) S...
exercises/multiples_of_3_and_5/notebook.ipynb
###Markdown Multiples of 3 and 5 **Problem**: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. ###Code import numpy as np def multiples(k: int, below_threshold: int): output...
source/industry/telecom/notebooks/Ml-Telecom-NaiveBayes.ipynb
###Markdown Machine Learning for Telecom with Naive Bayes Introduction Machine Learning for CallDisconnectReason is a notebook which demonstrates exploration of dataset and CallDisconnectReason classification with Spark ml Naive Bayes Algorithm. ###Code from pyspark.sql.types import * from pyspark.sql import SparkSes...
examples/import_and_analyse_data.ipynb
###Markdown Interacting with CerebralCortex Data Cerebral Cortex is MD2K's big data cloud tool designed to support population-scale data analysis, visualization, model development, and intervention design for mobile-sensor data. It provides the ability to do machine learning model development on population scale datas...
UKIRTdataload.ipynb
###Markdown ###Code kplr1=pd.read_table('kplr002304168-2009131105131_llc_lc.tbl', skiprows=(lambda x: x in np.concatenate((np.arange(0,203), np.array([204,205,206])))), delim_whitespace=True, header=[0]) kplr1 for i in range(22): plt.plot(kplr1.iloc[:,i]) ...
wrangle_act.ipynb
###Markdown Project: Wrangling and Analyze Data ###Code import pandas as pd import numpy as np from twython import Twython import requests import json import time import matplotlib.pyplot as plt import seaborn as sns from wordcloud import WordCloud, STOPWORDS from PIL import Image import urllib ###Output _____no_outp...
examples/Trajectory Clustering.ipynb
###Markdown This notebook serves as a simple example on how to run the clustering algorithm on a MD trajectory file ###Code from raffy import trajectory_cluster as tc # Choose parameters frames = ':' # Indicate which frames to analyse k = 4 # Number of clusters to be found ncores = 1 # For multiprocessing, require...
Simulated Phenomenon.ipynb
###Markdown Table of Contents- [Introduction](introduction) - [Breastfeeding](breastfeeding) - [What is breastfeeding and why is it important?](w_breastfeeding) - [Variables](variables) - [Age](age) - [Civil Status](civil_status) - [Health Insurance Status](hel_ins_status) - [Initiate Breastfeeding](int_breastfee...
notebooks/3_nasa_data_initial_explore.ipynb
###Markdown NASA Data Exploration ###Code raw_data_dir = '../data/raw' processed_data_dir = '../data/processed' figsize_width = 12 figsize_height = 8 output_dpi = 72 # Imports import os import numpy as np import pandas as pd from datetime import datetime import matplotlib.pyplot as plt # Load Data nasa_temp_file = os....
_notebooks/2021-01-04-Lock-free-data-structures.ipynb
###Markdown Data structures for fast infinte batching or streaming requests processing > Here we dicuss one of the coolest use of a data structures to address one of the very natural use case scenario of a server processing streaming requests from clients in order.Usually processing these requests involve a pipeline o...
project-bikesharing/keyboard-shortcuts.ipynb
###Markdown Keyboard shortcutsIn this notebook, you'll get some practice using keyboard shortcuts. These are key to becoming proficient at using notebooks and will greatly increase your work speed.First up, switching between edit mode and command mode. Edit mode allows you to type into cells while command mode will us...
extras/overfitting_exercise.ipynb
###Markdown Overfitting ExerciseIn this exercise, we'll build a model that, as you'll see, dramatically overfits the training data. This will allow you to see what overfitting can "look like" in practice. ###Code import os import pandas as pd import numpy as np import math import matplotlib.pyplot as plt ###Output _...
day11.ipynb
###Markdown AOC 2020 Day 11Seat layout input is a grid:```L.LL.LL.LLLLLLLLL.LLL.L.L..L..LLLL.LL.LLL.LL.LL.LLL.LLLLL.LL..L.L.....LLLLLLLLLLL.LLLLLL.LL.LLLLL.LL```Grid entries can be one of:- `L` - empty seat- `` - occupied seat- `.` - floorRules are based on adjacent seats, 8 surrounding seats ala chess king moves (U,D...
techniques-and-models/w02-04c-jags-example.ipynb
###Markdown JAGS example in PyMC3This notebook attempts to solve the same problem that has been solved manually in [w02-04b-mcmc-demo-continuous.ipynb](http://localhost:8888/notebooks/w02-04b-mcmc-demo-continuous.ipynb), but using PyMC3 instead of JAGS as demonstrated in the course video. Problem DefinitionData is for...
SZZ/code_document/05_extract_affected_versions.ipynb
###Markdown Importing libraries ###Code import sys, os, re, csv, subprocess, operator import pandas as pd from urllib.request import urlopen import urllib.request from bs4 import BeautifulSoup ###Output _____no_output_____ ###Markdown Configure repository and directories ###Code userhome = os.path.expanduser('~') txt...
Section 6/6.1_code_Classification.ipynb
###Markdown Binomial Logistic Regression ###Code # logistic model with binary dependent variable from pyspark.ml.classification import LogisticRegression # Load training data training = spark.read.format("libsvm").load("sample_libsvm_data.txt") lr = LogisticRegression(maxIter=10, regParam=0.3, elasticNetParam=0.8) # Fi...
smomics_performance/.ipynb_checkpoints/Saturation_curve_UMIs_Stainings-checkpoint.ipynb
###Markdown Saturation curves for SM-omics and STInput files are generated by counting number of unique molecules and number of annotated reads per annotated region after adjusting for sequencing depth, in downsampled fastq files (proportions 0.001, 0.01, 0.05, 0.1, 0.2, 0.4, 0.6, 0.8, 1) processed using ST-pipeline. #...
NI-edu/fMRI-pattern-analysis/week_1/design_and_pattern_estimation.ipynb
###Markdown Experimental design and pattern estimationThis week's lab will be about the basics of pattern analysis of (f)MRI data. We assume that you've worked through the two Nilearn tutorials already. Functional MRI data are most often stored as 4D data, with 3 spatial dimensions ($X$, $Y$, and $Z$) and 1 temporal d...
hypothesis_00_1_5.ipynb
###Markdown Verificação das hipóteses relacionadas a nota média Verificação das hipóteses 0, 1 e 5Hipótese 0: Se o pedido é cancelado, a nota do pedido é menor \Hipótese 1: Se o pedido foi entregue com atraso, a nota do pedido será menor \Hipótese 5: Se o pedido atrasar sua nota será menor que três Definição do data...
utils/search_signlist.ipynb
###Markdown 2 Read Pickled Version of DataFrame ###Code sign_l = pd.read_pickle('output/sign_lines.p') ###Output _____no_output_____ ###Markdown 3 Prepare Data for Search ###Code anchor = '<a href="http://oracc.org/dcclt/{}", target="_blank">{}</a>' t = sign_l.copy() t['id_word'] = [anchor.format(val,val) for val in ...
dlnd_language_translation.ipynb
###Markdown Language TranslationIn this project, you’re going to take a peek into the realm of neural network machine translation. You’ll be training a sequence to sequence model on a dataset of English and French sentences that can translate new sentences from English to French. Get the DataSince translating the who...
notebooks/000-Instalando_Python.ipynb
###Markdown Curso de introducción a Python: procesamiento y análisis de datos La mejor forma de aprender a programar es haciendo algo útil, por lo que esta introducción a Python se centrará alrededor de una tarea común: el _análisis de datos_. En este taller práctico se hará un breve repaso a los conceptos básicos de ...
01_merge_resid.ipynb
###Markdown 시트별 파일명- 추정매출: sales_2018.csv- 상주인구: resid.csv- 상권변화지표 : regional_attraction.csv- 아파트: apt.csv- 점포: store.csv- 직장인구: employee.csv- 상권배후지의 소득소비: income.csv- 상권의 집객시설 : facilities.csv- 추정유동인구 : floating_pop.csv ###Code #매출 데이터 sales = pd.read_csv("sales_2018.csv", encoding='euc-kr') sales.head(10) sales_mer...
NEERAJAP2001/CLUSTERING-FOR-A-MALL-master/KMEANS CLUSTERING.ipynb
###Markdown KMEANS CLUSTERING Project follows the CRISP-DM Process while analyzing their data.PROBLEM :PREDICT THE CLUSTER OF CUSTOMERS BASED ON ANNUAL INCOME AND SPENDING TO BRING VALUABLE INSIGHTS FOR THE MALL. Questions : 1.Which cluster has both spending good score and income? 2.On which cluster should company ...
assignments/assignment04/TheoryAndPracticeEx02.ipynb
###Markdown Theory and Practice of Visualization Exercise 2 Imports ###Code from IPython.display import Image ###Output _____no_output_____ ###Markdown Violations of graphical excellence and integrity Find a data-focused visualization on one of the following websites that is a *negative* example of the principles th...
modules/layer_wise_learning_rate.ipynb
###Markdown Layer wise learning rate settingsIn this tutorial, we introduce how to easily select or filter out network layers and set specific learning rate values for transfer learning. MONAI provides a utility function to achieve this requirements: `generate_param_groups`, for example:```pynet = Unet(dimensions=3, ...
t81_558_class_14_04_ids_kdd99.ipynb
###Markdown T81-558: Applications of Deep Neural Networks**Module 14: Other Neural Network Techniques*** Instructor: [Jeff Heaton](https://sites.wustl.edu/jeffheaton/), McKelvey School of Engineering, [Washington University in St. Louis](https://engineering.wustl.edu/Programs/Pages/default.aspx)* For more information ...
tutorials/basics/2_feature_engineering.ipynb
###Markdown Featurizer This notebook demonstrates how to use `pyTigerGraph` for common data processing and feature engineering tasks on graphs stored in `TigerGraph`. Connection to Database The `TigerGraphConnection` class represents a connection to the TigerGraph database. Under the hood, it stores the necessary inf...
notebooks/experiments_with_raga.ipynb
###Markdown Functions to work out probabilities from notations ###Code def old_all_octaves(file): with open(file) as f: return f.read().strip().replace("\n",",").split(",") def old_octaves(): return ['sa','lre','re','lga','ga','ma','mau','pa','lda','da','lni','ni', 'sA','lrE','rE','lg...
examples/test.ipynb
###Markdown Examples for the implementation of different known distributions for the hmcparameter class ###Code class StateMultivarNormal(HMCParameter): def __init__(self, init_val, mu=0, sigma_inv=1): super().__init__(np.array(init_val)) self.mu = mu self.sigma_inv = sigma_inv def ge...
coursera_ml/a2_w1_s3_SparkML_Splitting.ipynb
###Markdown This notebook is designed to run in a IBM Watson Studio default runtime (NOT the Watson Studio Apache Spark Runtime as the default runtime with 1 vCPU is free of charge). Therefore, we install Apache Spark in local mode for test purposes only. Please don't use it in production.In case you are facing issues,...
docs/learning/beautiful-soup-web-scraping-first-steps.ipynb
###Markdown ###Code #print print(r.text[0:500 ]) from bs4 import BeautifulSoup # Initializer soup = BeautifulSoup(r.text, 'html.parser') # Finds all span tags with attributes class equal to short-desc results = soup.find_all('span', attrs={'class':'short-desc'}) len(results ) results[0:3] results[-1] fi...
Sentimental_Analysis.ipynb
###Markdown Using RNN ###Code # A simple RNN network to classify the emoji class from a input Sentence model = Sequential() model.add(SimpleRNN(64, input_shape=(10,50), return_sequences=True)) model.add(Dropout(0.5)) model.add(SimpleRNN(64, return_sequences=False)) model.add(Dropout(0.5)) model.add(Dense(5)) model.a...
Certamen/P2/201473611-8- Pregunta_2.ipynb
###Markdown INF285/ILI285 Computación Científica COP-1Nombre: Felipe Montero ConchaRol: 201473611-8 Pregunta 2 (a) ###Code def bisection_raiz (f,a,b,tol): while (b-a)/2 > tol: c = (a+b)/2 if f(c)==0: return c if f(a)*f(c)<0: b = c else: ...
ch04_Building_Good_TrainingData/Chapter04_CleaningData.ipynb
###Markdown Generally losing data is bad and should be avoided. To help we can impute data ###Code #### Mean Imputation from sklearn.preprocessing import Imputer imr = Imputer(missing_values='NaN', strategy='mean', axis = 0) imr = imr.fit(df) imputed_data = imr.transform(df.values) imputed_data ###Output _____no_outp...
_doc/notebooks/sklearn/quantile_mlpregression.ipynb
###Markdown Quantile MLPRegressor[scikit-learn](http://scikit-learn.org/stable/) does not have a quantile regression for multi-layer perceptron. [mlinsights](http://www.xavierdupre.fr/app/mlinsights/helpsphinx/index.html) implements a version of it based on the *scikit-learn* model. The implementation overwrites metho...
notebooks/MuscleSimulation.ipynb
###Markdown Muscle simulationMarcos Duarte, Renato Watanabe Let's simulate the 3-component Hill-type muscle model we described in [Muscle modeling](http://nbviewer.ipython.org/github/demotu/BMC/blob/master/notebooks/MuscleModeling.ipynb) and illustrated below:Figure. A Hill-type muscle model with three components: two...
examples/notebooks/anime.ipynb
###Markdown Processing Anime Data BackgroundWe will use pyjanitor to showcase how to conveniently chain methods together to perform data cleaning in one shot. We We first define and register a series of dataframe methods with pandas_flavor. Then we chain the dataframe methods together with pyjanitor methods to comple...
other/deprecated/tmp9.ipynb
###Markdown Load the data set * There are totally 1,225,029 training images and 117,703 test images. * Totoally 14,951 landmarks ###Code train = pd.read_csv('./data/train.csv') print('Train:\t\t', train.shape) ###Output Train: (1225029, 3) ###Markdown Download Images ###Code def fetch_image(url): """ Get image...
Supervised_Learning/titanic_survival_exploration.ipynb
###Markdown Lab: Titanic Survival Exploration with Decision Trees Getting StartedIn this lab, you will see how decision trees work by implementing a decision tree in sklearn.We'll start by loading the dataset and displaying some of its rows. ###Code # Import libraries necessary for this project import numpy as np imp...
_notebooks/2021-05-31-missing-values.ipynb
###Markdown Missing values in scikit-learn ###Code #code adapted from https://github.com/thomasjpfan/ml-workshop-intermediate-1-of-2 ###Output _____no_output_____ ###Markdown SimpleImputer ###Code from sklearn.impute import SimpleImputer import numpy as np import sklearn sklearn.set_config(display='diagram') import p...
config.ipynb
###Markdown Network Configuration ###Code class Config(): data_root = '' # data path save_root = None # intermediate saves # network parameters img_size = 224 # iuput image size batch_size = 96 # batch size lr = 0.045 # learning rate lr_decay = 0.98 # learning rate decay ratio up...
notebooks/C0.3-lsf-metrics.ipynb
###Markdown 0.0 Imports ###Code import pandas as pd import numpy as np import seaborn as sns import umap.umap_ as umap from matplotlib import pyplot as plt from IPython.display import HTML from sklearn import preprocessing as pp from sklearn import cluster as c from sklearn import metrics as m from p...
notebooks/exercises/function_exercises.ipynb
###Markdown Exercises on functionsFor background, please read the [functions](../07/functions) introduction. This function is not properly defined, and will give a `SyntaxError`. Fix it, then run the call below to confirm it is working. ###Code function subtract(p, q): r = p - q return r subtract(5, 10) ###Ou...
notebooks/Import_urine_spectra_with_concentration.ipynb
###Markdown Import urine spectra with concentration Install project packages ###Code %%bash pip install -e ../. ###Output Obtaining file:///data/ar1220/MscProjectNMR Installing collected packages: MscProjectNMR Attempting uninstall: MscProjectNMR Found existing installation: MscProjectNMR 0 Uninstalling Msc...
module4/assignment_regression_classification_4.ipynb
###Markdown Lambda School Data Science, Unit 2: Predictive Modeling Regression & Classification, Module 4 Assignment- [X] Watch Aaron Gallant's [video 1](https://www.youtube.com/watch?v=pREaWFli-5I) (12 minutes) & [video 2](https://www.youtube.com/watch?v=bDQgVt4hFgY) (9 minutes) to learn about the mathematics of Logi...
python/examples/notebooks/tsp_simple_cuts_generic.ipynb
###Markdown Travelling Salesman Problem with subtour eliminationThis example shows how to solve a TSP by eliminating subtours using:1. amplpy (defining the subtour elimination constraint in AMPL and instantiating it appropriately)2. ampls (adding cuts directly from the solver callback) Options ###Code SOLVER = "xpre...
lipschitz_estimates/random_forest_iris_lipschitz_estimates.ipynb
###Markdown Imports and Paths ###Code from IPython.display import display, HTML from lime.lime_tabular import LimeTabularExplainer from pprint import pprint from scipy.spatial.distance import pdist, squareform from sklearn.linear_model import LogisticRegression from sklearn.tree import DecisionTreeClassifier, expo...
1-LaneLines/others/P1-original.ipynb
###Markdown 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 (real...
tutorials/DAG-Creation-And-Submission.ipynb
###Markdown DAG Creation and Submission Launch this tutorial in a Jupyter Notebook on Binder: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/htcondor/htcondor-python-bindings-tutorials/master?urlpath=lab/tree/DAG-Creation-And-Submission.ipynb)In this tutorial, we will learn how to use `htc...
Python Pandas Tutorials 07.ipynb
###Markdown Tutorial 7 - Group By (Split Apply Combine) ###Code import pandas as pd df = pd.read_csv('sample_data_tutorial_07.csv') df # Vamos agrupar este DataFrame pelas cidades: g = df.groupby('city') g # O comando anterior agrupará as cidades como "key" e o resto como valores for city, city_df in g: print(city)...
Credit Report Complaint topic modelling.ipynb
###Markdown Credit Report Complaint topic modelling This is a Natural Language Processing(NLP) based solution to identify key topics present in credit reporting specific customer complaints.This sample notebook shows you how to deploy Credit Report Complaint topic modelling using Amazon SageMaker.> **Note**: This is a...
xgboostLab.ipynb
###Markdown XGBoost Lab ReflectionsLet's go back to thinking about a few algorithms we worked on. Decisions treesWe began our exploration of decision trees with a mountain bike example:![](https://raw.githubusercontent.com/zacharski/ml-class/master/labs/pics/dtree77.png)Here's is roughly what we did by hand.1. We det...
Day_009_correlation_example.ipynb
###Markdown 以下程式碼將示範在 python 如何利用 numpy 計算出兩組數據之間的相關係數,並觀察散佈圖 ###Code import numpy as np np.random.seed(1) import matplotlib import matplotlib.pyplot as plt %matplotlib inline ###Output _____no_output_____ ###Markdown 正相關 ###Code # 隨機生成 1000 個介於 0~50 的數 x = np.random.randint(0, 50, 1000) # 正相關,增加一些雜訊 y = x + np.ra...
05_deep_q_learning/dqn_per/Modularized/.ipynb_checkpoints/dqn_per-checkpoint.ipynb
###Markdown Deep Q-Network With Prioritized Experience Replay (DQN_PER)--- 1. Import the Necessary Packages ###Code import gym import random import torch import numpy as np from collections import deque import matplotlib.pyplot as plt %matplotlib inline from agent_dqn_per import Agent ###Output _____no_output_____ ##...
Operations_and_Expressions.ipynb
###Markdown ###Code ###Output _____no_output_____ ###Markdown Boolean Operators ###Code #Booleans represents one of two values: True or False print(11>10) print(11==10) print(10>11) a=10 b=9 print(a>b) print(a==a) print(b>a) print(b>a) print(bool("Hello")) print(bool(15)) print(bool(False)) print(bool(None)) print(b...
notes/05a_linear_systems_direct.ipynb
###Markdown Direct methods for solving linear systems Recall the prototypal PDE problem introduce in the Lecture 08:$$-u_{xx}(x) = f(x)\quad\mathrm{ in }\ \Omega = (0, 1)$$$$u(x) = 0, \quad\mathrm{ on }\ \partial\Omega = \{0, 1\}$$The physical interpretation of this problem is related to the modelling of an elastic st...
Classification/DenseNet/Code/DenseNet.ipynb
###Markdown 使用ResNet改良版的“批量归一化、激活和卷积”结构 ###Code import time import torch from torch import nn, optim import torch.nn.functional as F import d2lzh_pytorch as d2l device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') def conv_block(in_channels, out_channels): blk = nn.Sequential( nn.BatchNor...
Copy_of_quora.ipynb
###Markdown Quora Data Framework New ###Code from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report from sklearn.metrics import confusion_matrix from sklearn.metrics import accuracy_score from wordcloud import WordCloud as wc from nltk.corpus import stopwords import ma...
dataset_preparation.ipynb
###Markdown **Dataset Download** ###Code !pip install kaggle from google.colab import files files.upload() !mkdir ~/.kaggle !cp kaggle.json ~/.kaggle/ !chmod 600 ~/.kaggle/kaggle.json !kaggle competitions download -c tensorflow-speech-recognition-challenge !7z x train.7z labels = [ 'zero', 'one', 'two', 'three', '...