worst

利用dataset.columns为表格加表头

吃可爱长大的小学妹 提交于 2020-02-11 01:22:00
import pandas as pd import numpy as np dataset = pd . read_csv ( 'wdbc.csv' , header = None ) columns = [ 'mean radius' , 'mean texture' , 'mean perimeter' , 'mean area' , 'mean smoothness' , 'mean compactness' , 'mean concavity' , 'mean concave points' , 'mean symmetry' , 'mean fractal dimension' , 'radius error' , 'texture error' , 'perimeter error' , 'area error' , 'smoothness error' , 'compactness error' , 'concavity error' , 'concave points error' , 'symmetry error' , 'fractal dimension error' , 'worst radius' , 'worst texture' , 'worst perimeter' , 'worst area' , 'worst smoothness' ,

案例:逻辑回归Logistic Regression做乳腺癌预测

谁都会走 提交于 2019-12-23 00:30:15
使用逻辑回归算法解决乳腺癌检测问题,使用sk-learn自带的乳腺癌数据集 1 导入数据 from sklearn . datasets import load_breast_cancer cancer = load_breast_cancer ( ) X = cancer . data y = cancer . target print ( 'data shape:{0};positive:{1},negative:{2}' . format ( X . shape , y [ y == 1 ] . shape , y [ y == 0 ] . shape ) ) print ( '腺癌数据的前两行为:' ) print ( cancer . data [ 0 : 2 ] ) data shape:(569, 30);positive:(357,),negative:(212,) 腺癌数据的前两行为: [[ 1.79900000e+01 1.03800000e+01 1.22800000e+02 1.00100000e+03 1.18400000e-01 2.77600000e-01 3.00100000e-01 1.47100000e-01 2.41900000e-01 7.87100000e-02 1.09500000e+00 9.05300000e-01 8

build heap time complexity worst case vs upper bound / tight upper bound

匿名 (未验证) 提交于 2019-12-03 01:41:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: HERE it is said that the worst case time complexity of building a heap is O(nlogn) but upper bound is O(n). How is a upper bound different from worst case time complexity and when one makes more sense over other. And is tight upper bound any different ? 回答1: Building a heap (also called Heapify ) is always O(n), regardless of the input distribution or the branching factor of the heap ( binary, ternary heaps ...). You misread the provided link, it states: (emphasis is mine) Although the worst case complexity looks like O(nLogn),

AtCoder Regular Contest 094 D - Worst Case(数学思维)

匿名 (未验证) 提交于 2019-12-03 00:18:01
D - Worst Case Time limit Memory limit 700 Problem Statement 10 10 10 10 10 10 -th. score Q i A i B i A i B i -th in the second contest, find the maximum possible number of participants whose scores are smaller than Takahashi's. Constraints 1 ≤ Q ≤ 100 1 ≤ A i , B i ≤ 10 9 (1 ≤ i ≤ Q ) All values in input are integers. Input Input is given from Standard Input in the following format: Q A 1 B 1 : A Q B Q Output For each query, print the maximum possible number of participants whose scores are smaller than Takahashi's. Sample Input 1 Copy 8 1 4 10 5 3 3 4 11 8 9 22 40 8 36 314159265 358979323