This script provides an example of using cross-validation to fine-tune parameters for learning a decision tree with scikit-learn.
A blog post about this code is available here, check it out!
var RetreatAttendeeRegistrationStart = React.createClass({ | |
render: function() { | |
return ( | |
<div> | |
<h1>Retreat Attendee Registration</h1> | |
<div className="form-group"> | |
<label>First Name</label> | |
<input type="text" | |
id="first_name" | |
ref="first_name" |
class Tipper | |
TAX = 0.05 | |
def initializer(amount:, discount_percentage: 0, tip_percentage:) | |
@amount = amount | |
@discount_percentage = discount_percentage | |
@tip_percentage = tip_percentage | |
end | |
def total |
from math import * | |
def f(mu, sigma2, x): | |
return 1 / sqrt(2. * pi * sigma2) * exp(-.5 * (x - mu) **2 / sigma2) | |
print f(10., 4., 10.) |
# In this exercise, you should implement the | |
# resampler shown in the previous video. | |
from math import * | |
import random | |
landmarks = [[20.0, 20.0], [80.0, 80.0], [20.0, 80.0], [80.0, 20.0]] | |
world_size = 100.0 | |
class robot: |
# ---------- | |
# Background | |
# | |
# A robotics company named Trax has created a line of small self-driving robots | |
# designed to autonomously traverse desert environments in search of undiscovered | |
# water deposits. | |
# | |
# A Traxbot looks like a small tank. Each one is about half a meter long and drives | |
# on two continuous metal tracks. In order to maneuver itself, a Traxbot can do one | |
# of two things: it can drive in a straight line or it can turn. So to make a |
# ----------- | |
# User Instructions: | |
# | |
# Modify the the search function so that it becomes | |
# an A* search algorithm as defined in the previous | |
# lectures. | |
# | |
# Your function should return the expanded grid | |
# which shows, for each element, the count when | |
# it was expanded or -1 if the element was never expanded. |
```scss | |
// Media Queries, iPhone Portrait, iPhone Landscape, iPad Portrait... | |
@media (max-width: 480px) { | |
// Mixins | |
// CSS Elements | |
// ID | |
// Class | |
} |
print(__doc__) | |
# Author: Alexandre Gramfort <[email protected]> | |
# Fabian Pedregosa <[email protected]> | |
# | |
# License: BSD 3 clause (C) INRIA | |
############################################################################### | |
# Generate sample data |
print(__doc__) | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib.colors import ListedColormap | |
from sklearn import neighbors, datasets | |
n_neighbors = 15 | |
# import some data to play with |
This script provides an example of using cross-validation to fine-tune parameters for learning a decision tree with scikit-learn.
A blog post about this code is available here, check it out!