上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 24 下一页
摘要: 5折交叉验证,测试10次,取平均值: 1 import random 2 3 4 def read(path: str) -> tuple: 5 with open(path, "r") as f: 6 text = f.readlines() 7 M = [] 8 for row in text: 阅读全文
posted @ 2021-05-10 16:46 墨鳌 阅读(61) 评论(0) 推荐(0) 编辑
摘要: Python 信息熵-条件熵计算 1 import csv 2 import numpy as np 3 4 5 def read(path: str) -> tuple: 6 with open(path, 'r') as f: 7 text = csv.reader(f) 8 A = [] 9 阅读全文
posted @ 2021-05-10 15:28 墨鳌 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 也就两个部分: Node: 1 package models.BST; 2 3 public class BSTNode<E extends Comparable<E>> { 4 E data; 5 BSTNode<E> leftChild, rightChild; 6 7 public BSTNo 阅读全文
posted @ 2021-05-07 00:22 墨鳌 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 1 package model.API; 2 3 4 import java.util.Iterator; 5 import java.util.NoSuchElementException; 6 7 public class bag<E> implements Cloneable, Iterabl 阅读全文
posted @ 2021-04-02 16:36 墨鳌 阅读(479) 评论(0) 推荐(0) 编辑
摘要: 主要的难点在于: 1. 泛型的使用 2. 内存的动态开辟 3. 深度拷贝与浅拷贝的区别(line 30) 1 package xxx.xxxxxxx; 2 3 import java.util.EmptyStackException; 4 5 public class ArrayStack<E> i 阅读全文
posted @ 2021-03-29 15:40 墨鳌 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 需要一些数学推导 Lambda的确定不太清楚,0.001是试出来的 当函数发生变化时,或者拟合函数最高系数变化时,Lambda的取值都应当相应变化 1 import numpy as np 2 import matplotlib.pyplot as plt 3 4 plt.rcParams['fon 阅读全文
posted @ 2021-03-25 16:02 墨鳌 阅读(284) 评论(0) 推荐(0) 编辑
摘要: python 统计频率 1 import csv 2 import numpy as np 3 4 5 # the method for parse data into a matrix 6 def input_data_to_matrix(): 7 csv_file = open('binary_ 阅读全文
posted @ 2021-03-22 17:26 墨鳌 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 需要补充知识: 最小二乘法——非线性拟合推导 1 import numpy as np 2 import matplotlib.pyplot as plt 3 4 5 plt.rcParams['font.sans-serif'] = ['SimHei'] 6 plt.rcParams['axes. 阅读全文
posted @ 2021-03-21 19:26 墨鳌 阅读(849) 评论(0) 推荐(0) 编辑
摘要: 1 def remove_odd_elements(mylist:list): 2 return [element for element in mylist if(element//2*2==element)] 3 4 # a=[12,15,3,10] 5 # print(remove_odd_e 阅读全文
posted @ 2021-03-15 18:05 墨鳌 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 1 import cv2 as cv 2 3 4 def catch_face_video(img): 5 gray=cv.cvtColor(img,cv.COLOR_BGR2GRAY) 6 path_haar='C:/Users/77007/Desktop/python/pythonProject 阅读全文
posted @ 2021-03-13 15:33 墨鳌 阅读(117) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 24 下一页