path
stringlengths
7
265
concatenated_notebook
stringlengths
46
17M
S1/BIMA/TME/TME1/TME1_Kordon_Durand/TME1_Kordon_Durand.ipynb
###Markdown Practical work 1: introduction and image enhancement - Quick start for Python (10 minutes!) : https://www.stavros.io/tutorials/python/- Quick start for Numpy : https://numpy.org/devdocs/user/quickstart.html- For Matlab users: Numpy is very similar but with some important difference, see http://mathesaurus....
Pymaceuticals/.ipynb_checkpoints/pymaceuticals_starter-checkpoint.ipynb
###Markdown Observations and Insights Dependencies and starter code ###Code # Dependencies and Setup import matplotlib.pyplot as plt import pandas as pd import scipy.stats as st # Study data files mouse_metadata = "data/Mouse_metadata.csv" study_results = "data/Study_results.csv" # Read the mouse data and the study...
4. CIFAR10/cifar.ipynb
###Markdown Classifying images of everyday objects using a neural networkThe ability to try many different neural network architectures to address a problem is what makes deep learning really powerful, especially compared to shallow learning techniques like linear regression, logistic regression etc. In this assignmen...
udemy_ml_bootcamp/Python-for-Data-Visualization/Seaborn/Seaborn Exercises .ipynb
###Markdown ___ ___ Seaborn ExercisesTime to practice your new seaborn skills! Try to recreate the plots below (don't worry about color schemes, just the plot itself. The DataWe will be working with a famous titanic data set for these exercises. Later on in the Machine Learning section of the course, we will revisit t...
003 - Machine Learing/LinearRegression_Diabetes.ipynb
###Markdown Comparando Real e Predito ###Code df = pd.DataFrame({'Real': y_valid, 'Predito': predictions}).head(50) df.plot(kind='bar',figsize=(20,8)) plt.grid(which='major', linestyle='-', linewidth='0.5', color='green') plt.grid(which='minor', linestyle=':', linewidth='0.5', color='black') plt.show() ###Output _____...
Manufacturing/automation/artifacts/amlnotebooks/4a Safety Incident Reports Form Recognizer.ipynb
###Markdown Azure Form RecognizerAzure Form Recognizer is a cognitive service that uses machine learning technology to identify and extract key-value pairs and table data from form documents. It then outputs structured data that includes the relationships in the original file. ![](https://dreamdemostorageforgen2.bl...
adding_layers/ecg_train_2conv_10run.ipynb
###Markdown 1D-CNN Model for ECG Classification- The model used has 2 Conv. layers and 2 FC layers.- This code repeat running the training process and produce all kinds of data which can be given, such as data needed for drawing loss and accuracy graph through epochs, and maximum test accuracy for each run. Get permi...
Data science/Analise de dados/exercicio python/Exemplo Jupyter/Untitled.ipynb
###Markdown Projeto de análise de dados ###Code import pandas as pd titanic = pd.read_csv("titanic.csv", sep="\t") titanic.head() titanic ###Output _____no_output_____
Lesson 08 - Linear Regression II.ipynb
###Markdown Lesson 08 - Linear Regression IIAustin Derrow-Pinion ###Code import numpy as np import pandas as pd import tensorflow as tf import matplotlib.pyplot as plt from sklearn.preprocessing import scale %matplotlib inline df = pd.read_csv('./Data/wine_quality_white.csv', sep=';') df.head() df.describe() # 11 feat...
scientific_computation/sympy.ipynb
###Markdown [SymPy](http://www.sympy.org/en/index.html)A Python library for symbolic mathematics. Among others things, it provides:1. [Symbolic simplification](http://docs.sympy.org/latest/tutorial/simplification.html).2. [Calculus (derivatives, integrals, limits, and series expansions)](http://docs.sympy.org/latest/t...
notebooks/Demo6.ipynb
###Markdown Example 02: CIFAR-10 Demo ###Code import sys sys.path.append('./../') import matplotlib %matplotlib inline import visualisation ###Output _____no_output_____ ###Markdown (i) Train an ANT on the CIFAR-10 image recognition datasetFrom the code directory, run the following command to train an ANT:```bashpyth...
03 - Working with NumPy/notebooks/04-Setting-and-Slicing-Array-Elements.ipynb
###Markdown Setting and Slicing Array Elements ###Code import numpy as np ###Output _____no_output_____ ###Markdown Array Slicing ###Code # Create an array A = np.array([1, 2, 3, 4, 5, 6, 7, 8]) print(A) ###Output [1 2 3 4 5 6 7 8] ###Markdown Positive IndexingSelect `nth` element of an array by using `var[positi...
notebooks/eda_chexpert.ipynb
###Markdown Take a Quick Look at the Data Structure ###Code train_df.head() train_df.info() ###Output <class 'pandas.core.frame.DataFrame'> RangeIndex: 223414 entries, 0 to 223413 Data columns (total 19 columns): # Column Non-Null Count Dtype --- ------ -------------- ...
solutions/03-combiner.ipynb
###Markdown Analyse et visualisation de données avec Python Combiner des DataFrames avec PandasQuestions* Peut-on travaillers avec plusieurs sources de données?* Comment combiner les données de deux DataFrames?Objectifs* Combiner les données de plusieurs fichiers en utilisant `concat` et `merge`.* Combiner deux DataFr...
cleaning/01_cleaning_code_by_state/MO_cleaning.ipynb
###Markdown Read in federal level data ###Code fiscal = pd.read_sas('../../data/fiscal2018', format = 'sas7bdat', encoding='iso-8859-1') ###Output _____no_output_____ ###Markdown Generate list of districts in the state in the federal data ###Code state_fiscal = fiscal[(fiscal['STABBR'] == abbr) & (fiscal['GSHI'] == '12...
Rightmove.ipynb
###Markdown Rightmove - Building a dataset of property listings---In this notebook, I will be demonstrating how to scrape property listings from Rightmove.co.uk, the UK's largest property listing website. This notebook will create a csv file with the following information for each property listing:* Price* Proper...
notebooks/curve_interface_methyl.ipynb
###Markdown Part 0: Prepare Required file ###Code host = 'me1' n_bp = 13 find_helix_folder = '/Users/alayah361/Documents/Research/work/methylation/cg_13/curves/' prep_helix = PrepareHelix(find_helix_folder, host, n_bp) print(f'cd {prep_helix.workfolder}') # prep_helix.copy_input_xtc() # prep_helix.copy_input_pdb() ##...
health-students.ipynb
###Markdown Risk Adjustment and Machine Learning Loading health data ###Code # Import pandas and assign to it the pd alias import pandas as pd # Load csv to pd.dataframe using pd.read_csv df_salud = pd.read_csv('../suficiencia.csv') # Index is not appropiately set print(df_salud.head()) # pd.read_csv inferred unco...
EMR/smstudio-pyspark-hive-sentiment-analysis.ipynb
###Markdown OverviewThis notebook does the following:* Demonstrates how you can visually connect Amazon SageMaker Studio Sparkmagic kernel to a kerberized EMR cluster* Explore and query data from a Hive table * Use the data locally* Provides resources that demonstrate how to use the local data for ML including using S...
notebooks/6D_mg_KRT_crm_checks.ipynb
###Markdown 06/29/2020KRT (GDSD6 checks) ###Code # basic packages import os, glob import pandas as pd import numpy as np; np.random.seed(0) import itertools from collections import Counter, defaultdict import time # machine learning packages from sklearn from sklearn.preprocessing import MinMaxScaler #StandardScaler ...
Module_3/Module_3_1.ipynb
###Markdown Module 3.1 Goal: make code - **readable**- **reuseable**- testable Approach: **modularization** (create small reuseable pieces of code)- functions- modules Unit 5: Functions Python functions* `len(a)`* `max(a)`* `sum(a)`* `range(start, stop, step)` or `range(stop)`* `print(s)` or `print(s1, s2, ...)` or ...
DaisyAI.ipynb
###Markdown **Prediction Time** ###Code model = tf.keras.models.load_model(save_directory) for path in sorted(glob("./Image_Test/*")): img = tf.keras.preprocessing.image.load_img(path, target_size=(image_height, image_width, 3)) #Transforme l'image en array, où chaque pixel est une liste, avec 3 valeurs RBG ...
SampleCode/S+P_Week_4_Lesson_1.ipynb
###Markdown ###Code try: # %tensorflow_version only exists in Colab. %tensorflow_version 2.x except Exception: pass import tensorflow as tf import numpy as np import matplotlib.pyplot as plt print(tf.__version__) def plot_series(time, series, format="-", start=0, end=None): plt.plot(time[start:end], series[...
microsoft/DEV288/Module1/IntroToClassicalNlp.ipynb
###Markdown Introduction to Classical Natural Language Processing This notebook is a hands-on introduction to Classical NLP, that is, non-deep learning techniques of NLP. It is designed to be used with the edX course on Natural Language Processing, from Microsoft. The topics covered align with the NLP tasks related ...
Kinetics/estimate_kinetics.ipynb
###Markdown Kinetics Estimator ###Code %matplotlib inline import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np from IPython.display import display import rmgpy from rmgpy.data.kinetics.family import TemplateReaction from rmgpy.data.kinetics.depository import DepositoryReaction from rmgpy.data.r...
tutorials/streamlit_notebooks/healthcare/RE_CLINICAL.ipynb
###Markdown ![JohnSnowLabs](https://nlp.johnsnowlabs.com/assets/images/logo.png)[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JohnSnowLabs/spark-nlp-workshop/blob/master/tutorials/streamlit_notebooks/healthcare/RE_CLINICAL.ipynb) **Detect causalit...
tutorials/W1D2_ModelingPractice/student/W1D2_Tutorial1.ipynb
###Markdown Tutorial 1: Framing the Question**Week 1, Day 2: Modeling Practice****By Neuromatch Academy**__Content creators:__ Marius 't Hart, Megan Peters, Paul Schrater, Gunnar Blohm__Content reviewers:__ Eric DeWitt, Tara van Viegen, Marius Pachitariu__Production editors:__ Ella Batty **Our 2021 Sponsors, includi...
AutoRec/AutoRec_tf2.ipynb
###Markdown Reference* http://users.cecs.anu.edu.au/~u5098633/papers/www15.pdf* https://grouplens.org/datasets/movielens/1m/* https://vitobellini.github.io/posts/2018/01/03/how-to-build-a-recommender-system-in-tensorflow.html* https://github.com/npow/AutoRec ###Code import random import numpy as np import pandas as pd...
Linear_Regresion_with_PyTorch_Titanic_Dataset.ipynb
###Markdown Finally, it is possible to verify that the model has the same loss than in the validation test above ###Code test_loader = DataLoader(val_dataset, batch_size=32) result = evaluate(model2, test_loader) result ###Output _____no_output_____ ###Markdown Step 9: Commit and Upload the Notebook ###Code jovian.com...
nli_01_task_and_data.ipynb
###Markdown Natural language inference: task and datasets ###Code __author__ = "Christopher Potts" __version__ = "CS224u, Stanford, Spring 2020" ###Output _____no_output_____ ###Markdown Contents1. [Overview](Overview)1. [Our version of the task](Our-version-of-the-task)1. [Primary resources](Primary-resources)1. [NL...
GetStarted/08_masking.ipynb
###Markdown Pydeck Earth Engine IntroductionThis is an introduction to using [Pydeck](https://pydeck.gl) and [Deck.gl](https://deck.gl) with [Google Earth Engine](https://earthengine.google.com/) in Jupyter Notebooks. If you wish to run this locally, you'll need to install some dependencies. Installing into a new Cond...
notebooks/Working_with_Imbalanced_Data.ipynb
###Markdown Imbalanced Data PreprocessingStrategies for balancing highly imbalanced datasets:* Oversample - Oversample the minority class to balance the dataset - Can create synthetic data based on the minority class* Undersample - Remove majority class data (not preferred)* Weight Classes - Use class weights ...
Workspaces/Using an Already existing Workspace.ipynb
###Markdown Using an already existing Workspace in Azure ML by `Mr. Harshit Dawar!` ###Code # Importing the workspaces class from azureml.core import Workspace # Mentioning all the important stuff, replace the placeholders by the values that are required. ws = Workspace.get(name = "<Workspace Name>", ...
docs/_downloads/35ec506a78f5361e3a8f74f5b1cdfc8d/plot__functions.ipynb
###Markdown FunctionsSome plots visualize a transformation of the original data set. Use astat parameter to choose a common transformation to visualize.Each stat creates additional variables to map aesthetics to. Thesevariables use a common ..name.. syntax.Look at the examples below. ###Code import pandas as pd from ...
sandpit/merge_atlas_nc.ipynb
###Markdown Merge the stratification and SSH atlas files into one ###Code from iwatlas import sshdriver import xarray as xr import pandas as pd import numpy as np from datetime import datetime basedir = '/home/suntans/cloudstor/Data/IWAtlas' # climfile = '{}/NWS_2km_GLORYS_hex_2013_2014_Climatology.nc'.format(base...
mountain_car.ipynb
###Markdown https://pythonprogramming.net/q-learning-reinforcement-learning-python-tutorial/https://en.wikipedia.org/wiki/Q-learning ###Code # objective is to get the cart to the flag. # for now, let's just move randomly: import gym import numpy as np env = gym.make("MountainCar-v0") LEARNING_RATE = 0.1 DISCOUNT = ...
Hyperparameter Tuning, Regularization and Optimization/Week 1/Regularization.ipynb
###Markdown RegularizationWelcome to the second assignment of this week. Deep Learning models have so much flexibility and capacity that **overfitting can be a serious problem**, if the training dataset is not big enough. Sure it does well on the training set, but the learned network **doesn't generalize to new exampl...
tutorials/Certification_Trainings/Healthcare/22.CPT_Entity_Resolver.ipynb
###Markdown ![JohnSnowLabs](https://nlp.johnsnowlabs.com/assets/images/logo.png) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JohnSnowLabs/spark-nlp-workshop/blob/master/tutorials/Certification_Trainings/Healthcare/22.CPT_Entity_Resolver.ipynb) C...
content/lessons/06/Class-Coding-Lab/CCL-Functions.ipynb
###Markdown In-Class Coding Lab: FunctionsThe goals of this lab are to help you to understand:- How to use Python's built-in functions in the standard library.- How to write user-defined functions- The benefits of user-defined functions to code reuse and simplicity.- How to create a program to use functions to solve a...
2020/1121/hotel_dataWebScraping/WebScraping_mini.ipynb
###Markdown hotel key 데이터 구하기 ###Code from bs4 import BeautifulSoup from selenium import webdriver from tqdm import tqdm_notebook import time global options options = webdriver.ChromeOptions() options.add_argument('headless') options.add_argument('window-size=1920x1080') options.add_argument('disable-gpu') options.ad...
examples/notebooks/WWW/censored_data.ipynb
###Markdown Fitting censored dataExperimental measurements are sometimes censored such that we only know partial information about a particular data point. For example, in measuring the lifespan of mice, a portion of them might live through the duration of the study, in which case we only know the lower bound.One of t...
tutorials/Resnet_TorchVision_Interpret.ipynb
###Markdown Model Interpretation for Pretrained ResNet Model This notebook demonstrates how to apply model interpretability algorithms on pretrained ResNet model using a handpicked image and visualizes the attributions for each pixel by overlaying them on the image.The interpretation algorithms that we use in this not...
chapter2/Chapter 2.ipynb
###Markdown Chapter 2: Our First Model ###Code import torch import torch.nn as nn import torch.optim as optim import torch.utils.data import torch.nn.functional as F import torchvision from torchvision import transforms from PIL import Image, ImageFile ImageFile.LOAD_TRUNCATED_IMAGES=True ###Output _____no_output____...
deprecated/notebooks/KEGG_datacleaning-withSMILEs.ipynb
###Markdown check for reversible reactions ###Code def get_reaction_list(df_with_reaction_column): """get the list of reaction from a dataframe that contains reaction column""" reaction_list = [] for index,row in df_with_reaction_column.iterrows(): for reaction in row['reaction']: reac...
code/ex03/ex03_moritz_eck.ipynb
###Markdown Deep Learning for Natural Language Processing: Exercise 03Moritz Eck (14-715-296)University of ZurichPlease see the section right at the bottom of this notebook for the discussion of the results as well as the answers to the exercise questions. Mount Google Drive (Please do this step first => only needs t...
day_3_simple_model.ipynb
###Markdown Data loading ###Code df = pd.read_hdf('data/car.h5') df.shape df.columns df.select_dtypes(np.number).columns ###Output _____no_output_____ ###Markdown Dummy model ###Code feats = ['car_id'] X = df[feats].values y = df['price_value'].values model = DummyRegressor().fit(X,y) y_pred = model.predict(X) mae(y,...
Sequences, Time Series and Prediction/Week 3 Recurrent Neural Networks for Time Series/S+P_Week_3_Exercise_Question.ipynb
###Markdown ###Code #@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, softwar...
Deep Q_Network/q_learning_2015_priotized_experience/.ipynb_checkpoints/Deep_Q_Network-checkpoint.ipynb
###Markdown Deep Q-Network (DQN)---In this notebook, you will implement a DQN agent with OpenAI Gym's LunarLander-v2 environment. 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 ###Output ...
mavenn/development/21.11.07_revision_development/21.11.07_check_mavenn_for_single_mutants_only_training_using_gb1.ipynb
###Markdown This notebook checks mavenn's new feature where if user supplies only single mutants, then mavenn requires that ge_nonlinearity_type == 'linear', and gpmap_type == 'additive', and ge_noise_model_type == 'Gaussian'. Errors are thrown when set_data is called. ###Code # Standard imports import pandas as pd im...
linked_lists/palindrome/palindrome_solution.ipynb
###Markdown This notebook was prepared by [Donne Martin](http://donnemartin.com). Source and license info is on [GitHub](https://github.com/donnemartin/interactive-coding-challenges). Solution Notebook Problem: Determine if a linked list is a palindrome.* [Constraints](Constraints)* [Test Cases](Test-Cases)* [Algorit...
notebooks/etk_tutorial.ipynb
###Markdown This tutorial shows you how to use ETK to extract information for all soccer teams in Italy. Suppose that you want to construct a list of records containing team name, home city, latitude and longitude for every team in Italy. We start with a Wikipedia page that lists all soccer teams in Italy:https://en.wi...
10/Numerical_optimization.ipynb
###Markdown Numerical optimization You will learn to solve non-convex multi-dimensional optimization problems using numerical optimization with multistart and nesting (**scipy.optimize**). You will learn simple function approximation using linear interpolation (**scipy.interp**). **Links:**1. **scipy.optimize:** [ove...
ML Notebook/Strain_Recommender.ipynb
###Markdown Load the Data ###Code """ Import Statements """ # Classics import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity from sklearn.neighbors import NearestNei...
tutorials/streamlit_notebooks/healthcare/NER_EVENTS_CLINICAL.ipynb
###Markdown ![JohnSnowLabs](https://nlp.johnsnowlabs.com/assets/images/logo.png)[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JohnSnowLabs/spark-nlp-workshop/blob/master/tutorials/streamlit_notebooks/healthcare/NER_EVENTS_CLINICAL.ipynb) **Detect ...
notebooks/lfm/lfm.ipynb
###Markdown Latent factor models (LFM)This notebook contains examples of various kinds of latent factor models.(* denotes official TF2 tutorial, not part of pyprobml repo.)* PCA * [Medium post (with TF2 code) by Mukesh Mithrakumar](https://dev.to/mmithrakumar/principal-components-analysis-with-tensorflow-2-0-21hl) ...
Rethinking_2/Chp_06.ipynb
###Markdown Chapter 6 ###Code import warnings import arviz as az import matplotlib.pyplot as plt import numpy as np import pandas as pd import pymc as pm import seaborn as sns from scipy import stats from scipy.optimize import curve_fit warnings.simplefilter(action="ignore", category=FutureWarning) %config Inline.f...
HeartDisease.ipynb
###Markdown Heart Disease Prediction ###Code !pip install seaborn==0.9.0 import pandas as pd import numpy as np from fancyimpute import KNN from scipy.stats import chi2_contingency import matplotlib.pyplot as plt import seaborn as sns import matplotlib.pyplot as plt from random import randrange,uniform from sklearn.mo...
data_assimilation/01a_lorenz.ipynb
###Markdown Lorenz's (1963) model: forward modelling$$\newcommand{\myd}{\mathrm{d}}\newcommand{\statev}{\mathbf{X}}\newcommand{\lrayleigh}{{\mathrm{r}}}\newcommand{\rayleigh}{{\mathrm{Ra}}}\newcommand{\pr}{\mathrm{Pr}}\newcommand{\adj}{T}\newcommand{\tstep}{\Delta t}$$ IntroductionA good understanding of the forward m...
Model Evaluation/Model Evaluation.ipynb
###Markdown Lesson 1 - Training and Testing Models Code and quizzes**Training models in sklearn** ###Code # lesson level imports import pandas as pd import numpy as np import matplotlib.pyplot as plt %matplotlib inline # Read the data data = pd.read_csv('data_training.csv') # Split the data into X and y X = np.array(...
forest_version/07_Variational_Circuits.ipynb
###Markdown Current and near-term quantum computers suffer from imperfections, as we repeatedly pointed it out. This is why we cannot run long algorithms, that is, deep circuits on them. A new breed of algorithms started to appear since 2013 that focus on getting an advantage from imperfect quantum computers. The basic...
tutorials/single_table_data/02_CTGAN_Model.ipynb
###Markdown CTGAN Model===========In this guide we will go through a series of steps that will let youdiscover functionalities of the `CTGAN` model, including how to:- Create an instance of `CTGAN`.- Fit the instance to your data.- Generate synthetic versions of your data.- Use `CTGAN` to anonymize PII informat...
fundamentals/src/notebooks/030_remote_execution.ipynb
###Markdown Remote execution on compute cluster ###Code from azureml.core import Workspace ws = Workspace.from_config() target = ws.compute_targets["cpu-cluster"] from azureml.core import ScriptRunConfig script = ScriptRunConfig( source_directory="030_scripts", script="sklearn_vanilla_train.py", compute_...
junpu_cnn.ipynb
###Markdown 笔试《一》 使用tensorflow创建CNN对fashion-mnist数据集标签进行预测 ###Code from utils import mnist_reader import tensorflow as tf import matplotlib.pyplot as plt import numpy as np print(tf.__version__) # 使用Github项目包含的函数读取数据 X_train, y_train = mnist_reader.load_mnist('data/fashion', kind='train') X_test, y_test = mnist_read...
Ocean_DeepLearning_09_02_2021.ipynb
###Markdown ###Code import keras # Importa a biblioteca Keras from keras.datasets import mnist # Base de Dados MNIST from tensorflow.python.keras import Sequential # Arquitetura da nossa rede neura from tensorflow.python.keras.layers import Dense, Dropout # Neurônio (base da rede) e Regularizador (evita overfitting...
Beginner_3/9. Exception Handling.ipynb
###Markdown 9.1 [Try](https://docs.python.org/3.5/reference/compound_stmts.htmltry)Even if the syntax is correct, a line of code may still produce an error. It doesn't mean the code wouldn't work. Python's `try` statement is used to handle [Exceptions](https://docs.python.org/3.5/reference/executionmodel.htmlexception...
M_accelerate_6lastlayer-8fold_91.41-Copy5.ipynb
###Markdown MobileNet - Pytorch Step 1: Prepare data ###Code # MobileNet-Pytorch import argparse import torch import numpy as np import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.optim.lr_scheduler import StepLR from torchvision import datasets, transforms from torch.autogr...
docs/notebooks/Django_shot_requests_external_user.ipynb
###Markdown Get config ###Code username = config('USERNAME_TEST') password = config('PASSWORD_TEST') server_domain = "http://coquma-sim.herokuapp.com/api/" requested_backend = "fermions" url=server_domain + requested_backend +"/get_config/" r = requests.get(url,params={'username': username,'password':password}) prin...
notebooks/focal_loss.ipynb
###Markdown Binary focal loss ###Code class BinaryFocalWithLogitsLoss(nn.Module): """Computes the focal loss with logits for binary data. The Focal Loss is designed to address the one-stage object detection scenario in which there is an extreme imbalance between foreground and background classes during ...
notebooks/interpretability/explain-on-local/simple-feature-transformations-explain-local.ipynb
###Markdown Copyright (c) Microsoft Corporation. All rights reserved.Licensed under the MIT License. ![Impressions](https://PixelServer20190423114238.azurewebsites.net/api/impressions/MachineLearningNotebooks/how-to-use-azureml/explain-model/tabular-data/simple-feature-transformations-explain-local.png) Explain binary...
resources/adversarial_regression/.ipynb_checkpoints/Nash Adversarial Regression Game-checkpoint.ipynb
###Markdown Benchmark for regression ###Code data = pd.read_csv("data/winequality-white.csv", sep = ";") data.head() X = data.loc[:, data.columns != "quality"] y = data.quality ###Output _____no_output_____ ###Markdown Extract first few PCA components ###Code pca = PCA(n_components=11, svd_solver='full') pca.fit(X) ...
Platforms/Kaggle/Courses/Intro_to_Deep_Learning/5.Dropout_and_Batch_Normalization/exercise-dropout-and-batch-normalization.ipynb
###Markdown **This notebook is an exercise in the [Intro to Deep Learning](https://www.kaggle.com/learn/intro-to-deep-learning) course. You can reference the tutorial at [this link](https://www.kaggle.com/ryanholbrook/dropout-and-batch-normalization).**--- Introduction In this exercise, you'll add dropout to the *Spo...
_notebooks/2020-02-21-introducing-fastpages.ipynb
###Markdown Introducing fastpages> An easy to use blogging platform with extra features for Jupyter Notebooks.- toc: true - badges: true- comments: true- author: Jeremy Howard & Hamel Husain- image: images/diagram.png- categories: [fastpages, jupyter] ![](https://github.com/fastai/fastpages/raw/master/images/diagram.p...
simulate_baseline_performance.ipynb
###Markdown Disposition outcoming coding In the section below, we transform the SCDB vote and caseDisposition variables into an outcome variable indicating whether the case overall and each Justice has affirmed or reverse. * vote: [http://scdb.wustl.edu/documentation.php?var=votenorms](http://scdb.wustl.edu/docume...
examples/segmentation-example.ipynb
###Markdown Segmentation If you have Unet, all CV is segmentation now. Goals- train Unet on isbi dataset- visualize the predictions Preparation ###Code # Get the data: ! wget -P ./data/ https://www.dropbox.com/s/0rvuae4mj6jn922/isbi.tar.gz ! tar -xf ./data/isbi.tar.gz -C ./data/ ###Output _____no_output_____ ###Mar...
es1/Exercise1.ipynb
###Markdown Exercise 1.1 Task Test the Pseudo-Random Number generator downloaded from the NSL Ariel web site by estimating the integrals:- $\langle r \rangle = \int_0^1 r dr = 1/2$- $\sigma^2 = \int_0^1 (r-1/2)^2 dr = 1/12$ and dividing the interval $[0,1]$ into $M$ identical sub-intervals to implement the $\chi^2$...
Section-2-Machine-Learning-Pipeline-Overview/Machine-Learning-Pipeline-Step2-Feature-Engineering.ipynb
###Markdown Machine Learning Model Building Pipeline: Feature EngineeringIn the following videos, we will take you through a practical example of each one of the steps in the Machine Learning model building pipeline, which we described in the previous lectures. There will be a notebook for each one of the Machine Lear...
notebooks/02.a_Functions.ipynb
###Markdown Functions Functions are encapsulated code blocks. Useful because:* code is reusable (can be used in different parts of the code or even imported from other scripts)* can be documented * can be tested Examples ###Code import hashlib def calculate_md5(string): """Calculate the md5 for a given string ...
ML_Pandas_Profiling.ipynb
###Markdown ###Code #! pip install https://github.com/pandas-profiling/pandas-profiling/archive/master.zip import pandas as pd from pandas_profiling import ProfileReport dataset = pd.read_csv('https://raw.githubusercontent.com/Carlosrnes/group_work_ml/main/techscape-ecommerce/train.csv') dataset = dataset.drop(['Acc...
nutrition_analysis.ipynb
###Markdown My Home Nutrition Analysis Objective:Over the past few years, I have started paying more attention to my nutrition since nutrition is a large part in maintaining a healthy lifestyle. With this analysis I want to observe how the nutrition of foods within my home varies. In addition to our household foods, I...
003-Style GAN with ONNX Model.ipynb
###Markdown Read Image ###Code file_path = 'data/images/logo.jpg' image = cv2.imread(file_path) plt.imshow(cv2.cvtColor(image,cv2.COLOR_BGR2RGB)) plt.axis('off') plt.show() ###Output _____no_output_____ ###Markdown Prepare Model ###Code def PrepareNetWork(onnx_model,device): ie = IECore() ############## Sligh...
tracking/notebooks/jupyter/1_petrol_regression_lab.ipynb
###Markdown Problem Tutorial 1: Regression ModelWe want to predict the gas consumption (in millions of gallons/year) in 48 of the US statesbased on some key features. These features are * petrol tax (in cents); * per capital income (in US dollars); * paved highway (in miles); and * population of people with driving ...
site/en/guide/estimators/index.ipynb
###Markdown Copyright 2019 The TensorFlow Authors. ###Code #@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 applicab...
examples/nlp/token_classification/PunctuationWithBERT.ipynb
###Markdown Download and preprocess the data In this notebook we're going to use a subset of English examples from the [Tatoeba collection of sentences](https://tatoeba.org/eng), set NUM_SAMPLES=-1 and consider including other datasets to improve the performance of the model. Use [NeMo/examples/nlp/token_classificatio...
Trees Solved/Tree Representation Implementation (Nodes and References).ipynb
###Markdown Nodes and References Implementation of a TreeIn this notebook is the code corresponding to the lecture for implementing the representation of a Tree as a class with nodes and references! ###Code class BinaryTree(object): def __init__(self, obj): self.key = obj self.left_node = None ...
05_Merge/Auto_MPG/Exercises.ipynb
###Markdown MPG Cars Introduction:The following exercise utilizes data from [UC Irvine Machine Learning Repository](https://archive.ics.uci.edu/ml/datasets/Auto+MPG) Step 1. Import the necessary libraries ###Code import pandas as pd ###Output _____no_output_____ ###Markdown Step 2. Import the first dataset [cars1](h...
python_package/Tests/MakeDataSet/stitchtest/.ipynb_checkpoints/Untitled-checkpoint.ipynb
###Markdown For new image ###Code vobj2 =VideoStiching.VideoStiching('../../../../videoreader/SolveMap626/626EXP.avi') #vobj2.extract_relationship() vobj2.load_data() vobj2.Optimization(0.075) vobj2.show_stitched('output626_POC.mp4') vobj2.load_data() plt.imshow(vobj2.PeakMat,vmin=0,vmax=1) vobj2.load_FP() vobj2.getPe...
ch4_pandas_graph_anscombe.ipynb
###Markdown 그래프 그리기 - 데이터 시각화가 필요한 이유 1) 앤스콤 4분할 그래프 살펴보기 데이터 시각화를 보여주는 전형적인 사례로 앤스콤 4분할 그래프가 있다. 이 그래프는 영국의 프랭크 앤스콤이 데이터시각화하지 않고 수치만 확인할 때 발생할 수 있는 함정을 보여주기 위해 만든 그래프이다. 여기서 함정을 무엇일까?앤스콤 4분할 그래프를 구성하는 데이터 집합은 4개의 그룹을 구성되어 있다. 이 4개의 그룹은 각각 평균, 분산과 같은 수칫값이나 상관관계, 회귀선이 같다는 특징이 있다. 그래서 이런 결과만 보고 4개의 그룹의 데이터가 모두 같을 것이라는...
site/ru/guide/upgrade.ipynb
###Markdown Copyright 2018 The TensorFlow Authors. ###Code #@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 applicab...
notebooks/CNN_2D_MultiLabel_Submit.ipynb
###Markdown STEP 1: FUNCTIONS ###Code class FreeSoundDataset(Dataset): """ FreeSound dataset.""" # Initialize your data, download, etc. def __init__(self, X, y): self.len = X.shape[0] self.x_data = torch.from_numpy(X) self.y_data = torch.from_numpy(y) def __getitem__(...
QC Programming/QFT frequency manipulation.ipynb
###Markdown **QFT frequency manipulation** ###Code import numpy as np # Importing standard Qiskit libraries from qiskit import QuantumCircuit, transpile, Aer, IBMQ, QuantumRegister, ClassicalRegister, execute, BasicAer from qiskit.tools.jupyter import * from qiskit.visualization import * from ibm_quantum_widgets impo...
7.Regression/2.Multiple Regression/Multiple linear regression 2.ipynb
###Markdown Multiple Linear Regression ###Code import numpy as np import matplotlib.pyplot as plt import pandas as pd dataset = pd.read_csv('../Data.csv') X = dataset.iloc[:, :-1].values y = dataset.iloc[:, -1].values dataset.head() dataset.info() dataset.describe() import seaborn as sns sns.pairplot(dataset) from skl...
tensorboard_embeddings.ipynb
###Markdown Visualize word2vec embeddings in tensorboard ###Code import warnings warnings.filterwarnings(action='ignore', category=UserWarning, module='gensim') import gensim import tensorflow as tf import numpy as np from tensorflow.contrib.tensorboard.plugins import projector ###Output _____no_output_____ ###Markd...
More-DL/pure_Tensorflow_2.0/tensorflow_v2/notebooks/1_Introduction/helloworld.ipynb
###Markdown Hello WorldA very simple "hello world" using TensorFlow v2 tensors.- Author: Aymeric Damien- Project: https://github.com/aymericdamien/TensorFlow-Examples/ ###Code import tensorflow as tf # Create a Tensor. hello = tf.constant("hello world") print(hello) # To access a Tensor value, call numpy(). print(hell...
notebooks/medical-fraud-enrich-aliases-to-excel.ipynb
###Markdown Getting Data for Medical Fraud Detection The need, in this case, is to get potentially relevant variables to Excel with _intelligible_ column names for follow on analyses for medical fraud detection using Excel.This example will run with Python API version 1.9.1 _if_ you are using a Web GIS, but this wi...
python-scripts/data_analytics_learn/link_pandas/Ex_Files_Pandas_Data/Exercise Files/02_11/Final/Resampling.ipynb
###Markdown Resamplingdocumentation: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.resample.htmlFor arguments to 'freq' parameter, please see [Offset Aliases](http://pandas.pydata.org/pandas-docs/stable/timeseries.htmloffset-aliases) create a date range to use as an index ###Code # min: minut...
notebooks/gpt_fr_evaluation.ipynb
###Markdown **Copyright 2021 Antoine SIMOULIN.**Licensed under the Apache License, Version 2.0 (the "License"); 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 athttps://www.apache.org/licenses/LICENSE-2....
notebooks/B. Alignment statistics.ipynb
###Markdown Alignment statisticsThis Jupyter notebook calculates alignment statistics (number of chimeric reads, number of chimeric reads supporting an insertion) for samples in both the ILC and the B-ALL datasets. This calculation is performed seperately from the other notebooks due to the computationally (or more sp...
notebooks/20210714-gsa-and_or_classifier.ipynb
###Markdown Propositional Classifiers: In this notebook I try to design classifiers that act on the set of all blocks and output a tiebreaker binary label having access only to the features given by Henry in the focal students dataset. Those features are:1. Total number of students per block (used for normalization pu...
notebooks/official/model_monitoring/model_monitoring.ipynb
###Markdown Vertex Model Monitoring <a href="https://console.cloud.google.com/ai/platform/notebooks/deploy-notebook?download_url=https://github.com/GoogleCloudPlatform/vertex-ai-samples/raw/master/notebooks/official/model_monitoring/model_monitoring.ipynb" Open in GCP Notebooks Open in Co...
notebooks/9.0 Case Study 2 - Figuring Our Which Customers May Leave - Churn.ipynb
###Markdown Figuring Our Which Customers May Leave - Churn Analysis About our DatasetSource - https://www.kaggle.com/blastchar/telco-customer-churn1. We have customer information for a Telecommunications company2. We've got customer IDs, general customer info, the servies they've subscribed too, type of contract and m...