This file contains 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
# -*- coding: utf-8 -*- | |
# -*- mode: python -*- | |
# Adapted from mpl_toolkits.axes_grid2 | |
# LICENSE: Python Software Foundation (http://docs.python.org/license.html) | |
from matplotlib.offsetbox import AnchoredOffsetbox | |
class AnchoredScaleBar(AnchoredOffsetbox): | |
def __init__(self, transform, sizex=0, sizey=0, labelx=None, labely=None, loc=4, | |
pad=0.1, borderpad=0.1, sep=2, prop=None, **kwargs): | |
""" |
This file contains 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
import numpy as np | |
#from scipy.special import chdtrc | |
from scipy.sparse import spdiags | |
from sklearn.base import BaseEstimator, TransformerMixin | |
from sklearn.preprocessing import LabelBinarizer | |
def _chisquare(f_obs, f_exp, reduce): | |
"""Replacement for scipy.stats.chisquare with custom reduction. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.