添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
DataGenerator类仅作为生成样本数据集的实用程序而包括在内。 注意: x和y必须为等长数组。 from kneed import DataGenerator ,
kneed-master.zip
(42个子文件)
kneed-master.zip
kneed-master
MANIFEST.in 88B
codecov.yml 315B
.gitattributes 61B
.github
workflows
pythonpublish.yml 619B
notebooks
kneedle_algorithm.ipynb 71KB
decreasing_function_walkthrough.ipynb 40KB
walkthrough.ipynb 162KB
images
functions_args_summary.png 41KB
figure2.knee.raw.png 13KB
concave.png 12KB
ikneed.gif 11.36MB
bumpy_line.smoothed.png 22KB
online_vs_offline.png 22KB
decreasing.png 13KB
S_parameter.png 27KB
bumpy_line.smoothed.degree2.png 24KB
figure2.knee.png 25KB
convex.png 12KB
bumpy_line.png 22KB
kneed
data_generator.py 4KB
__init__.py 114B
knee_locator.py 16KB
version.py 22B
requirements.txt 31B
CONTRIBUTING.md 4KB
.travis.yml 298B
pytest.ini 89B
LICENSE 1KB
postBuild 58B
setup.cfg 64B
setup.py 2KB
README.md 4KB
docs
make.bat 795B
parameters.rst 7KB
conf.py 2KB
interactive.rst 506B
index.rst 884B
Makefile 634B
api.rst 651B
tests
requirements.txt 29B
test_sample.py 14KB
.gitignore 410B
# kneed Knee-point detection in Python [![Downloads](https://pepy.tech/badge/kneed)](https://pepy.tech/project/kneed) [![Downloads](https://pepy.tech/badge/kneed/week)](https://pepy.tech/project/kneed) ![Dependents](https://badgen.net/github/dependents-repo/arvkevi/kneed/?icon=github) [![Open in Streamlit](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://share.streamlit.io/arvkevi/ikneed/main/ikneed.py) [![Build Status](https://travis-ci.com/arvkevi/kneed.svg?branch=master)](https://travis-ci.com/arvkevi/kneed) [![codecov](https://codecov.io/gh/arvkevi/kneed/branch/master/graph/badge.svg)](https://codecov.io/gh/arvkevi/kneed) This repository is an attempt to implement the kneedle algorithm, published [here](https://www1.icsi.berkeley.edu/~barath/papers/kneedle-simplex11.pdf). Given a set of `x` and `y` values, `kneed` will return the knee point of the function. The knee point is the point of maximum curvature. ![](https://raw.githubusercontent.com/arvkevi/kneed/master/images/functions_args_summary.png) ## Table of contents - [Installation](#installation) - [Usage](#usage) - [Input Data](#input-data) - [Find Knee](#find-knee) - [Visualize](#visualize) - [Documentation](#documentation) - [Interactive](#interactive) - [Contributing](#contributing) - [Citation](#citation) ## Installation `kneed` has been tested with Python 3.5, 3.6, 3.7 and 3.8. **anaconda** ```bash $ conda install -c conda-forge kneed **pip** ```bash $ pip install kneed **Clone from GitHub** ```bash $ git clone https://github.com/arvkevi/kneed.git $ python setup.py install ## Usage These steps introduce how to use `kneed` by reproducing Figure 2 from the manuscript. ### Input Data The `DataGenerator` class is only included as a utility to generate sample datasets. > Note: `x` and `y` must be equal length arrays. ```python from kneed import DataGenerator, KneeLocator x, y = DataGenerator.figure2() print([round(i, 3) for i in x]) print([round(i, 3) for i in y]) [0.0, 0.111, 0.222, 0.333, 0.444, 0.556, 0.667, 0.778, 0.889, 1.0] [-5.0, 0.263, 1.897, 2.692, 3.163, 3.475, 3.696, 3.861, 3.989, 4.091] ### Find Knee The knee (or elbow) point is calculated simply by instantiating the `KneeLocator` class with `x`, `y` and the appropriate `curve` and `direction`. Here, `kneedle.knee` and/or `kneedle.elbow` store the point of maximum curvature. ```python kneedle = KneeLocator(x, y, S=1.0, curve="concave", direction="increasing") print(round(kneedle.knee, 3)) 0.222 print(round(kneedle.elbow, 3)) 0.222 The knee point returned is a value along the `x` axis. The `y` value at the knee can be identified: ```python print(round(kneedle.knee_y, 3)) 1.897 ### Visualize The `KneeLocator` class also has two plotting functions for quick visualizations. **Note that all (x, y) are transformed for the normalized plots** ```python # Normalized data, normalized knee, and normalized distance curve. kneedle.plot_knee_normalized() ![](https://raw.githubusercontent.com/arvkevi/kneed/master/images/figure2.knee.png) ```python # Raw data and knee. kneedle.plot_knee() ![](https://raw.githubusercontent.com/arvkevi/kneed/master/images/figure2.knee.raw.png) ## Documentation Documentation of the parameters and a full API reference can be found [here](https://kneed.readthedocs.io/). ## Interactive An interactive streamlit app was developed to help users explore the effect of tuning the parameters. There are two sites where you can test out kneed by copy-pasting your own data: 1. https://share.streamlit.io/arvkevi/ikneed/main/ikneed.py 2. https://ikneed.herokuapp.com/ You can also run your own version -- head over to the [source code for ikneed](https://github.com/arvkevi/ikneed). ![ikneed](images/ikneed.gif) ## Contributing Contributions are welcome, please refer to [CONTRIBUTING](https://github.com/arvkevi/kneed/blob/master/CONTRIBUTING.md) to learn more about how to contribute. ## Citation Finding a “Kneedle” in a Haystack: Detecting Knee Points in System Behavior Ville Satopa , Jeannie Albrecht† , David Irwin‡ , and Barath Raghavan§ †Williams College, Williamstown, MA ‡University of Massachusetts Amherst, Amherst, MA International Computer Science Institute, Berkeley, CA
共有 42 个文件 |  png:11个   |  py:7个   |  rst:4个   |  yml:3个   |  ipynb:3个   |  md:2个   |  txt:2个   |  bat:1个   |  gif:1个   |  license:1个   |  makefile:1个   |  ini:1个
你可能感兴趣的资源
Python版的A*寻路算法
Python2.x版的A*寻路算法,实现了基本的A*算法,可以显示寻路图,测试运行pathFinder.py,输入地图文件a_map.txt,起点7,0 终点7,9
python 源代码-可实现图像素描画
python 源代码-可实现图像素描画 python 源代码-可实现图像素描画 python 源代码-可实现图像素描画
遥感影像分类结果栅格转矢量(Python)
(1)资源内包括基于Arcpy以及GDAL的批量分类栅格图转shp矢量文件程序。 (2)程序可添加需要的类别值结果,其他的会删除。例如:分类结果影像为1:水,2:裸土,3:道路。选择1,2,则最后矢量结果只包含水以及裸土...
python模拟预测一下新型冠状病毒肺炎的数据
待在家里,没啥事,就用python模拟预测一下新冠病毒肺炎的数据吧。要声明的是本文纯属个人自娱自乐,不代表真实情况。 采用SIR模型,S代表易感者,I表示感染者,R表示恢复者。染病人群为传染源,通过一定几率把传染...
python求一组曲线或一条波的顶点
主要用pyhon技术实现求一条或多条曲线极大点或极小点,也可以是波峰波谷。均值线都可求出,利用求导实现。也可以展示多条曲线在一个坐标系中。
基于ArcGIS的Python脚本批量提取图层要素拐点坐标的方法.zip
基于ArcGIS的Python脚本批量提取图层要素拐点坐标的方法
Python实现平行坐标图的绘制(plotly)方式
以下关于平行坐标图的解释引自百度百科:为了克服传统的笛卡尔直角坐标系容易耗尽空间、 难以表达三维以上数据的问题, 平行坐标图将高维数据的各个变量用一系列相互平行的坐标轴表示, 变量值对应轴上位置。...
LemmInflect:一个用于英语词形和词形变化的python模块
LemmInflect ... 可以使用更简单的仅拐点系统。 LemmInflect的创建是为了解决该项目的某些缺点并添加功能,例如... 从spaCy lemmatizer的独立性 神经网络消除声带形态的歧义 字母拼写法消除拼写和多种单词形
python中Genarator函数用法分析
本文实例讲述了python中Genarator函数用法。分享给大家供大家参考。具体如下: Generator函数的定义与普通函数的定义没有什么区别,只是在函数体内使用yield生成数据项即可。Generator函数可以被for循环遍历,而且可以通过next()方法获得yield生成的数据项。 def func(n): for i in range(n): yield i for i in func(3): print i r=func(3) print r.next() print r.next() print r.next() print r.next() 运行结果如下:
下降曲线分析:适用于python的简单下降曲线分析脚本
下降曲线分析 ARPS下降曲线与以下各项的比较:fb Prphet,张量流RNN和张量流完整的CNN /波网类型架构 目前,我只是在研究单变量时间序列分析。 通过使用多口井作为输入,可以大大提高模型的预测能力。
cli-mathlib:使用Python练习CLI工具开发
一个用于基于和绘制多项式函数的CLI工具条件参数:“ coeff”-多项式系数的列表可选参数(标志): --roots“绘制根点” --min-max“绘制最小-最大点” --inflection“绘制拐点” --graph“具有给定系数的多项式函数...
Python for Data Analysis第二版的测试数据
Python for Data Analysis(利用Python进行数据分析)第二版书中用到的测试数据和笔记
ldapper:ldapper —用于完成实际工作的无忧Python LDAP ORM
要求ldapper要求: Python 3.6+ 拐点0.9.0版是最后一个支持Python 2的版本。用法from ldapper . connection import BaseConnectionfrom ldapper . ldapnode import LDAPNodefrom ldapper import fields# define a ...
Python库 | ruptures-1.1.5rc2-cp36-cp36m-win32.whl
python库,解压后可用。 资源全名:ruptures-1.1.5rc2-cp36-cp36m-win32.whl
Python-Crash-Course-por-Sigmoidal-
Sigmoidal的Python崩溃课程
inflection:Ruby on Rails的inflector到Python的移植
拐点 拐点是一个字符串转换库。 它对英语单词进行单数和复数处理,并将字符串从CamelCase转换为带下划线的字符串。 拐点是一个端口“到Python。 资源
拐点生成器:为拐点模式生成一个sqlite数据库
为拐点模式生成一个sqlite db。 使用说明 生成数据库 手册 从导出xlsx 提交以上更改 在CI中自动化 python ./scriptsxlsx2csv.py 'declensions & conjugations.xlsx' ./csvs --all ./scripts/Generate-...
离散点拐点查找
工控离散点拐点查找快速查找,准确度高,计算方便,使用简单
§5 函数的凸性与拐点
对于数学分析中的函数的凸性与拐点的描述和分析,用ppt表示出来,
图像轮廓拐点信息读取程序
使用OPENCV+VS2010写的图像识别演示程序,可以实现抓取图像的轮廓,并且能够抓取图像的轮廓拐点信息
ArcGIS自动编号脚本
通过编写Python脚本可实现ArcGIS自动编号脚本通过编写Python脚本可实现ArcGIS自动编号脚本
快速寻找曲线拐点可执行C代码
快速寻找曲线拐点可执行C代码
特定曲线拐点计算源代码,根据定义计算
在某个曲线上根据定义计算拐点,本处以电压电流伏安曲线为例,修改后可得其他曲线
kneedle-simplex11.pdf
Abstract—Computer systems often reach a point at which the relative cost to increase some tunable parameter is no longer worth the corresponding performance benefit. These “knees” typically represent beneficial points that system designers have long selected to best balance inherent trade-offs. While prior work largely uses ad hoc, system-specific approaches to detect knees, we present Kneedle, a general approach to online and offline knee detection that is applicable to a wide range of systems. We define a knee formally for continuous functions using the mathematical concept of curvature and compare our definition against alternatives. We then evaluate Kneedle’s accuracy against existing algorithms on both synthetic and real data sets, and