text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
```
import pandas as pd
import numpy as np
from scipy.stats import ks_2samp, chi2
import scipy
from astropy.table import Table
import astropy
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator
from matplotlib.colors import colorConverter
import matplotlib
%matplotlib notebook
print('numpy ... | github_jupyter |
<center>
<img src="https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/IBMDeveloperSkillsNetwork-ML0101EN-SkillsNetwork/labs/Module%203/images/IDSNlogo.png" width="300" alt="cognitiveclass.ai logo" />
</center>
# K-Nearest Neighbors
Estimated time needed: **25** minutes
## Objectives
After compl... | github_jupyter |
```
import torch
from torch.distributions import Normal
import math
```
Let us revisit the problem of predicting if a resident of Statsville is female based on the height. For this purpose, we have collected a set of height samples from adult female residents in Statsville. Unfortunately, due to unforseen circumstance... | 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 |
```
!pip install plotly -U
import numpy as np
import matplotlib.pyplot as plt
from plotly import graph_objs as go
import plotly as py
from scipy import optimize
print("hello")
```
Generate the data
```
m = np.random.rand()
n = np.random.rand()
num_of_points = 100
x = np.random.random(num_of_points)
y = x*m + n + 0.15... | 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 |
# Cycle-GAN
## Model Schema Definition
The purpose of this notebook is to create in a simple format the schema of the solution proposed to colorize pictures with a Cycle-GAN accelerated with FFT convolutions.<p>To create a simple model schema this notebook will present the code for a Cycle-GAN built as a MVP (Minimum... | github_jupyter |
<a href="https://qworld.net" target="_blank" align="left"><img src="../qworld/images/header.jpg" align="left"></a>
$$
\newcommand{\set}[1]{\left\{#1\right\}}
\newcommand{\abs}[1]{\left\lvert#1\right\rvert}
\newcommand{\norm}[1]{\left\lVert#1\right\rVert}
\newcommand{\inner}[2]{\left\langle#1,#2\right\rangle}
\newcomma... | github_jupyter |
# Neural Networks and Deep Learning for Life Sciences and Health Applications - An introductory course about theoretical fundamentals, case studies and implementations in python and tensorflow
(C) Umberto Michelucci 2018 - umberto.michelucci@gmail.com
github repository: https://github.com/michelucci/dlcourse2018_stu... | github_jupyter |
# **Imbalanced Data**
Encountered in a classification problem in which the number of observations per class are disproportionately distributed.
## **How to treat for Imbalanced Data?**<br>
Introducing the `imbalanced-learn` (imblearn) package.
### Data
```
import pandas as pd
import seaborn as sns
from sklearn.data... | github_jupyter |
```
# ~145MB
!wget -x --load-cookies cookies.txt -O business.zip 'https://www.kaggle.com/yelp-dataset/yelp-dataset/download/py6LEr6zxQNWjebkCW8B%2Fversions%2FlVP0fduiJJo8YKt2vKKr%2Ffiles%2Fyelp_academic_dataset_business.json?datasetVersionNumber=2'
!unzip business.zip
!wget -x --load-cookies cookies.txt -O review.zip '... | github_jupyter |
```
import matplotlib.pyplot as plt
import networkx as nx
import pandas as pd
import numpy as np
from scipy import stats
import scipy as sp
import datetime as dt
from ei_net import *
# import cmocean as cmo
%matplotlib inline
##########################################
############ PLOTTING SETUP ##############
EI_c... | github_jupyter |
---
**Export of unprocessed features**
---
```
import pandas as pd
import numpy as np
import os
import re
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.feature_extraction.text import CountVectorizer
import random
import pickle
from scipy import sparse
import math
import p... | github_jupyter |
# Muscle modeling
> Marcos Duarte
> Laboratory of Biomechanics and Motor Control ([http://demotu.org/](http://demotu.org/))
> Federal University of ABC, Brazil
There are two major classes of muscle models that have been used in biomechanics and motor control: the Hill-type and Huxley-type models. They differ main... | github_jupyter |
# Getting Started With Xarray
<h1>Table of Contents<span class="tocSkip"></span></h1>
<div class="toc"><ul class="toc-item"><li><span><a href="#Getting-Started-With-Xarray" data-toc-modified-id="Getting-Started-With-Xarray-1"><span class="toc-item-num">1 </span>Getting Started With Xarray</a></span><ul clas... | github_jupyter |
**KNN model of 10k dataset**
_using data found on kaggle from Goodreads_
_books.csv contains information for 10,000 books, such as ISBN, authors, title, year_
_ratings.csv is a collection of user ratings on these books, from 1 to 5 stars_
```
# imports
import numpy as pd
import pandas as pd
import pickle
fro... | github_jupyter |
# "Wine Quality."
### _"Quality ratings of Portuguese white wines" (Classification task)._
## Table of Contents
## Part 0: Introduction
### Overview
The dataset that's we see here contains 12 columns and 4898 entries of data about Portuguese white wines.
**Метаданные:**
* **fixed acidity**
* **volatile... | github_jupyter |
# Perturb-seq K562 co-expression
```
import scanpy as sc
import seaborn as sns
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats as stats
import itertools
from pybedtools import BedTool
import pickle as pkl
%matplotlib inline
pd.set_option('max_columns', None)
import sys
sys.pat... | github_jupyter |
# Wind Statistics
### Introduction:
The data have been modified to contain some missing values, identified by NaN.
Using pandas should make this exercise
easier, in particular for the bonus question.
You should be able to perform all of these operations without using
a for loop or other looping construct.
1. The... | github_jupyter |
# Mark and Recapture
Think Bayes, Second Edition
Copyright 2020 Allen B. Downey
License: [Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
```
# If we're running on Colab, install empiricaldist
# https://pypi.org/project/empiricaldist/
im... | github_jupyter |
# Writing Low-Level TensorFlow Code
**Learning Objectives**
1. Practice defining and performing basic operations on constant Tensors
2. Use Tensorflow's automatic differentiation capability
3. Learn how to train a linear regression from scratch with TensorFLow
## Introduction
In this notebook, we will start b... | github_jupyter |
## Modeling the musical difficulty
```
import ipywidgets as widgets
from IPython.display import Audio, display, clear_output
from ipywidgets import interactive
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
distributions = {
"krumhansl_kessler": [
0.15195022732711172, 0.0533620483... | github_jupyter |
```
import numpy as np
import pandas as pd
from datetime import datetime as dt
import itertools
season_1=pd.read_csv("2015-16.csv")[['Date','HomeTeam','AwayTeam','FTHG','FTAG','FTR']]
season_2=pd.read_csv("2014-15.csv")[['Date','HomeTeam','AwayTeam','FTHG','FTAG','FTR']]
season_3=pd.read_csv("2013-14.csv")[['Date','Hom... | github_jupyter |
```
#hide
#skip
! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab
# default_exp losses
# default_cls_lvl 3
#export
from fastai.imports import *
from fastai.torch_imports import *
from fastai.torch_core import *
from fastai.layers import *
#hide
from nbdev.showdoc import *
```
# Loss Functions
> C... | github_jupyter |
# Tau_p effects
```
import pprint
import subprocess
import sys
sys.path.append('../')
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import matplotlib.gridspec as gridspec
from mpl_toolkits.axes_grid1 import make_axes_locatable
import seaborn as sns
%matplotlib inline
np.set_printoptions(supp... | github_jupyter |
<a href="https://colab.research.google.com/github/victorog17/Soulcode_Projeto_Python/blob/main/Projeto_Python_Oficina_Mecanica_V2.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
print('Hello World')
print('Essa Fera Bicho')
```
1) Ao executar o... | github_jupyter |

# _*Qiskit Finance: Pricing Fixed-Income Assets*_
The latest version of this notebook is available on https://github.com/Qiskit/qiskit-iqx-tutorials.
***
### Contributors
Stefan Woerner<sup>[1]</sup>, Daniel Egger<sup>[1]</sup>, Shaohan Hu<sup>[1]</sup>, Stephen Wo... | github_jupyter |
# Sentiment Analysis
## Using XGBoost in SageMaker
_Deep Learning Nanodegree Program | Deployment_
---
As our first example of using Amazon's SageMaker service we will construct a random tree model to predict the sentiment of a movie review. You may have seen a version of this example in a pervious lesson although ... | github_jupyter |
```
#hide
#skip
! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab
# default_exp losses
# default_cls_lvl 3
#export
from fastai.imports import *
from fastai.torch_imports import *
from fastai.torch_core import *
from fastai.layers import *
#hide
from nbdev.showdoc import *
```
# Loss Functions
> C... | github_jupyter |
# Finding Outliers with k-Means
## Setup
```
import numpy as np
import pandas as pd
import sqlite3
with sqlite3.connect('../../ch_11/logs/logs.db') as conn:
logs_2018 = pd.read_sql(
"""
SELECT *
FROM logs
WHERE datetime BETWEEN "2018-01-01" AND "2019-01-01";
""",
... | github_jupyter |
# Detecting malaria in blood smear images
### The Problem
Malaria is a mosquito-borne disease caused by the parasite _Plasmodium_. There are an estimated 219 million cases of malaria annually, with 435,000 deaths, many of whom are children. Malaria is prevalent in sub-tropical regions of Africa.
Microscopy is the mos... | github_jupyter |
<img align="right" src="images/tf.png" width="128"/>
<img align="right" src="images/ninologo.png" width="128"/>
<img align="right" src="images/dans.png" width="128"/>
# Tutorial
This notebook gets you started with using
[Text-Fabric](https://annotation.github.io/text-fabric/) for coding in the Old-Babylonian Letter c... | github_jupyter |
# Distributed DeepRacer RL training with SageMaker and RoboMaker
---
## Introduction
In this notebook, we will train a fully autonomous 1/18th scale race car using reinforcement learning using Amazon SageMaker RL and AWS RoboMaker's 3D driving simulator. [AWS RoboMaker](https://console.aws.amazon.com/robomaker/home#... | github_jupyter |
```
#!pip install pytorch_lightning
#!pip install torchsummaryX
!pip install webdataset
# !pip install datasets
# !pip install wandb
#!pip install -r MedicalZooPytorch/installation/requirements.txt
#!pip install torch==1.7.1+cu101 torchvision==0.8.2+cu101 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torc... | github_jupyter |
```
import os
import argparse
import xml.etree.ElementTree as ET
import pandas as pd
import numpy as np
import csv
# Useful if you want to perform stemming.
import nltk
stemmer = nltk.stem.PorterStemmer()
categories_file_name = r'/workspace/datasets/product_data/categories/categories_0001_abcat0010000_to_pcmcat993000... | github_jupyter |
```
import re
import pandas as pd
import spacy
from typing import List
from math import sqrt, ceil
# gensim
from gensim import corpora
from gensim.models.ldamulticore import LdaMulticore
# plotting
from matplotlib import pyplot as plt
from wordcloud import WordCloud
import matplotlib.colors as mcolors
# progress bars
f... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
# Distributed CNTK using custom docker images
In this tutorial, you will train a CNTK model on the [MNIST](http://yann.lecun.com/exdb/mnist/) dataset using a custom docker image and distributed training.
## Prerequisites
* Unde... | github_jupyter |
# Initial_t_rad Bug
The purpose of this notebook is to demonstrate the bug associated with setting the initial_t_rad tardis.plasma property.
```
pwd
import tardis
import numpy as np
```
## Density and Abundance test files
Below are the density and abundance data from the test files used for demonstrating this bug.
... | github_jupyter |
<a href="https://colab.research.google.com/github/MIT-LCP/sccm-datathon/blob/master/04_timeseries.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# eICU Collaborative Research Database
# Notebook 4: Timeseries for a single patient
This notebook ex... | 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 |
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 |
# 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 |
```
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 |
# 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 |
# 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 |
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 |
# 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 |
# Задание 1.1 - Метод К-ближайших соседей (K-neariest neighbor classifier)
В первом задании вы реализуете один из простейших алгоритмов машинного обучения - классификатор на основе метода K-ближайших соседей.
Мы применим его к задачам
- бинарной классификации (то есть, только двум классам)
- многоклассовой классификац... | 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 |
<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 |
# 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 |
# 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 |
## 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 |
# 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 |
# 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 |
# 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 |
```
! 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 |
```
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 |
# 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 |
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 |
# 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 |
```
# 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 |
# 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 |
<!--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 |
# 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 |
## 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 |
```
"""
Today we will be looking at the 2 Naive Bayes classification algorithms SeaLion has to offer - gaussian and multinomial (more common).
Both of them use the same underlying principles and as usual we'll explain them step by step.
"""
# first import
import sealion as sl
from sealion.naive_bayes import Gaussian... | github_jupyter |
<h1><center>Deep Learning Helping Navigate Robots</center></h1>
<img src="https://storage.googleapis.com/kaggle-competitions/kaggle/13242/logos/thumb76_76.png?t=2019-03-12-23-33-31" width="300"></img>
### Dependencies
```
import warnings
import cufflinks
import numpy as np
import pandas as pd
import seaborn as sns
im... | github_jupyter |
## Explore The Data: Plot Categorical Features
Using the Titanic dataset from [this](https://www.kaggle.com/c/titanic/overview) Kaggle competition.
This dataset contains information about 891 people who were on board the ship when departed on April 15th, 1912. As noted in the description on Kaggle's website, some peo... | github_jupyter |
```
%matplotlib inline
```
# Tensors
Tensors are a specialized data structure that are very similar to arrays and matrices.
In PyTorch, we use tensors to encode the inputs and outputs of a model, as well as the model’s parameters.
Tensors are similar to [NumPy’s](https://numpy.org/) ndarrays, except that tensors ca... | github_jupyter |
## Evaluate CNTK Fast-RCNN model directly from python
This notebook demonstrates how to evaluate a single image using a CNTK Fast-RCNN model.
For a full description of the model and the algorithm, please see the following <a href="https://docs.microsoft.com/en-us/cognitive-toolkit/Object-Detection-using-Fast-R-CNN" t... | github_jupyter |
# Predicting Review rating from review text
# <span style="color:dodgerblue"> Naive Bayes Classifier Using 5 Classes (1,2,3,4 and 5 Rating)</span>
```
%pylab inline
import warnings
warnings.filterwarnings('ignore')
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "a... | github_jupyter |
# Exact Cover問題
最初にExact Cover問題について説明します。
ある自然数の集合Uを考えます。またその自然数を含むいくつかのグループ$V_{1}, V_{2}, \ldots, V_{N}$を想定します。1つの自然数が複数のグループに属していても構いません。さて、そのグループ$V_{i}$からいくつかピックアップしたときに、それらに同じ自然数が複数回含まれず、Uに含まれる自然数セットと同じになるようにピックアップする問題をExact Cover問題といいます。
さらに、選んだグループ数を最小になるようにするものを、Smallest Exact Coverといいます。
## 準備
```
%matplot... | github_jupyter |
# Introduction to optimization
The basic components
* The objective function (also called the 'cost' function)
```
import numpy as np
objective = np.poly1d([1.3, 4.0, 0.6])
print(objective)
```
* The "optimizer"
```
import scipy.optimize as opt
x_ = opt.fmin(objective, [3])
print("solved: x={}".format(x_))
%matplo... | github_jupyter |
# Other programming languages
**Today we talk about various programming languages:** If you have learned one programming language, it is easy to learn the next.
**Different kinds** of programming languages:
1. **Low-level, compiled (C/C++, Fortran):** You are in full control, but need to specify types, allocate memo... | github_jupyter |
```
import networkx as nx
from custom import load_data as cf
from networkx.algorithms import bipartite
from nxviz import CircosPlot
import numpy as np
import matplotlib.pyplot as plt
%load_ext autoreload
%autoreload 2
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
```
# Introduction
Bipartite grap... | github_jupyter |
# Introduction
In the [Intro to SQL micro-course](https://www.kaggle.com/learn/intro-to-sql), you learned how to use [**INNER JOIN**](https://www.kaggle.com/dansbecker/joining-data) to consolidate information from two different tables. Now you'll learn about a few more types of **JOIN**, along with how to use **UNION... | github_jupyter |
```
!pip install transformers datasets tweet-preprocessor ray[tune] hyperopt
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import wordcloud
import preprocessor as p # tweet-preprocessor
import nltk
import re
import seaborn as sns
import torch
from transformers import BertTokenizer, B... | github_jupyter |
```
import pandas as pd
from sklearn.tree import DecisionTreeClassifier # Import Decision Tree Classifier
from sklearn.model_selection import train_test_split # Import train_test_split function
from sklearn import metrics #Import scikit-learn metrics module for accuracy calculation
from fastapi import FastAPI
import uv... | github_jupyter |
# Finding cellular regions with superpixel analysis
**Overview:**
Whole-slide images often contain artifacts like marker or acellular regions that
need to be avoided during analysis. In this example we show how HistomicsTK can
be used to develop saliency detection algorithms that segment the slide at low
magnificatio... | github_jupyter |
```
import matplotlib.pyplot as plt
import numpy as np
import os
import PIL
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
from tensorflow.keras.models import Sequential
from tensorflow.keras.preprocessing.image import ImageDataGenerator
import pathlib
from tqdm import tqdm
f... | github_jupyter |
# 📃 Solution for Exercise M2.01
The aim of this exercise is to make the following experiments:
* train and test a support vector machine classifier through
cross-validation;
* study the effect of the parameter gamma of this classifier using a
validation curve;
* study if it would be useful in term of classificat... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.