Visualization of scikit-learn decision trees. Hover with the mouse over the paths to see the decision rules and a histogram of the classes that remain at a certain node in the tree. Checkout this repository to see how to use it in python and also directly in the jupyter notebook.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Robust non-linear feature estimation with scikit-learn applied to | |
the Fourier Transform. | |
""" | |
from matplotlib import pyplot as plt | |
import numpy as np | |
from sklearn.base import TransformerMixin | |
from sklearn.pipeline import make_pipeline |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Robust B-Spline regression with scikit-learn | |
""" | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import scipy.interpolate as si | |
from sklearn.base import TransformerMixin | |
from sklearn.pipeline import make_pipeline |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
ND Bspline basis class for Python | |
""" | |
import numpy as np | |
import scipy.interpolate as si | |
import matplotlib.pyplot as plt | |
import itertools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
2D BSpline Regression with Scikitlearn. | |
""" | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import scipy.interpolate as si | |
import itertools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Mini implementation of continuous wavelet transform (Morlet wavelet).""" | |
import numpy as np | |
import matplotlib.pyplot as plt | |
def continuous_wavelet_transform(signal, frequencies, time_step=1.0, | |
wavelet_width=5): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"some basic options | |
set shiftwidth=4 | |
set expandtab | |
set nowrap | |
set colorcolumn=80 | |
"let &colorcolumn=join(range(80, 999), ",") | |
" autopep 8 when hitting gq | |
au FileType python setlocal formatprg=autopep8\ - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var plot_tree = function(data, chart){ | |
// set some layout variables | |
var positionInfo = chart.getBoundingClientRect(); | |
var el_height = positionInfo.height; | |
var el_width = positionInfo.width; | |
var margin = {top: 20, right: 20, bottom: 30, left: 40}, | |
svg_width = el_width - margin.left - margin.right, | |
svg_height = el_height - margin.top - margin.bottom; | |
Visualization of the time-dependent correlation matrix of the food production of 245 countries from the united nations.
OlderNewer