|
|
|
|
|
|
吴裕雄--天生自然 PYTHON数据分析:糖尿病视网膜病变数据分析(完整版)
摘要:# This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python # For example, here's sev...
阅读全文
吴裕雄--天生自然 PYTHON数据分析:糖尿病视网膜病变数据分析(续六)
摘要:from albumentations import * import time IMG_SIZE = (224,224) '''Use case from https://www.kaggle.com/alexanderliao/image-augmentation-demo-with-albumentation/''' def albaugment(aug0, img): ret...
阅读全文
吴裕雄--天生自然 PYTHON数据分析:糖尿病视网膜病变数据分析(续五)
摘要:from keras import layers from keras.models import Model import keras.backend as K K.clear_session() densenet = DenseNet121(weights=None,include_top=False,input_shape=(None,None,3)) GAP_layer = l...
阅读全文
吴裕雄--天生自然 PYTHON数据分析:糖尿病视网膜病变数据分析(续四)
摘要:dpi = 80 #inch path_jpg=f"F:\\kaggleDataSet\\diabeticRetinopathy\\resized_train_cropped\\18017_left.jpeg" # too many vessels? path_png=f"F:\\kaggleDataSet\\diabeticRetinopathy\\rescaled_train_896\\1...
阅读全文
吴裕雄--天生自然 PYTHON数据分析:糖尿病视网膜病变数据分析(续三)
摘要:%%time NUM_SAMP=10 fig = plt.figure(figsize=(25, 16)) for jj in range(5): for i, (idx, row) in enumerate(df_test.sample(NUM_SAMP,random_state=SEED+jj).iterrows()): ax = fig.add_subplot(5,...
阅读全文
吴裕雄--天生自然 PYTHON数据分析:糖尿病视网膜病变数据分析(续二)
摘要:def circle_crop(img, sigmaX=10): """ Create circular crop around image centre """ img = cv2.imread(img) img = crop_image_from_gray(img) img = cv2.cvtColor(img, ...
阅读全文
吴裕雄--天生自然 PYTHON数据分析:糖尿病视网膜病变数据分析(续一)
摘要:%%time fig = plt.figure(figsize=(25, 16)) for class_id in sorted(train_y.unique()): for i, (idx, row) in enumerate(df_train.loc[df_train['diagnosis'] == class_id].sample(5, random_state=SEED).ite...
阅读全文
吴裕雄--天生自然 PYTHON数据分析:糖尿病视网膜病变数据分析
摘要:# This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python # For example, here's seve...
阅读全文
吴裕雄--天生自然 R数据分析:2014年美国人时间使用调查(ATUS)饮食与健康模块文件分析
摘要:# libraries we'll need library(car) # for avplots library(tidyverse) # for general utility functions # read in our data bmi_data % filter(erbmi > 0) # remove rows where the reported BMI is les...
阅读全文
吴裕雄--天生自然 PYTHON数据分析:所有美国股票和etf的历史日价格和成交量分析
摘要:# This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python # For example, here's sev...
阅读全文
吴裕雄--天生自然 python数据分析:健康指标聚集分析(健康分析)
摘要:# This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python # For example, here's sev...
阅读全文
吴裕雄--天生自然 PYTHON数据分析:威斯康星乳腺癌(诊断)数据分析(续一)
摘要:drop_list1 = ['perimeter_mean','radius_mean','compactness_mean','concave points_mean','radius_se','perimeter_se','radius_worst','perimeter_worst','compactness_worst','concave points_worst','compactne...
阅读全文
吴裕雄--天生自然 PYTHON数据分析:威斯康星乳腺癌(诊断)数据分析
摘要:# This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python # For example, here's se...
阅读全文
吴裕雄--天生自然 python数据分析:葡萄酒分析
摘要:# import pandas import pandas as pd # creating a DataFrame pd.DataFrame({'Yes': [50, 31], 'No': [101, 2]}) # another example of creating a dataframe pd.DataFrame({'Bob': ['I liked it.', 'It was ...
阅读全文
吴裕雄--天生自然 python数据分析:加纳卫生设施数据分析
摘要:import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) # Any results you write to the current directory are saved as output. import matplotlib.py...
阅读全文
吴裕雄 python 机器学习——模型选择参数优化暴力搜索寻优GridSearchCV模型
摘要:import scipy from sklearn.datasets import load_digits from sklearn.metrics import classification_report from sklearn.linear_model import LogisticRegression from sklearn.model_selection import train_...
阅读全文
吴裕雄 python 机器学习——模型选择参数优化随机搜索寻优RandomizedSearchCV模型
摘要:import scipy from sklearn.datasets import load_digits from sklearn.metrics import classification_report from sklearn.linear_model import LogisticRegression from sklearn.model_selection import train_...
阅读全文
吴裕雄 python 机器学习——模型选择验证曲线validation_curve模型
摘要:import numpy as np import matplotlib.pyplot as plt from sklearn.svm import LinearSVC from sklearn.datasets import load_digits from sklearn.model_selection import validation_curve #模型选择验证曲线validatio...
阅读全文
吴裕雄 python 机器学习——模型选择学习曲线learning_curve模型
摘要:import numpy as np import matplotlib.pyplot as plt from sklearn.svm import LinearSVC from sklearn.datasets import load_digits from sklearn.model_selection import learning_curve #模型选择学习曲线learning_cu...
阅读全文
吴裕雄 python 机器学习——模型选择回归问题性能度量
摘要:from sklearn.metrics import mean_absolute_error,mean_squared_error #模型选择回归问题性能度量mean_absolute_error模型 def test_mean_absolute_error(): y_true=[1,1,1,1,1,2,2,2,0,0] y_pred=[0,0,0,1,1,1,0,0,0,0...
阅读全文
|
|