repo_name stringlengths 6 92 | path stringlengths 4 191 | copies stringclasses 322
values | size stringlengths 4 6 | content stringlengths 821 753k | license stringclasses 15
values |
|---|---|---|---|---|---|
tawsifkhan/scikit-learn | examples/model_selection/plot_validation_curve.py | 229 | 1823 | """
==========================
Plotting Validation Curves
==========================
In this plot you can see the training scores and validation scores of an SVM
for different values of the kernel parameter gamma. For very low values of
gamma, you can see that both the training score and the validation score are
low. ... | bsd-3-clause |
acshi/osf.io | scripts/annotate_rsvps.py | 60 | 2256 | """Utilities for annotating workshop RSVP data.
Example ::
import pandas as pd
from scripts import annotate_rsvps
frame = pd.read_csv('workshop.csv')
annotated = annotate_rsvps.process(frame)
annotated.to_csv('workshop-annotated.csv')
"""
import re
import logging
from dateutil.parser import par... | apache-2.0 |
maheshakya/scikit-learn | sklearn/ensemble/tests/test_base.py | 28 | 1334 | """
Testing for the base module (sklearn.ensemble.base).
"""
# Authors: Gilles Louppe
# License: BSD 3 clause
from numpy.testing import assert_equal
from nose.tools import assert_true
from sklearn.utils.testing import assert_raise_message
from sklearn.datasets import load_iris
from sklearn.ensemble import BaggingCla... | bsd-3-clause |
eike-welk/clair | src/clairweb/libclair/test/test_descriptors.py | 1 | 4284 | # -*- coding: utf-8 -*-
###############################################################################
# Clair - Project to discover prices on e-commerce sites. #
# #
# Copyright (C) 2016 by Eike Welk ... | gpl-3.0 |
depet/scikit-learn | examples/linear_model/plot_logistic.py | 8 | 1400 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
=========================================================
Logit function
=========================================================
Show in the plot is how the logistic regression would, in this
synthetic dataset, classify values as either 0 or 1,
i.e. class one or two, u... | bsd-3-clause |
urschrei/geopandas | examples/nyc_boros.py | 8 | 1394 | """
Generate example images for GeoPandas documentation.
TODO: autogenerate these from docs themselves
Kelsey Jordahl
Time-stamp: <Tue May 6 12:17:29 EDT 2014>
"""
import numpy as np
import matplotlib.pyplot as plt
from shapely.geometry import Point
from geopandas import GeoSeries, GeoDataFrame
np.random.seed(1)
DP... | bsd-3-clause |
aounlutfi/E-commerce-Opimization | src/modeling.py | 2 | 4483 | # This file is part of E-Commerce Optimization (ECO)
# The (ECO) can be obtained at https://github.com/aounlutfi/E-commerce-Opimization
# ECO Copyright (C) 2017 Aoun Lutfi, University of Wollongong in Dubai
# Inquiries: aounlutfi@gmail.com
# The ECO is free software: you can redistribute it and/or modify it under th... | gpl-3.0 |
fatadama/estimation | challenge_problem/sim_data/data_loader.py | 1 | 2118 | """@package data_loader
Module with functions for loading data from an output file generated by generate_data.py
"""
import ConfigParser
import numpy as np
import matplotlib.pyplot as plt
def main():
name = 'sims_01_fast'
(tsim,XK,YK,mu0,P0,Ns,dt,tf) = load_data(name)
print(tsim,XK,YK)
print("Loaded simulation wi... | gpl-2.0 |
mathemage/h2o-3 | py2/h2o_cmd.py | 20 | 16497 |
import h2o_nodes
from h2o_test import dump_json, verboseprint
import h2o_util
import h2o_print as h2p
from h2o_test import OutputObj
#************************************************************************
def runStoreView(node=None, **kwargs):
print "FIX! disabling runStoreView for now"
return {}
if no... | apache-2.0 |
jor-/scipy | scipy/interpolate/interpolate.py | 4 | 97600 | from __future__ import division, print_function, absolute_import
__all__ = ['interp1d', 'interp2d', 'lagrange', 'PPoly', 'BPoly', 'NdPPoly',
'RegularGridInterpolator', 'interpn']
import itertools
import warnings
import functools
import operator
import numpy as np
from numpy import (array, transpose, searc... | bsd-3-clause |
hainm/scikit-learn | sklearn/decomposition/tests/test_fastica.py | 272 | 7798 | """
Test the fastica algorithm.
"""
import itertools
import warnings
import numpy as np
from scipy import stats
from nose.tools import assert_raises
from sklearn.utils.testing import assert_almost_equal
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import assert_true
from skl... | bsd-3-clause |
fibbo/DIRAC | Core/Utilities/Graphs/GraphUtilities.py | 10 | 14613 | ########################################################################
# $HeadURL$
########################################################################
""" GraphUtilities is a a collection of utility functions and classes used
in the DIRAC Graphs package.
The DIRAC Graphs package is derived from the... | gpl-3.0 |
PedroTrujilloV/nest-simulator | testsuite/manualtests/stdp_dopa_check.py | 14 | 10098 | # -*- coding: utf-8 -*-
#
# stdp_dopa_check.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License... | gpl-2.0 |
louispotok/pandas | pandas/tests/frame/test_operators.py | 1 | 42821 | # -*- coding: utf-8 -*-
from __future__ import print_function
from collections import deque
from datetime import datetime
import operator
import pytest
from numpy import nan, random
import numpy as np
from pandas.compat import range
from pandas import compat
from pandas import (DataFrame, Series, MultiIndex, Timest... | bsd-3-clause |
parroyo/Zappa | tests/tests.py | 1 | 64700 | # -*- coding: utf8 -*-
import base64
import collections
import json
from contextlib import nested
from cStringIO import StringIO as OldStringIO
from io import BytesIO, StringIO
import flask
import mock
import os
import random
import string
import zipfile
import re
import unittest
import shutil
import sys
import tempfi... | mit |
yw374cornell/e-mission-server | emission/analysis/modelling/tour_model/prior_unused/cluster_pipeline.py | 1 | 11691 | # Standard imports
import logging
import os, sys
import math
import numpy as np
import matplotlib
# matplotlib.use('Agg')
import pygmaps
from sklearn.cluster import KMeans
from sklearn import manifold
import matplotlib.pyplot as plt
# Our imports
import emission.analysis.modelling.tour_model.prior_unused.route_matchi... | bsd-3-clause |
danielfrg/cyhdfs3 | cyhdfs3/tests/test_avro.py | 2 | 2559 | from __future__ import print_function, absolute_import
import sys
import posixpath
import subprocess
import numpy as np
import pandas as pd
import pandas.util.testing as pdt
import cyavro
from utils import *
avroschema = """ {"type": "record",
"name": "from_bytes_test",
"fields":[
{"name": "id", "type": "int"}... | apache-2.0 |
michigraber/scikit-learn | examples/cluster/plot_birch_vs_minibatchkmeans.py | 333 | 3694 | """
=================================
Compare BIRCH and MiniBatchKMeans
=================================
This example compares the timing of Birch (with and without the global
clustering step) and MiniBatchKMeans on a synthetic dataset having
100,000 samples and 2 features generated using make_blobs.
If ``n_clusters... | bsd-3-clause |
hamish2014/optTune | examples/tMOPSO_simulated_annealing_f2py.py | 1 | 3155 | """
Tune the simulated annealing algorithm from the scipy package to the generalized Rosenbrock problem, for multiple objective function evaluation (OFE) budgets simulatenously.
Same as the other example, except a fortran version of fast sa is used.
"""
import numpy, os
from optTune import tMOPSO, get_F_vals_at_specifi... | gpl-3.0 |
DistrictDataLabs/03-censusables | censusables/stars1.py | 1 | 5966 | """MVP (Really week 1 progress)
This script assumes that geo joins have already been done by the
geojoin script and that there is a business/county join that's passed
in on the command line.
"""
import argparse
import json
import matplotlib.pyplot as plt
import pandas as pd
parser = argparse.ArgumentParser(__doc__)... | apache-2.0 |
JuBra/cobrapy | cobra/flux_analysis/double_deletion.py | 2 | 23264 | from warnings import warn
from itertools import chain, product
from six import iteritems, string_types
import numpy
from ..solvers import get_solver_name, solver_dict
from ..manipulation.delete import find_gene_knockout_reactions, \
get_compiled_gene_reaction_rules
from .deletion_worker import CobraDeletionPool, ... | lgpl-2.1 |
charanpald/wallhack | wallhack/modelselect/RealDataTreeProcess.py | 1 | 1243 | from sandbox.util.PathDefaults import PathDefaults
from sandbox.util import Util
from exp.modelselect.ModelSelectUtils import ModelSelectUtils
import matplotlib.pyplot as plt
import logging
import numpy
outputDir = PathDefaults.getOutputDir() + "modelPenalisation/regression/CART/"
datasets = ModelSelectUtils.ge... | gpl-3.0 |
rhyolight/nupic.research | projects/sp_paper/run_sp_tm_model.py | 4 | 13849 | ## ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2016, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progr... | gpl-3.0 |
prheenan/Research | Perkins/AnalysisUtil/ForceExtensionAnalysis/DataCorrection/CorrectionByFFT.py | 1 | 7635 | # force floating point division. Can still use integer with //
from __future__ import division
# This file is used for importing the common utilities classes.
import numpy as np
import matplotlib.pyplot as plt
import sys
from scipy.fftpack import rfft,irfft
from scipy.interpolate import interp1d
from FitUtil.FitUtils.... | gpl-3.0 |
zigahertz/2013-Sep-HR-ML-sprint | py/titanic.py | 1 | 3415 | import os
import csv as csv
import numpy as np
import matplotlib.pyplot as plt
path = os.getcwd()
csv_file_object = csv.reader(open(path + '/train.csv', 'rb'))
header = csv_file_object.next()
data = []
for row in csv_file_object:
data.append(row)
data = np.array(data)
number_passengers = np.size(data[0::, 0].a... | mit |
Jean13/CVE_Compare | python/v1.2/setup.py | 1 | 1092 | '''
CVE_Compare.py Dependencies
Run: python setup.py
'''
import subprocess, sys
def check_path():
try:
# Find where PIP.exe is
p = subprocess.Popen(["where.exe", "pip.exe"], stdout = subprocess.PIPE)
path = str(p.stdout.read())
# Clean up the path found before adding ... | apache-2.0 |
AtsushiSakai/PythonRobotics | PathTracking/pure_pursuit/pure_pursuit.py | 1 | 6184 | """
Path tracking simulation with pure pursuit steering and PID speed control.
author: Atsushi Sakai (@Atsushi_twi)
Guillaume Jacquenot (@Gjacquenot)
"""
import numpy as np
import math
import matplotlib.pyplot as plt
# Parameters
k = 0.1 # look forward gain
Lfc = 2.0 # [m] look-ahead distance
Kp = 1.0 # ... | mit |
dfridovi/path_planning | src/python/filter/map.py | 1 | 6696 | """
Copyright (c) 2015, The Regents of the University of California (Regents).
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
... | bsd-3-clause |
aylward/ITKTubeTK | examples/archive/TubeGraphKernels/expdrive.py | 7 | 7820 | ##############################################################################
#
# Library: TubeTK
#
# Copyright 2010 Kitware Inc. 28 Corporate Drive,
# Clifton Park, NY, 12065, USA.
#
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in comp... | apache-2.0 |
sandeepkrjha/pgmpy | pgmpy/estimators/base.py | 5 | 16290 | #!/usr/bin/env python
from warnings import warn
import numpy as np
import pandas as pd
from scipy.stats import chisquare
class BaseEstimator(object):
def __init__(self, data, state_names=None, complete_samples_only=True):
"""
Base class for estimators in pgmpy; `ParameterEstimator`,
`Stru... | mit |
magnunor/hyperspy | hyperspy/misc/holography/tools.py | 4 | 3063 | # -*- coding: utf-8 -*-
# Copyright 2007-2017 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | gpl-3.0 |
thientu/scikit-learn | benchmarks/bench_rcv1_logreg_convergence.py | 149 | 7173 | # Authors: Tom Dupre la Tour <tom.dupre-la-tour@m4x.org>
# Olivier Grisel <olivier.grisel@ensta.org>
#
# License: BSD 3 clause
import matplotlib.pyplot as plt
import numpy as np
import gc
import time
from sklearn.externals.joblib import Memory
from sklearn.linear_model import (LogisticRegression, SGDClassifi... | bsd-3-clause |
ztultrebor/BARKEVIOUS | oddsmaker.py | 1 | 2120 | # coding: utf-8
#read in libraries
import pandas as pd
import datetime
def read_odds(filenm, today_schedule):
odds = pd.read_csv(filenm)
if any([date != str(datetime.date.today()) for date in odds['Date']]):
raise ValueError('Check that Odds.csv has been update for today')
conversion = { 'ATL':'A... | mit |
QuantumElephant/horton | horton/scripts/atomdb.py | 4 | 22763 | # -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2017 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by th... | gpl-3.0 |
trichter/sito | colormap.py | 1 | 3124 | #!/usr/bin/python
# by TR
import numpy as np
import scipy as sp
import matplotlib.pyplot as plt
import matplotlib.colors
import os
import glob
CM_DATA = '/home/richter/Data/cm/'
def combine(cmaps, name, splitters=None, get_cdict=False):
if not splitters:
N = len(cmaps)
splitters = np.linspace(0, 1... | mit |
MartinDelzant/scikit-learn | sklearn/manifold/tests/test_isomap.py | 226 | 3941 | from itertools import product
import numpy as np
from numpy.testing import assert_almost_equal, assert_array_almost_equal
from sklearn import datasets
from sklearn import manifold
from sklearn import neighbors
from sklearn import pipeline
from sklearn import preprocessing
from sklearn.utils.testing import assert_less
... | bsd-3-clause |
SiLab-Bonn/monopix_daq | monopix_daq/analysis/plotting_base.py | 1 | 17517 | import numpy as np
import math
import logging
import shutil
import os,sys
import matplotlib
import random
import datetime
import tables
import matplotlib.pyplot as plt
from collections import OrderedDict
from scipy.optimize import curve_fit
from scipy.stats import norm
from matplotlib.figure import Figure
from matplot... | gpl-2.0 |
meteorcloudy/tensorflow | tensorflow/contrib/factorization/python/ops/gmm_test.py | 41 | 8716 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
PMende/Ecclesia | src/output/shapes.py | 1 | 3455 | from __future__ import absolute_import, division, print_function
from builtins import (
ascii, bytes, chr, dict, filter, hex, input, int, map,
next, oct, open, pow, range, round, str, super, zip)
# Standard library imports
import os
from itertools import cycle
import json
import numpy as np
# Imports for wor... | gpl-3.0 |
pythonvietnam/scikit-learn | sklearn/cross_decomposition/cca_.py | 209 | 3150 | from .pls_ import _PLS
__all__ = ['CCA']
class CCA(_PLS):
"""CCA Canonical Correlation Analysis.
CCA inherits from PLS with mode="B" and deflation_mode="canonical".
Read more in the :ref:`User Guide <cross_decomposition>`.
Parameters
----------
n_components : int, (default 2).
numb... | bsd-3-clause |
anhaidgroup/py_stringsimjoin | py_stringsimjoin/join/jaccard_join_py.py | 1 | 10448 | # jaccard join
from joblib import delayed, Parallel
import pandas as pd
from py_stringsimjoin.join.set_sim_join import set_sim_join
from py_stringsimjoin.utils.generic_helper import convert_dataframe_to_array, \
get_attrs_to_project, get_num_processes_to_launch, remove_redundant_attrs, \
split_table
from py_st... | bsd-3-clause |
ryfeus/lambda-packs | Sklearn_scipy_numpy/source/scipy/signal/signaltools.py | 4 | 88095 | # Author: Travis Oliphant
# 1999 -- 2002
from __future__ import division, print_function, absolute_import
import warnings
import threading
from . import sigtools
from scipy._lib.six import callable
from scipy._lib._version import NumpyVersion
from scipy import fftpack, linalg
from numpy import (allclose, angle, aran... | mit |
JohnGriffiths/dipy | scratch/very_scratch/diffusion_sphere_stats.py | 20 | 18082 | import nibabel
import os
import numpy as np
import dipy as dp
#import dipy.core.generalized_q_sampling as dgqs
import dipy.reconst.gqi as dgqs
import dipy.reconst.dti as ddti
import dipy.reconst.recspeed as rp
import dipy.io.pickles as pkl
import scipy as sp
from matplotlib.mlab import find
#import dipy.core.sphere_pl... | bsd-3-clause |
bosszhou/ThinkStats2 | code/chap12soln.py | 68 | 4459 | """This file contains code for use with "Think Stats",
by Allen B. Downey, available from greenteapress.com
Copyright 2014 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from __future__ import print_function
import pandas
import numpy as np
import statsmodels.formula.api as smf
import t... | gpl-3.0 |
sunzhxjs/JobGIS | lib/python2.7/site-packages/pandas/util/clipboard.py | 16 | 6355 | # Pyperclip v1.3
# A cross-platform clipboard module for Python. (only handles plain text for now)
# By Al Sweigart al@coffeeghost.net
# Usage:
# import pyperclip
# pyperclip.copy('The text to be copied to the clipboard.')
# spam = pyperclip.paste()
# On Mac, this module makes use of the pbcopy and pbpaste comm... | mit |
WangWenjun559/Weiss | summary/sumy/sklearn/linear_model/tests/test_perceptron.py | 378 | 1815 | import numpy as np
import scipy.sparse as sp
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import assert_true
from sklearn.utils.testing import assert_raises
from sklearn.utils import check_random_state
from sklearn.datasets import load_iris
from sklearn.linear_model import Pe... | apache-2.0 |
kjung/scikit-learn | sklearn/datasets/lfw.py | 31 | 19544 | """Loader for the Labeled Faces in the Wild (LFW) dataset
This dataset is a collection of JPEG pictures of famous people collected
over the internet, all details are available on the official website:
http://vis-www.cs.umass.edu/lfw/
Each picture is centered on a single face. The typical task is called
Face Veri... | bsd-3-clause |
speed-of-light/pyslider | lib/texer/nsf_roc_tab.py | 1 | 1464 | import pandas as pd
class NsfRocTab(object):
def __init__(self):
pass
def __extreme(self, data, key):
di = data[key].argmax()
return data.ix[di]
def __bold_max(self, dseries, x):
if dseries.max() - x < 0.000001:
bs = "BL{:.3f}BR".format(x)
tc = "ST... | agpl-3.0 |
mdegis/machine-learning | 001 - Naive Bayes Classifier/exercise/main.py | 1 | 1570 | #!/usr/bin/python
""" The objective of this exercise is to recreate the decision
boundary found in the lesson video, and make a plot that
visually shows the decision boundary """
import sys
sys.path.append("../../tools")
from prep_terrain_data import makeTerrainData
from sklearn.metrics import accuracy_score... | gpl-3.0 |
beyondvalence/biof509_wtl | Wk02/genetic_algorithm.py | 1 | 4420 | """Module to find shortest path connecting series of points
genetic_algorithm_optimizer accepts a set of coordinates,
cost function, new path function, population size, and
number of generations to return the optimized path, optimized distance,
and the other paths and distances.
20160218 Wayne Liu
... | mit |
bospetersen/h2o-3 | h2o-py/tests/testdir_misc/pyunit_frame_as_list.py | 1 | 1056 | import sys
sys.path.insert(1, "../../")
import h2o, tests
def frame_as_list(ip,port):
iris = h2o.import_file(path=h2o.locate("smalldata/iris/iris_wheader.csv"))
prostate = h2o.import_file(path=h2o.locate("smalldata/prostate/prostate.csv.zip"))
airlines = h2o.import_file(path=h2o.locate("smalldat... | apache-2.0 |
kazemakase/scikit-learn | examples/linear_model/lasso_dense_vs_sparse_data.py | 348 | 1862 | """
==============================
Lasso on dense and sparse data
==============================
We show that linear_model.Lasso provides the same results for dense and sparse
data and that in the case of sparse data the speed is improved.
"""
print(__doc__)
from time import time
from scipy import sparse
from scipy ... | bsd-3-clause |
dingocuster/scikit-learn | examples/feature_stacker.py | 246 | 1906 | """
=================================================
Concatenating multiple feature extraction methods
=================================================
In many real-world examples, there are many ways to extract features from a
dataset. Often it is beneficial to combine several methods to obtain good
performance. Th... | bsd-3-clause |
smartscheduling/scikit-learn-categorical-tree | examples/applications/svm_gui.py | 287 | 11161 | """
==========
Libsvm GUI
==========
A simple graphical frontend for Libsvm mainly intended for didactic
purposes. You can create data points by point and click and visualize
the decision region induced by different kernels and parameter settings.
To create positive examples click the left mouse button; to create
neg... | bsd-3-clause |
drewlinsley/draw_classify | draw/datasets/package_sketch_images.py | 1 | 5086 | #Import libraries for doing image analysis
from skimage.io import imread
from skimage.transform import resize
from sklearn.ensemble import RandomForestClassifier as RF
import glob
import os
from sklearn import cross_validation
from sklearn.cross_validation import StratifiedKFold as KFold
from sklearn.metrics import cla... | mit |
mcdeaton13/dynamic | Data/Calibration/Firm Calibration Python/parameters/depreciation/depreciation_calibration.py | 2 | 2016 | """
Depreciation Rate Calibration (depreciation_calibration.py):
-------------------------------------------------------------------------------
Last updated: 6/26/2015.
This module calibrates the firm economic and tax depreciation parameters.
"""
# Packages:
import os.path
import sys
import numpy as np
import pandas ... | mit |
crisojog/vqa_research | preprocess.py | 1 | 21353 | import argparse
import cPickle as pickle
import os
from operator import itemgetter
import matplotlib.pyplot as plt
import numpy as np
import spacy
import json
from keras.applications.inception_v3 import InceptionV3
from keras.applications.xception import Xception
from keras.applications.resnet50 import ResNet50
from ... | mit |
HeraclesHX/scikit-learn | sklearn/metrics/pairwise.py | 104 | 42995 | # -*- coding: utf-8 -*-
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Mathieu Blondel <mathieu@mblondel.org>
# Robert Layton <robertlayton@gmail.com>
# Andreas Mueller <amueller@ais.uni-bonn.de>
# Philippe Gervais <philippe.gervais@inria.fr>
# Lars Buitinck ... | bsd-3-clause |
hitlonewind/PR-experiment | Perceptron/perceptron.py | 1 | 3153 | #encoding=utf-8
import numpy as np
import random
from matplotlib import pyplot as plt
class Perceptron(object):
"""docstring for Perceptron"""
def __init__(self,study_step=0.0000001, study_total=10000):
super(Perceptron, self).__init__()
self.datadic = {}
self.label = {}
self.study_step = study_... | mit |
tbenthompson/tectosaur | tectosaur/continuity.py | 1 | 9699 | import numpy as np
import scipy.sparse.csgraph
from tectosaur.util.geometry import tri_normal, unscaled_normals, normalize
from tectosaur.constraints import ConstraintEQ, Term
from tectosaur.stress_constraints import stress_constraints, stress_constraints2, \
equilibrium_constraint, constant_stress_constraint
def ... | mit |
Sklearn-HMM/scikit-learn-HMM | sklean-hmm/semi_supervised/label_propagation.py | 8 | 14061 | # coding=utf8
"""
Label propagation in the context of this module refers to a set of
semisupervised classification algorithms. In the high level, these algorithms
work by forming a fully-connected graph between all points given and solving
for the steady-state distribution of labels at each point.
These algorithms per... | bsd-3-clause |
rseubert/scikit-learn | sklearn/cross_decomposition/tests/test_pls.py | 15 | 10172 | import numpy as np
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.datasets import load_linnerud
from sklearn.cross_decomposition import pls_
from nose.tools import assert_equal
def test_pls():
d = load_linnerud()
X = d.data
Y = d.target
# 1) Canonical (symmetric) PLS (PLS 2 b... | bsd-3-clause |
madjelan/scikit-learn | sklearn/covariance/tests/test_robust_covariance.py | 213 | 3359 | # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Gael Varoquaux <gael.varoquaux@normalesup.org>
# Virgile Fritsch <virgile.fritsch@inria.fr>
#
# License: BSD 3 clause
import numpy as np
from sklearn.utils.testing import assert_almost_equal
from sklearn.utils.testing import assert_array_alm... | bsd-3-clause |
yavalvas/yav_com | build/matplotlib/doc/mpl_examples/user_interfaces/embedding_in_wx4.py | 9 | 3640 | #!/usr/bin/env python
"""
An example of how to use wx or wxagg in an application with a custom
toolbar
"""
# Used to guarantee to use at least Wx2.8
import wxversion
wxversion.ensureMinimal('2.8')
from numpy import arange, sin, pi
import matplotlib
matplotlib.use('WXAgg')
from matplotlib.backends.backend_wxagg impo... | mit |
ctools/ctools | examples/show_lightcurve.py | 1 | 4489 | #! /usr/bin/env python
# ==========================================================================
# Display lightcurve generated by cslightcrv
#
# Copyright (C) 2017-2020 Juergen Knoedlseder
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License... | gpl-3.0 |
NlGG/envelope | envelope.py | 1 | 3825 | #!/usr/bin/python
#-*- encoding: utf-8 -*-
# Quantitative Economics Web: http://quant-econ.net/py/index.html
from __future__ import division
import math
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.animation as animation
def envelope(expression, with_animation=False, **kwargs):
# 可変長キーワ... | bsd-3-clause |
adiIspas/Machine-Learning_A-Z | Machine Learning A-Z/Part 4 - Clustering/Section 25 - Hierarchical Clustering/hc.py | 7 | 1771 | # Hierarchical Clustering
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the dataset
dataset = pd.read_csv('Mall_Customers.csv')
X = dataset.iloc[:, [3, 4]].values
# y = dataset.iloc[:, 3].values
# Splitting the dataset into the Training set and Test set
... | mit |
jchodera/mdtraj | mdtraj/nmr/shift_wrappers.py | 2 | 12126 | ##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2014 Stanford University and the Authors
#
# Authors: Kyle A. Beauchamp
# Contributors: Robert McGibbon
#
# MDTraj i... | lgpl-2.1 |
mne-tools/mne-python | mne/cov.py | 4 | 79191 | # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Matti Hämäläinen <msh@nmr.mgh.harvard.edu>
# Denis A. Engemann <denis.engemann@gmail.com>
#
# License: BSD (3-clause)
from copy import deepcopy
from distutils.version import LooseVersion
import itertools as itt
from math import log
import ... | bsd-3-clause |
vigilv/scikit-learn | sklearn/__init__.py | 59 | 3038 | """
Machine learning module for Python
==================================
sklearn is a Python module integrating classical machine
learning algorithms in the tightly-knit world of scientific Python
packages (numpy, scipy, matplotlib).
It aims to provide simple and efficient solutions to learning problems
that are acc... | bsd-3-clause |
MaterialsDiscovery/PyChemia | setup.py | 1 | 6127 | import os
import json
import subprocess
from setuptools import setup, find_packages, Extension
from distutils.command.sdist import sdist as _sdist
import pathlib
try:
from Cython.Build import cythonize
from Cython.Distutils import build_ext
except ImportError:
USE_CYTHON = False
else:
USE_CYTHON = True... | mit |
Karel-van-de-Plassche/QLKNN-develop | qlknn/plots/comparison/topology.py | 1 | 2645 | from IPython import embed
import numpy as np
import scipy.stats as stats
import pandas as pd
import os
import sys
networks_path = os.path.abspath(os.path.join((os.path.abspath(__file__)), '../../networks'))
NNDB_path = os.path.abspath(os.path.join((os.path.abspath(__file__)), '../../NNDB'))
training_path = os.path.abs... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.