code
stringlengths
2.5k
150k
kind
stringclasses
1 value
# Cache Dataset Tutorial and Speed Test This tutorial shows how to accelerate PyTorch medical DL program based on MONAI CacheDataset. It's modified from the Spleen 3D segmentation tutorial notebook. ``` # Copyright 2020 MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not...
github_jupyter
# Random Signals *This jupyter notebook is part of a [collection of notebooks](../index.ipynb) on various topics of Digital Signal Processing. Please direct questions and suggestions to [Sascha.Spors@uni-rostock.de](mailto:Sascha.Spors@uni-rostock.de).* ## Auto Power Spectral Density The (auto-) [power spectral dens...
github_jupyter
# Politeness strategies in MT-mediated communication In this notebook, we demo how to extract politeness strategies using ConvoKit's `PolitenessStrategies` module both in English and in Chinese. We will make use of this functionality to assess the degree to which politeness strategies are preserved in machine-translat...
github_jupyter
<div class="alert alert-block alert-info" style="margin-top: 20px"> <a href="https://cocl.us/topNotebooksPython101Coursera"> <img src="https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/PY0101EN/Ad/TopAd.png" width="750" align="center"> </a> </div> <a href="https://cognit...
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
``` import pandas as pd import os import datetime as dt from alpha_vantage.timeseries import TimeSeries def getStoredData(srtdt, enddt, ticker): #currently assumes that csv data is organised in format: Date,Open,High,Low,Close,Adj Close,Volume #also assumes that the name of the csv is the same as that as the ti...
github_jupyter
--- _You are currently looking at **version 1.5** of this notebook. To download notebooks and datafiles, as well as get help on Jupyter notebooks in the Coursera platform, visit the [Jupyter Notebook FAQ](https://www.coursera.org/learn/python-data-analysis/resources/0dhYG) course resource._ --- # Assignment 3 - More...
github_jupyter
Notebook to plot the histogram of the power criterion values of Rel-UME test. ``` %matplotlib inline %load_ext autoreload %autoreload 2 #%config InlineBackend.figure_format = 'svg' #%config InlineBackend.figure_format = 'pdf' import freqopttest.tst as tst import kmod import kgof import kgof.goftest as gof # submodul...
github_jupyter
# Integrated gradients for text classification on the IMDB dataset In this example, we apply the integrated gradients method to a sentiment analysis model trained on the IMDB dataset. In text classification models, integrated gradients define an attribution value for each word in the input sentence. The attributions a...
github_jupyter
``` #@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 agreed to in writing, software # distributed u...
github_jupyter
# analysis_cdo_nco_draft2017b.ipynb ## Purpose Use CDO and NCO to analyse CESM simulation output from project [p17c-marc-comparison](https://github.com/grandey/p17c-marc-comparison). ## Requirements - Climate Data Operators (CDO) - NetCDF Operators (NCO) - CESM output data, post-processed to time-series format, as de...
github_jupyter
# A practical introduction to Reinforcement Learning Most of you have probably heard of AI learning to play computer games on their own, a very popular example being Deepmind. Deepmind hit the news when their AlphaGo program defeated the South Korean Go world champion in 2016. There had been many successful attempts i...
github_jupyter
``` #install.packages("caTools", repo="http://cran.itam.mx") #R.version path<- "C:/Users/Martin/Documents/Tareas UNISON/Termodinamica/Laboratorio/Informe 5/Datos" setwd(path) library("ggplot2") library("reshape2") library("dplyr") library("plotly") D1 <- read.csv("Datos1.csv" ,header=TRUE, sep="," , stringsAsFactors=FA...
github_jupyter
## Convolutional Neural Networks ## Project: Write an Algorithm for a Dog Identification App --- In this notebook, some template code has already been provided for you, and you will need to implement additional functionality to successfully complete this project. You will not need to modify the included code beyond...
github_jupyter
``` from google.colab import drive drive.mount('/content/drive') path = '/content/drive/MyDrive/Research/AAAI/complexity/50_200/' import numpy as np import pandas as pd import torch import torchvision from torch.utils.data import Dataset, DataLoader from torchvision import transforms, utils import torch.nn as nn impor...
github_jupyter
<a href="https://colab.research.google.com/github/MonitSharma/Learn-Quantum-Computing/blob/main/Circuit_Basics.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` !pip install qiskit ``` # Qiskit Basics ``` import numpy as np from qiskit import Qu...
github_jupyter
This script performs analyses to check how many mice pass the currenty set criterion for ephys. ``` import datajoint as dj dj.config['database.host'] = 'datajoint.internationalbrainlab.org' from ibl_pipeline import subject, acquisition, action, behavior, reference, data from ibl_pipeline.analyses.behavior import Psyc...
github_jupyter
``` # %load ../../templates/load_libs.py import sys from pyspark.ml.classification import LogisticRegression, NaiveBayes, DecisionTreeClassifier, GBTClassifier, \ RandomForestClassifier # set project directory for shared library PROJECT_DIR='/home/jovyan/work/amazon-review-validator' if PROJECT_DIR not in sys.path:...
github_jupyter
Link for exercises https://python-textbok.readthedocs.io/en/1.0/Classes.html  Classes and types are themselves objects, and they are of type type. You can find out the type of any object using the type function: type(any_object) The data values which we store inside an object are called attributes, and the functions ...
github_jupyter
# Datasets processing ## Import and preprocessing ``` import pandas as pd pd.set_option('display.max_colwidth', None) import warnings warnings.filterwarnings("ignore") #INPS ht_inps=pd.read_csv('../data/raw/Enti/INPS/Hashtags.csv') ht_inps['type'] = 'hashtag' mn_inps=pd.read_csv('../data/raw/Enti/INPS/Mentions.csv')...
github_jupyter
# Pipeline Analysis for CSM Model - Plot Heatmaps of the model results using Z-normalization - CEZ/OEZ Pooled Patient Analysis - CEZ/OEZ IRR Metric ``` import os import sys import collections import pandas as pd import numpy as np import warnings warnings.filterwarnings("ignore") import scipy.stats from sklearn.metri...
github_jupyter
# Simple RNN In this notebook, we're going to train a simple RNN to do **time-series prediction**. Given some set of input data, it should be able to generate a prediction for the next time step! <img src='assets/time_prediction.png' width=40% /> > * First, we'll create our data * Then, define an RNN in PyTorch * Fin...
github_jupyter
Welcome to day 5 of the Python Challenge! If you missed any of the previous days, here are the links: - [Day 1 (syntax, variable assignment, numbers)](https://www.kaggle.com/colinmorris/learn-python-challenge-day-1) - [Day 2 (functions and getting help)](https://www.kaggle.com/colinmorris/learn-python-challenge-day-2)...
github_jupyter
# Basic Examples with Different Protocols ## Prerequisites * A kubernetes cluster with kubectl configured * curl * grpcurl * pygmentize ## Setup Seldon Core Use the setup notebook to [Setup Cluster](seldon_core_setup.ipynb) to setup Seldon Core with an ingress - either Ambassador or Istio. Then port-forward ...
github_jupyter
``` import pandas as pd import numpy as np from sklearn.neighbors import KNeighborsClassifier from scipy.spatial import distance import scipy import math import scipy.spatial from collections import Counter treino = pd.read_csv("dados/3.fit", sep=" ") treino.head() teste = pd.read_csv("dados/3.test", sep=" ") teste.hea...
github_jupyter
Configurations: * install tensorflow 2.1 * install matplotlib * install pandas * install scjkit-learn * install nltk ``` import matplotlib.pyplot as plt import numpy as np import pandas as pd import tensorflow as tf import re from tensorflow import keras from keras.models import Sequential from keras.layers import De...
github_jupyter
# Tutorial 4 - Setting parameter values In [Tutorial 1](./Tutorial%201%20-%20How%20to%20run%20a%20model.ipynb) and [Tutorial 2](./Tutorial%202%20-%20Compare%20models.ipynb), we saw how to run a PyBaMM model with all the default settings. However, PyBaMM also allows you to tweak these settings for your application. In ...
github_jupyter
<table align="center"> <td align="center"><a target="_blank" href="http://introtodeeplearning.com"> <img src="http://introtodeeplearning.com/images/colab/mit.png" style="padding-bottom:5px;" /> Visit MIT Deep Learning</a></td> <td align="center"><a target="_blank" href="https://colab.research.google.c...
github_jupyter
# Training the extended rough Bergomi model part 3 In this notebook we train a neural network for the extended rough Bergomi model for expiries in the range (0.03,0.12]. Be aware that the datasets are rather large. ### Load, split and scale the datasets ``` import os, pandas as pd, numpy as np wd = os.getcwd() # L...
github_jupyter
# Lista 06 - Gradiente Descendente e Regressão Multivariada ``` import matplotlib.pyplot as plt import numpy as np import pandas as pd from numpy.testing import * plt.ion() ``` Hoje vamos fazer um gradiente descendente para uma regressão linear com múltiplas variáveis. Para isso, utilizaremos a base de dados carro...
github_jupyter
``` import pandas import re table_5_2018 = pandas.read_excel('Table_5_Offenses_Known_Offenders_Race_and_Ethnicity_by_Bias_Motivation_2018.xls') new_5_2018 =table_5_2018.rename(columns = {'Table 5' : 'Bias Motivation'}).rename(columns = {'Unnamed: 1' : 'Total Offenses'}).rename(columns = {'Unnamed: 2' : "White"}).renam...
github_jupyter
# An Introduction To `aima-python` The [aima-python](https://github.com/aimacode/aima-python) repository implements, in Python code, the algorithms in the textbook *[Artificial Intelligence: A Modern Approach](http://aima.cs.berkeley.edu)*. A typical module in the repository has the code for a single chapter in th...
github_jupyter
# A case study in screening for new enzymatic reactions In this example, we show how to search the KEGG database for a reaction of interest based on user requirements. At specific points we highlight how our code could be used for arbitrary molecules that the user is interested in. This is crucial because the KEGG dat...
github_jupyter
``` import matplotlib.pyplot as plt import numpy as np import scipy.io as scio import displayData as dd import lrCostFunction as lCF import oneVsAll as ova import predictOneVsAll as pova import scipy.optimize as opt # Setup the parameters you will use for this part of the exercise input_layer_size = 400 # 20x20 input...
github_jupyter
# Get the data ``` from google.colab import drive drive.mount('/content/gdrive') from sklearn.linear_model import ElasticNet, Lasso, Ridge from sklearn.pipeline import make_pipeline from sklearn.preprocessing import RobustScaler,MinMaxScaler,StandardScaler from sklearn.model_selection import KFold, cross_val_score, tr...
github_jupyter
# Задание 1.1 - Метод К-ближайших соседей (K-neariest neighbor classifier) В первом задании вы реализуете один из простейших алгоритмов машинного обучения - классификатор на основе метода K-ближайших соседей. Мы применим его к задачам - бинарной классификации (то есть, только двум классам) - многоклассовой классификац...
github_jupyter
This notebook was created to convert the original VQC notebook to follow the routines of the new Qiskit version. ``` import logging import numpy as np from sklearn.metrics import f1_score import matplotlib.pyplot as plt plt.style.use('dark_background') import qiskit from qiskit import IBMQ, Aer, QuantumCircuit from q...
github_jupyter
# API demonstration for paper of v1.0 _the LSST-DESC CLMM team_ Here we demonstrate how to use `clmm` to estimate a WL halo mass from observations of a galaxy cluster when source galaxies follow a given distribution (The LSST DESC Science Requirements Document - arXiv:1809.01669, implemented in `clmm`). It uses sev...
github_jupyter
``` #export from local.torch_basics import * from local.test import * from local.core import * from local.layers import * from local.data.all import * from local.text.core import * from local.notebook.showdoc import show_doc #default_exp text.models.awdlstm #default_cls_lvl 3 ``` # AWD-LSTM > AWD LSTM from [Smerity e...
github_jupyter
<img width="10%" alt="Naas" src="https://landen.imgix.net/jtci2pxwjczr/assets/5ice39g4.png?w=160"/> # CI/CD - Make sure all notebooks respects our format policy **Tags:** #naas **Author:** [Maxime Jublou](https://www.linkedin.com/in/maximejublou/) # Input ### Import libraries ``` import json import glob from rich...
github_jupyter
# Concise Implementation of Softmax Regression :label:`sec_softmax_concise` Just as high-level APIs of deep learning frameworks made it much easier to implement linear regression in :numref:`sec_linear_concise`, we will find it similarly (or possibly more) convenient for implementing classification models. Let us stic...
github_jupyter
# Bioinfomatic central script ``` # Source the utility functions file, which should be in the scripts folder with this file source('scripts/meg_utility_functions.R') source('scripts/load_libraries.R') ``` ## USER Controls First, we'll need to specify the location of important files on your machine. You'll...
github_jupyter
<a href="https://colab.research.google.com/github/Fuenfgeld/2022TeamADataManagementBC/blob/main/Tutorial-Metadaten/structureData_task.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Strukturelle Daten und Metadatenschema #### REFERENCE MODEL FOR ...
github_jupyter
# Predict H1N1 and Seasonal Flu Vaccines ## Preprocessing ### Import libraries ``` import pandas as pd import numpy as np %matplotlib inline import matplotlib.pyplot as plt ``` ### Import data ``` features_raw_df = pd.read_csv("data/training_set_features.csv", index_col="respondent_id") labels_raw_df = pd.read_csv...
github_jupyter
In this chapter you will: * Clean and prepare text data * Build feature vectors from text documents * Train a machine learning model to classify positive and negative movie reviews * Work with large text datasets using out-of-core learning ``` ## Will be working with movie reviews from IMDB database ## Dataset is 50,...
github_jupyter
# QUANTUM PHASE ESTIMATION This tutorial provides a detailed implementation of the Quantum Phase Estimation (QPE) algorithm using the Amazon Braket SDK. The QPE algorithm is designed to estimate the eigenvalues of a unitary operator $U$ [1, 2]; it is a very important subroutine to many quantum algorithms, most famous...
github_jupyter
# Módulo 4: APIs ## Spotify <img src="https://developer.spotify.com/assets/branding-guidelines/logo@2x.png" width=400></img> En este módulo utilizaremos APIs para obtener información sobre artistas, discos y tracks disponibles en Spotify. Pero primero.. ¿Qué es una **API**?<br> Por sus siglas en inglés, una API es una...
github_jupyter
# Data Inputs and Display Libraries ``` import pandas as pd import numpy as np import pickle pd.set_option('display.float_format', lambda x: '%.5f' % x) from IPython.core.interactiveshell import InteractiveShell InteractiveShell.ast_node_interactivity = 'all' ``` # Modeling Libraries ``` from sklearn.tree import De...
github_jupyter
# Notes This project requires the creation of an **assets** and **outputs** folder in the same directory as the notebook. The assets folder should contain the WikiLarge_Train.csv file available from [Kaggle](https://www.kaggle.com/c/umich-siads-695-predicting-text-difficulty). Several files here are writting to the ...
github_jupyter
## Computer Vision Learner [`vision.learner`](/vision.learner.html#vision.learner) is the module that defines the [`cnn_learner`](/vision.learner.html#cnn_learner) method, to easily get a model suitable for transfer learning. ``` from fastai.gen_doc.nbdoc import * from fastai.vision import * ``` ## Transfer learning...
github_jupyter
``` import numpy as np import pandas as pd import pyspark from pyspark import SparkContext, SparkConf from pyspark.sql import SQLContext from pyspark.sql.types import StringType sqlContext = SQLContext(sc) conf = SparkConf().setAppName("My App").setMaster("local[*]") sc.stop() sc = SparkContext(conf = conf) ``` ## R...
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
``` %cd -q data/actr_reco import matplotlib.pyplot as plt import tqdm import numpy as np with open("users.txt", "r") as f: users = f.readlines() hist = [] for user in tqdm.tqdm(users): user = user.strip() ret = !wc -l user_split/listening_events_2019_{user}.tsv lc, _ = ret[0].split(" ") hist.append(...
github_jupyter
``` import pandas as pd ``` ## Load in the "rosetta stone" file I made this file using QGIS, the open-source mapping software. I loaded in the US Census 2010 block-level shapefile for Hennipin County. I then used the block centroids, provided by the census, to colect them within each zone. Since the centroids, by nat...
github_jupyter
# Sample for KFServing SDK This is a sample for KFServing SDK. The notebook shows how to use KFServing SDK to create, get, rollout_canary, promote and delete InferenceService. ``` from kubernetes import client from kfserving import KFServingClient from kfserving import constants from kfserving import utils from kf...
github_jupyter
# Assignment Submission for FMUP ## Kishlaya Jaiswal ### Chennai Mathematical Institute - MCS201909 --- # Solution 1 I have choosen the following stocks from Nifty50: - Kotak Mahindra Bank Ltd (KOTAKBANK) - Hindustan Unilever Ltd (HINDUNILVR) - Nestle India Limited (NESTLEIND) Note: - I am doing these computations ...
github_jupyter
# Sequana_coverage versus CNVnator (viral genome) This notebook compares CNVnator, CNOGpro and sequana_coverage behaviour on a viral genome instance (same as in the virus notebook). Versions used: - sequana 0.7.0 ``` %pylab inline matplotlib.rcParams['figure.figsize'] = [10,7] ``` Here below, we provide the result...
github_jupyter
<a href="https://colab.research.google.com/github/gcfer/reinforcement-learning/blob/main/RL_A2C_2N_TF2.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Reinforcement Learning: A2C (Actor-Critic Method) — Two Networks ## Overview In this notebook,...
github_jupyter
# QCoDeS Example with Lakeshore 325 Here provided is an example session with model 325 of the Lakeshore temperature controller ``` %matplotlib notebook import numpy as np import matplotlib.pyplot as plt from qcodes.instrument_drivers.Lakeshore.Model_325 import Model_325 lake = Model_325("lake", "GPIB0::12::INSTR") `...
github_jupyter
Below is code with a link to a happy or sad dataset which contains 80 images, 40 happy and 40 sad. Create a convolutional neural network that trains to 100% accuracy on these images, which cancels training upon hitting training accuracy of >.999 Hint -- it will work best with 3 convolutional layers. ``` import tens...
github_jupyter
## Single image processing [resize, crope] ``` import numpy as np #from PIL import Image import os, glob import cv2 pic = cv2.imread('../../../data/data/1_d.jpg') #img = cv2.cvtColor(pic, cv2.COLOR_GRAY2RGB) # cv2.imshow('image', pic) # cv2.waitKey(0) iw, ih = pic.shape[0:2] w = h = 256 ul_img = pic[:h, :w, :] ur_im...
github_jupyter
``` import glob import os.path as osp import random import numpy as np import json from PIL import Image from tqdm import tqdm import matplotlib.pyplot as plt %matplotlib inline import torch import torch.nn as nn import torch.optim as optim import torch.utils.data as data import torchvision from torchvision import mod...
github_jupyter
# Capstone Part 2a - Classical ML Models (MFCCs with Offset) ___ ## Setup ``` # Basic packages import numpy as np import pandas as pd # For splitting the data into training and test sets from sklearn.model_selection import train_test_split # For scaling the data as necessary from sklearn.preprocessing import Standar...
github_jupyter
# Minimal tutorial on packing and unpacking sequences in PyTorch, aka how to use `pack_padded_sequence` and `pad_packed_sequence` This is a jupyter version of [@Tushar-N 's gist](https://gist.github.com/Tushar-N/dfca335e370a2bc3bc79876e6270099e) with comments from [@Harsh Trivedi repo](https://github.com/HarshTrivedi...
github_jupyter
``` ! pip install opencv-python import pandas as pd import numpy as np import matplotlib.pyplot as plt import cv2 #tensorflow packages from tensorflow.keras.models import load_model from tensorflow.keras.preprocessing import image # Face Emotion Recognition #Here i am using my trained model, that is trained and saved a...
github_jupyter
``` import pandas as pd try: import pickle5 as pickle except: !pip install pickle5 import pickle5 as pickle import os import sys import numpy as np import pandas as pd import matplotlib.pyplot as plt from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.l...
github_jupyter
``` from mplsoccer import Pitch, VerticalPitch from mplsoccer.dimensions import valid, size_varies import matplotlib.pyplot as plt import numpy as np import random np.random.seed(42) ``` # Test five points are same in both orientations ``` for pitch_type in valid: if pitch_type in size_varies: kwargs = {'...
github_jupyter
# Pipelines for classifiers using Balanced Accuracy For each dataset, classifier and folds: - Robust scaling - 2, 3, 5, 10-fold outer CV - balanced accurary as score We will use folders *datasets2* and *results2*. ``` %reload_ext autoreload %autoreload 2 %matplotlib inline # remove warnings import warnings warnings...
github_jupyter
|<img style="float:left;" src="http://pierreproulx.espaceweb.usherbrooke.ca/images/usherb_transp.gif" > |Pierre Proulx, ing, professeur| |:---|:---| |Département de génie chimique et de génie biotechnologique |** GCH200-Phénomènes d'échanges I **| ### Section 10.6, Conduction de la chaleur dans une sphère ``` # # Pie...
github_jupyter
# TTI pure qP-wave equation implementation The aim of this notebook is to show how to solve the pure qP-wave equation using the finite-difference (FD) scheme. The 2D TTI pure qP-wave equation can be written as ([Mu et al., 2020](https://library.seg.org/doi/10.1190/geo2019-0320.1)) $$\begin{align} \frac{1}{v_{p}^{2}}\...
github_jupyter
# 1-1 Intro Python Practice ## Getting started with Python in Jupyter Notebooks ### notebooks, comments, print(), type(), addition, errors and art <font size="5" color="#00A0B2" face="verdana"> <B>Student will be able to</B></font> - use Python 3 in Jupyter notebooks - write working code using `print()` and `#` comm...
github_jupyter
# An exercise in discretisation and the CFL criterion *These notebooks have been built from Lorena Barba's Computational Fluid Dynamics module. Here we are going to go from a (simple) equation, to a numerical solution of it. We are then going to look at how changing the resolution impacts the speed and validity of the ...
github_jupyter
``` import plotly.express as px import pandas as pd import plotly.graph_objects as go import pickle from plotly.subplots import make_subplots import numpy as np import os import Loader from scipy.spatial import ConvexHull, distance_matrix loader = Loader.Loader(r"C:\Users\logiusti\Lorenzo\Data\ups") def remap(x): ...
github_jupyter
Week 7 Notebook: Optimizing Other Objectives =============================================================== This week, we will look at optimizing multiple objectives simultaneously. In particular, we will look at pivoting with adversarial neural networks {cite:p}`Louppe:2016ylz,ganin2014unsupervised,Sirunyan:2019nfw`...
github_jupyter
## TASK-1: Make a class to calculate the range, time of flight and horizontal range of the projectile fired from the ground. ## TASK-2: Use the list to find the range, time of flight and horizontal range for varying value of angle from 1 degree to 90 dergree. ## TASK-3: Make a plot to show the variation of range, tim...
github_jupyter
#Improving Computer Vision Accuracy using Convolutions In the previous lessons you saw how to do fashion recognition using a Deep Neural Network (DNN) containing three layers -- the input layer (in the shape of the data), the output layer (in the shape of the desired output) and a hidden layer. You experimented with t...
github_jupyter
DeepLarning Couse HSE 2016 fall: * Arseniy Ashuha, you can text me ```ars.ashuha@gmail.com```, * ```https://vk.com/ars.ashuha``` * partially reusing https://github.com/ebenolson/pydata2015 <h1 align="center"> Image Captioning </h1> In this seminar you'll be going through the image captioning pipeline. To begin wi...
github_jupyter
<a href="https://colab.research.google.com/github/ZinnurovArtur/Colour-Match/blob/main/Outfit_neural_network.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` from sklearn.cluster import KMeans import matplotlib.pyplot as plt import numpy as np i...
github_jupyter
# Edge Computing using Tensorflow and Neural Compute Stick ## " Generate piano sounds using EEG capturing rhythmic activity of brain" ### Contents #### 1. Motivation #### 2. Signal acquisition #### 3. Signal postprocessing #### 4. Synthesize music ##### 4.1 Training Data ##### 4.2 Training data preprocess...
github_jupyter
# Customizing and controlling xclim xclim's behaviour can be controlled globally or contextually through `xclim.set_options`, which acts the same way as `xarray.set_options`. For the extension of xclim with the addition of indicators, see the [Extending xclim](extendxclim.ipynb) notebook. ``` import xarray as xr impo...
github_jupyter
# Predicting Student Admissions with Neural Networks in Keras In this notebook, we predict student admissions to graduate school at UCLA based on three pieces of data: - GRE Scores (Test) - GPA Scores (Grades) - Class rank (1-4) The dataset originally came from here: http://www.ats.ucla.edu/ ## Loading the data To lo...
github_jupyter
``` # Import plotting modules import matplotlib.pyplot as plt import seaborn as sns import numpy as np df = [4.7, 4.5, 4.9, 4.0, 4.6, 4.5, 4.7, 3.3, 4.6, 3.9, 3.5, 4.2, 4.0, 4.7, 3.6, 4.4, 4.5, 4.1, 4.5, 3.9, 4.8, 4.0, 4.9, 4.7, 4.3, 4.4, 4.8, 5.0, 4.5, 3.5, 3.8, 3.7, 3.9, 5.1, 4.5, 4.5, 4.7, 4.4, 4.1, 4.0, 4.4, 4.6, ...
github_jupyter
# Introduction ## Research Question What is the information flow from visual stream to motor processing and how early in processing can we predict behavioural outcomes. - Can decoding models be trained by region - How accurate are the modeled regions at predicting a behaviour - Possible behaviours (correct vs. inco...
github_jupyter
<center> <img src="../../img/ods_stickers.jpg"> ## Открытый курс по машинному обучению <center>Автор материала: Michael Kazachok (@miklgr500) # <center>Другая сторона tensorflow:KMeans ## <center>Введение <p style="text-indent:20px;"> Многие знают <strong>tensorflow</strong>, как одну из лучших библиотек для обучен...
github_jupyter
# Generating counterfactual explanations with any ML model The goal of this notebook is to show how to generate CFs for ML models using frameworks other than TensorFlow or PyTorch. This is a work in progress and here we show a method to generate diverse CFs by independent random sampling of features. We use scikit-lea...
github_jupyter
# NumPy NumPy is the fundamental package for scientific computing in Python. It is a Python library that provides a multidimensional array object, various derived objects (such as masked arrays and matrices), and an assortment of routines for fast operations on arrays, including mathematical, logical, shape manipulatio...
github_jupyter
# Analisis de resultados encuesta conocimiento y actitudes ante el uso del achiote #### Cargamos librerias a utilizar ``` library("dplyr") library("tidytext") library("tm") library("ggplot2") library("stringr") library("corrplot") library("cluster") ``` #### Leemos los archivo Csv ``` achiote1 <- read.csv("first_ch...
github_jupyter
<!--BOOK_INFORMATION--> <img align="left" style="padding-right:10px;" src="https://github.com/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/figures/PDSH-cover-small.png?raw=1"> *This notebook contains an excerpt from the [Python Data Science Handbook](http://shop.oreilly.com/product/0636920034919.do) by Jake...
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
# Santander Value Prediction Challenge According to Epsilon research, 80% of customers are more likely to do business with you if you provide **personalized service**. Banking is no exception. The digitalization of everyday lives means that customers expect services to be delivered in a personalized and timely manner...
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
``` import sys, random, os, json sys.path.append(sys.path.append(os.path.join(os.getcwd(), '..'))) from datamart.augment import Augment import pandas as pd es_index = "datamart" augment = Augment(es_index=es_index) ``` ### Initialize a dataframe ``` old_df = pd.DataFrame(data={ 'city': ["los angeles", "New york"...
github_jupyter
# 2022/01/01/SAT(HappyNewYear) datail-review 해보자 - feature_names = 높이,가로 길이 이런 것들, data = 각 featuredml 값들, target = 0,1,2...예를 들면 붓꽃의 이름을 대용한 것, target_names = 각 target이 가리키는 이름이 무엇인지? --- model_selection 모듈은 학습 데이터와 테스트 데이터 세트를 분리하거나 교차 검증 분할 및 평가, 그리고 Estimator의 하이퍼 파라미터를 튜닝하기 위한 다양한 함수와 클래스를 제공, 전체 데이터를 학습 데이터와 ...
github_jupyter
``` from IPython import display ``` # What to expect from the Python lessons - Get you started with python through a little project - Showcase relevant use cases of python for exploratory data analysis - Provide you with exercises during and after the lessons so that you practice and experience python - Provide you w...
github_jupyter
``` import numpy as np from tqdm import tqdm from time import time import torchvision from torchvision import models, transforms import torch from torch import nn from torch.utils.tensorboard import SummaryWriter def accuracy(yhat,y): # si y encode les indexes if len(y.shape)==1 or y.size(1)==1: retur...
github_jupyter
<a href="https://www.bigdatauniversity.com"><img src = "https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/DA0101EN/Images/CCLog.png" width = 300, align = "center"></a> <h1 align=center><font size=5>Data Analysis with Python</font></h1> <h1>Data Wrangling</h1> <h3>Welcome!</h3> By the ...
github_jupyter
## PureFoodNet implementation ``` #libraries from tensorflow import keras from tensorflow.keras.optimizers import Adam, RMSprop from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Activation, Dropout, Flatten, Conv2D from tensorflow.keras.layers import MaxPool2D, BatchNormalizat...
github_jupyter
``` from IPython.display import HTML css_file = './custom.css' HTML(open(css_file, "r").read()) ``` # Norms and Distances © 2018 Daniel Voigt Godoy ## 1. Definition From [Wikipedia](https://en.wikipedia.org/wiki/Norm_(mathematics)): ...a norm is a function that assigns a strictly positive length or size to eac...
github_jupyter
``` import numpy as np from collections import defaultdict from torch.utils import data import matplotlib.pyplot as plt %matplotlib inline # Generate Dataset np.random.seed(42) def generate_dataset(num_sequences=2**8): sequences = [] for _ in range(num_sequences): token_length = np.random.randint(1, 12...
github_jupyter
<a href="https://colab.research.google.com/github/macscheffer/DS-Sprint-01-Dealing-With-Data/blob/master/DS_Unit_1_Sprint_Challenge_1.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Data Science Unit 1 Sprint Challenge 1 ## Loading, cleaning, vis...
github_jupyter