Genetic Operators and MATLAB Code for Numerical Analysis
3.2 Genetic Operators
(1) Crossover Operator
The crossover operator randomly pairs individuals from the parent population for crossover operations, generating ( m ) offspring individuals to form the next generation. Two types of crossover are employed: single-point crossover and two-point crossover. Given two individuals for crossover ( P = {p_1, p_2, p_3, \dots, p_n} ) and ( Q = {q_1, q_2, q_3, \dots, q_n} ), a random crossover point ( b_1 ) is chosen from the range [1, n] for single-point crossover. The elements before ( b_1 ) in ( P ) are copied to offspring individual ( \text{new Individual1} ), while the remaining elements are copied from ( Q ). Similarly, a second offspring ( \text{new Individual2} ) is generated by swapping the roles of ( P ) and ( Q ). In two-point crossover, two random crossover points ( b_1 ) and ( b_2 ) are chosen, and the elements between ( b_1 ) and ( b_2 ) in ( P ) are copied to the offspring, with the remaining elements taken from ( Q ).
(2) Mutation Operator
After the crossover operation, two mutation operators are applied to the offspring individuals. The first is rotation mutation, where a random position ( \text{bit} ) is chosen, and with probability ( p_m1 ), the portion of the individual after ( \text{bit} ) is rotated. The second is position mutation, with a smaller probability ( p_m2 ), two integers ( \text{bit1} ) and ( \text{bit2} ) are randomly chosen from the range [1, n], and the corresponding parts of the individual are swapped.
(3) Selection Operator
The fitness of the mutated offspring individuals is evaluated using the lowest level line method. The parent and offspring individuals are ranked by their fitness in descending order, and the top ( m ) individuals are selected as the next generation's parents.
3.3 Termination Criteria
The steps in sections 3.2(1), 3.2(2), and 3.2(3) are repeated until the fitness of the best solution meets the required threshold or the pre-defined number of generations is reached. At this point, the optimal solution is output.
4. Case Study
To test the performance of the algorithm, two cases from literature [3] are solved. In Case 1, a large rectangle of size ( 15 \times 40 ) is divided into 25 smaller rectangles. Based on the lowest level line method, the corresponding coding sequence is ( \text{Opt} = {1, -9, 11, -15, 17, -24, -25, -10, -14, -22, -23, -2, -3, -5, 18, 7, -8, -12, 19, -20, 21, 6, 13, 4} ). The width is set at 40, and height considerations follow suit for the genetic algorithm implementation.
Matlab
0
2024-11-06
IEEG_Data_Analysis_with_Matlab_Code.zip
使用分散的数据点来插入头部图像的像素值。此函数使用GRIDDATA从头部图像上的散点插入像素值。参考图像可用于从10/20国际系统(脑电图电极位置)中交互式选择点位置。插值选项包括线性、三次和最近。输入是对应于每个选定位置的值。包括示例。
Matlab
0
2024-11-03
MATLAB Code for DEM Noise Analysis using 2D DFT
DFT的matlab源代码标题日期作者使用FFT测试DEM中的高频噪声2017年1月本·普林顿(purinton@uni-potsdam.de)代码迁移到PYTHON :) 注意:截至2020年5月,此分析已迁移到Python:如果要使用MATLAB TM,请继续下面的操作。使用2D DFT进行DEM噪声分析的Matlab代码。该MATLAB TM函数用于栅格化地形数据(DEM)的频谱分析,以分析高频,低波长噪声,如以下所示: Purinton,B.,and Bookhagen,B .:验证中部安第斯高原南部的数字高程模型(DEM)和地貌指标,《地球表面动力学》,2017年。)运行它在分析之前,用户必须下载并设置一些必需功能的路径: T. Perron的2DSpecTools软件包可用。有关此光谱分析程序的背景以及引起该分析的论文,请参见:Perron,JT,Kirchner,JW和Dietrich,WE:景观中特征空间尺度和非分形结构的光谱特征,地球物理研究杂志,113,2008年。 W.Schwangh
Matlab
0
2024-11-06
MATLAB Code for Cross Sectional Area Analysis from Time Series Data in Excel
This MATLAB code imports time-series data related to riverbank and water depth coordinates in XY format, sampled every 10 minutes. The code calculates the cross-sectional area for each water depth and writes the following data to an Excel file: Date/Time, Water Depth, and the cross-sectional area for each water depth.
Matlab
0
2024-11-06
Mexican Hat MATLAB Code-Inverse Correlation Analysis for Directional Tuning Dynamics
墨西哥帽子MATLAB代码
逆时相关分析
实现理想的定向调谐动力学(Kovacic等,2008)
Matlab
0
2024-11-04
MATLAB_Import_Excel_Code_RPD_PLoSOne_Resistor_Disruption_Distance_Analysis
MATLAB导入Excel代码 核机器测试脑网络与表型之间的关联
作者:亚历山大·詹森(MS),杰森·特雷格拉斯(Jason R Tregellas)博士,Brianne Sutton博士,邢福永博士,Debashis Ghosh博士
摘要:在过去的十年中,由于定量网络分析能够描述大脑网络的一般拓扑原理,因此在其功能上的应用已广受欢迎。然而,将标准统计分析技术应用于功能磁共振成像(fMRI)连接图时,会出现许多问题。通常,这些映射的摘要度量(例如全局效率和聚类系数)使图拓扑不断变化的结构从多个比例崩溃为一个比例。这可能会导致全脑时空模式信息的丢失,这在关联和预测分析中可能很重要。从电气工程领域来看,电阻扰动距离是对同一顶点集上的图之间相似度的量化,已显示该图可识别动态图的变化(例如来自fMRI的变化),而不会造成计算上的昂贵或导致损失信息。
这项工作提出了一种新颖的基于核的回归方案,该方案结合了阻力扰动距离,可以使用模拟和真实数据集更好地了解与fMRI的生物表型的关联。
真实数据集:COBRE随附手稿中使用的真实数据集来自卓越生物医学研究中心(COBRE)通过新墨西哥大学神经科学中心提供。
Matlab
0
2024-11-05
Hierarchical Density Order EmbeddingsSpearman的Matlab代码实现
这是在ICLR 2018中实现的模型,使用损失函数学习WordNet上概念的高斯表示。损失函数基于截断的发散,惩罚顺序违规,反映数据的层次结构。学习到的表示捕捉了数据的层次结构,取得了HyperLex任务中的最先进结果。
Matlab
14
2024-07-28
MATLAB Linear Curve Fitting Code for Pulse Feeding Analysis-E.coli Pulse/Division Project
This document provides data and code for analyzing and generating graphs related to the E. coli pulse/saturation project. The provided MATLAB and Python codes are designed for pulse feeding analysis and were written in MATLAB R2015b. If you use any of the data or code, please cite the following paper: Karthik Sekar, Roberto Rusconi, John T Sauls, Tobias Fuhrer, Elad Noor, Jen Nguyen, Vicente I Fernandez, Marieke F Buffing, Michael Berney, Suckjoon Jun, Roman Stocker, Uwe Sauer. Molecular Systems Biology, 2018; 14(11): e8623. Published on November 5, 2018. DOI: 10.15252/msb.20188623.
The repository is divided into the following sections:
Part 1 - Data and Analysis of Lag Time vs. Feeding FrequencyThis section contains all the OD data and code for the wild-type pulse experiments. The code generates the following graphs:- All OD vs. Time plots with linear threshold fitting.- Relationship between lag time, feeding rate, and linear growth rate.- Summary table for the total glucose needed for proliferation and feeding speed.
Part 2 - Flow Cytometry
Matlab
0
2024-11-06
Matlab AUC Code-CSE 847Homework 4Logistic Regression and Sparse Logistic Regression Analysis
问题 1:逻辑回归
实验结果表明,随着进入 Logistic 回归分类器 的样本数量增加,测试准确性也逐步提高。这是合理的,因为数据集中的模式在样本量增多时变得更加代表性。随着更多样本的引入,模型的泛化能力也变得更强。下图展示了模型的测试准确性与训练时使用的样本数之间的关系,随着样本数量的增加,测试准确性呈明显的上升趋势。
问题 2:稀疏Logistic回归
根据实验结果,理想的正则化参数为 0.1。当正则化参数过大时, AUC 值会降低,正则化参数为 0 或 1 时,模型的性能较差。当正则化参数为 1 时,模型的测试准确度恰好为 50%。这是因为测试数据包含了74个阳性样本和74个阴性样本,因此,模型始终预测为0时,正好能够正确分类一半的样本。下图显示了精度与 L1 正则化参数 的关系。实验还揭示了一个有趣的模式,数据集中的相关特征数量约为 15-20 个。
Matlab
0
2024-11-06