多层神经元感知器模型

Cosmos is an intriguing space to observe and analyse, it is the stronghold for any science we discovered to this point. Galaxies are the mines with immense data clusters just lying there to be explored in this infinite space. the above picture is the result of a 1 Million-second-long exposure of Hubble space telescope revealing the earliest galaxies named as Hubble Ultra Deep Field. Each star-like object in the photograph is actually an entire galaxy.

çosmos是一个有趣的空间来观察和分析,这是因为我们发现了这一点,任何科学的堡垒。 星系是具有巨大数据簇的地雷,它们正躺在该无限空间中进行探索。 上图是哈勃太空望远镜长时间曝光100万秒的结果,它揭示了最早的名为哈勃超深视场的星系。 照片中的每个恒星物体实际上都是一个完整的星系。

The first galaxy was observed by a Persian astronomer Abd al-Rahman over a 1,000 years ago, and it was first believed to be an unknown extended structure. which is now known as the Messier-31 or the infamous Andromeda Galaxy. From that point, these unknown structures are more frequently observed and recorded but it took over 9 centuries for the astronomers to manifest on an agreement that they were not simply any astronomical objects but are entire galaxies. As the discoveries of these galaxies increased astronomers observed the divergent morphologies. Then they started grouping the previously reported and the newly discovered galaxies according to the morphological characteristics which later formed a significant classification Scheme.

波斯天文学家阿卜杜勒·拉赫曼(Abd al-Rahman)于1000年前观测到了第一个星系,并首次认为它是未知的扩展结构。 现在称为Messier-31或臭名昭著的 仙女座星系 。 从那时起,人们更频繁地观察和记录这些未知的结构,但是花了9个多世纪的时间,天文学家才一致同意它们不是简单的天文物体,而是整个星系。 随着这些星系的发现增加,天文学家观察到了不同的形态。 然后他们开始根据形态特征对先前报告的星系和新发现的星系进行分组,随后形成了重要的分类方案。

现代进步 (Modern Advancements)

Astronomy in this contemporary age has massively evolved parallelly with computational advancement during the years. Sophisticated computational techniques like Machine Learning models are much more efficient now because of the substantially increased computers performance efficiency and the enormous data that we have now. Centuries ago, Classification tasks like these were done by hand with a massive group of people, evaluating the results by cross-validation and collective post-agreement.

这些年来,当今时代的天文学与计算的进步并行发展。 诸如机器学习模型之类的复杂计算技术现在已大大提高了效率,因为计算机性能效率已大大提高,而我们现在拥有的数据量也很大。 几个世纪前,此类分类任务是由一大批人手工完成的,通过交叉验证和集体后协议来评估结果。

为什么我选择处理此数据 (Why I chose to work on this Data)

I recently started working on theoretical Deep Learning concepts and wanted my first practical approach of Technically applying those concepts to a task, which is driven by passion, yet is still prominent and relatable to my core attempt of learning Neural Networks.

我最近开始研究理论上的深度学习概念,并希望我的第一个实际方法是将这些概念从技术上应用到任务中,这是由热情驱动的,但仍然与我学习神经网络的核心尝试紧密相关。

数据采集 (Data Collection)

The Galaxy Zoo project hosted diverse Sky-survey data Catalogues online for astronomers around the world who are allowed to access, study and analyse the data. For this Classification task, I grabbed the data with the features very well defining the classes. For feature description [METADATA].

银河动物园项目为世界各地的天文学家提供了各种在线的天空调查数据目录,这些天文学家被允许访问,研究和分析数据。 对于此分类任务,我获取了具有很好定义类的功能的数据。 有关功能描述[ METADATA ]。

分类架构 (The Classification Schema)

The Hubble’s Tuning fork is the most famous Classification Scheme, Edwin Hubble divided Galaxies into three main types to be simplified they are Elliptical, Spiral and Merger classes.

哈勃的音叉是最著名的分类方案,埃德温·哈勃将星系划分为三种主要类型,为简化起见,它们分别是椭圆,螺旋和合并类。

Elliptical galaxies have a smooth, spheroidal appearance with little internal structure. They are dominated by a spheroidal bulge and have no prominent thin disk. Spiral galaxies all show spiral arms. And the third class, Merger galaxies are Irregular looking often described as chaotic appearances, are most likely the remnants of a collision between two Galaxies as described in The Realm of Nebulae.

椭圆形星系具有光滑的球形外观,内部结构很少。 它们以球形凸起为主,没有明显的薄盘。 旋涡星系都显示旋臂。 第三类,合并星系看起来是不规则的,通常被描述为混乱的外观,很可能是两个星系之间碰撞的残余物,如《星云的境界》中所述

深入研究神经网络 (Diving Deep into the Neural Networks)

The astronomical data, reading the data from the flat file,

天文数据,从平面文件中读取数据,

The Dimensionality of the entire data in (Row, Column )-shape(667944, 13)

(Row,Column)- 形状的整个数据的维度(667944,13)

数据预处理 (Data Preprocessing)

The first column doesn’t have any effect on the final performance of this classification model because it is not at all correlational to the classes, OBIJD is a unique id used for a particular object of interest in the dataset, the RA ( Right Ascension ) and Dec ( Declination ) on the other hand are recorded absolute positions of these objects of interest, which are also unique to every datapoint so dropping the 3 columns would be better, aiming for better accuracy. we can do that using,

第一列对该分类模型的最终性能没有任何影响,因为它与类别完全不相关,OBIJD是用于数据集中特定感兴趣对象 RA( Right Ascension )的唯一ID另一方面,Dec和Dec( Declination )记录了这些感兴趣对象的绝对位置,这对于每个数据点也是唯一的,因此删除3列会更好,目的是提高准确性。 我们可以使用

data = data.drop([‘OBJID’,’RA’,’DEC’],axis=1)

lookout for Null values and NaNs,

查找Null值和NaN,

Since this is a classification task we need to check for Class Imbalance, In a dataset where we are performing a classification task even if its Binary, Class Imbalance can have a major effect in the training phase, and ultimately on the accuracy. To plot the value_counts for the three-class columns we can do that by the following code snippet.

由于这是分类任务,因此我们需要检查“ 类别不平衡” ,在执行分类任务的数据集中,即使其“二进制”,“类别不平衡”在训练阶段可能会产生重大影响,并最终影响准确性。 要绘制三类列的value_counts ,我们可以通过以下代码段来实现。

plt.figure(figsize=(10,7))plt.title('Count plot for Galaxy types ')countplt = data[['SPIRAL','ELLIPTICAL','UNCERTAIN']]sns.countplot(x="variable",hue='value', data=pd.melt(countplt))plt.xlabel('Classes')

Inferring from the plot, considering 1’s, there exists a class imbalance of the classes, but this is not a prominent difference to have any effect on the model's performance, considering that they are in a One-Hot Encoding format. It’s in my typical workflow with the classification tasks to check for an Imbalance, I believe it to be a good practise. ( Note, we only consider 1’s from the above plot since 1 determines the class for a set of features and is 0 for all the other classes with the same features )

从图上推断,考虑到1,存在类的类不平衡,但是考虑到它们采用单点编码格式,这对模型的性能没有任何显着差异。 在我典型的工作流中,您将使用分类任务来检查不平衡,我认为这是一个很好的实践。 ( 请注意,由于上图1决定了一组要素的类,而其他所有具有相同要素的类为0,因此我们仅考虑上图中的1)

归一化和train_test_split (Normalisation and train_test_split)

from sklearn.model_selection import train_test_splitfrom sklearn.preprocessing import MinMaxScalerX = data.drop(['SPIRAL','ELLIPTICAL','UNCERTAIN'],axis=1).valuesy = data[['SPIRAL','ELLIPTICAL','UNCERTAIN']].valuesX_train,X_test,y_train,y_test = train_test_split(X,y,test_size=0.2,random_state=101)scaler = MinMaxScaler()X_train = scaler.fit_transform(X_train)X_test = scaler.transform(X_test)

For any Machine Learning model to learn from the data its a conventional method to split the original data into Training Sets and Testing Sets, where the split percentages are 80% training set and 20% testing set. and the whole dataset at least should have 1,000 data points to avoid any overfitting and to simply increase the learning period of any model.

对于任何机器学习模型来说,从数据中学习都是一种传统方法,即将原始数据拆分为训练集和测试集,其中拆分百分比为80%训练集和20%测试集。 并且整个数据集至少应具有1,000个数据点,以避免任何过度拟合并仅增加任何模型的学习时间。

实例化神经网络并设置超参数 (Instantiating Neural Network and setting Hyper-parameters)

from tensorflow.keras.models import Sequentialfrom tensorflow.keras.layers import Dense

Sequential, in Keras, allows us to manufacture the Multilayered Perceptron model from scratch. We can add each layer with a unit number as a parameter for the Dense function where every unit number implies that many Densely connected neurons.

Keras中 ,Sequential允许我们从头开始制造多层Perceptron模型。 我们可以将具有单位编号的每一层添加为Dense函数的参数,其中每个单位编号表示许多密集连接的神经元。

model = Sequential()# Input Layermodel.add(Dense(10,activation='relu’))# Hidden Layermodel.add(Dense(5,activation='relu’))# Output Layermodel.add(Dense(3, activation = 'softmax'))model.compile(optimizer='adam',loss='categorical_crossentropy',metrics=['accuracy’])

Explanation,

说明,

The Arrangement of my Neural Network is 10–5–3, 10 input neurons since we have 10 feature columns, 3 output neurons because we have 3 output classes everything in between is arbitrarily selected, they are called as Hidden Layers.

我的神经网络的排列是10–5–3,因为我们有10个特征列,所以输入了10个输入神经元,因为我们有3个输出类别,因此任意选择了3个输出神经元,它们被称为“ 隐藏层”

Each Neuron/perceptron performs a complex calculation followed by an Activation function, In my case, I used the most common activation, ReLu ( Rectified Linear unit ) and for the last three output neurons, the Activation is Softmax, which returns the probability distributions of the three classes.

每个神经元/感知器都执行复杂的计算,然后执行激活函数 。在我的情况下,我使用了最常见的激活ReLu( 整流线性单位 ),对于最后三个输出神经元,激活为Softmax ,它返回的概率分布为这三个班。

Adam Optimizer is used to achieve an efficient Gradient decent i.e the optimal minimum of the bounded weights, and the conventional loss function used for a Multi-class Classification task is Categorical_crossentropy. Metrics for realtime evaluation will be accuracy for any classification task.

Adam Optimizer用于实现高效的梯度体面,即边界权重的最佳最小值 ,用于多类分类任务的常规损失函数为Categorical_crossentropy 。 实时评估的指标将是任何分类任务的准确性。

Following is the Theoretical Model Description for the above Sequential Setup.

以下是上述顺序设置的理论模型说明。

部署模型 (Deploying the Model)

start = time.perf_counter()model.fit(x=X_train,y=y_train,epochs=20)print('\nTIME ELAPSED {}Seconds'.format(time.perf_counter() - start))

Note, Time Elapsed will be different for different Computer configurations and it is completely optional to calculate the time-taken, I just did it because I was intrigued to find out how long it would take for all the epochs.

请注意,对于不同的计算机配置,“经过的时间”将有所不同,并且计算所花费的时间是完全可选的,我之所以这样做,是因为我很想知道所有纪元要花费多长时间。

每个时期的绘图精度 (Plotting Accuracy at each Epoch)

From this Accuracy plot, We can infer that after a certain epoch, i.e approximately from the 6th epoch, the accuracy remained constant for all the other epochs. ( A single Epoch means, 1 whole cycle through the entire Training Set )

从这个精度图,我们可以推断出某个时期之后,即大约从第6个时期开始,所有其他时期的精度保持不变。 (一个纪元意味着整个训练集的整个周期为1个)

Achieved Model Accuracy is 0.90, i.e 90%

达到的模型精度为0.90,即90%

分类报告 (Classification Report)

有改善吗? (Improvement?)

Sophisticatedly structured feature-data is paramount for any Machine Learning/Deep Learning model, more the number of defining features, more will be the anticipated performance. Feature Engineering is the most essential stage in any Data analysis task, but one cannot efficiently perform feature extraction without having any domain knowledge about the task/data that he/she’s handling, the leverage of knowing how to correlate the features does not exist. Well, This is Core Astronomical Data with the features which I cannot even begin to interpret, If I had an Astronomy background to study, organise and add more features then, it will be certain that this model can perform way better than what It did.

对于任何机器学习/深度学习模型而言,结构复杂的特征数据都是至关重要的,定义的特征数量越多,预期的性能就越高。 特征工程是任何数据分析任务中最重要的阶段,但是如果没有他/她正在处理的任务/数据的任何领域知识,就无法有效地执行特征提取,不存在知道如何关联特征的优势。 好吧,这是具有我什至无法开始解释的功能的核心天文学数据。如果我有天文学的背景来研究,组织和添加更多功能,那么可以肯定的是,该模型的性能将比其更好。

Interstellar
星际

We’ve always defined ourself by the ability to overcome the impossible.

我们始终以克服不可能的能力来定义自己。

For the Source Code visit my GitHub where I, Idealised this task along with the other Computational Astronomy concepts I worked on, I call it The Anecdote of Computational-Astronomy ~ GitHub

对于源代码,请访问我的GitHub,在这里我将该任务以及我工作的其他计算天文学概念理想化,我将其称为“计算天文学轶事” 〜GitHub

参考文献: (References :)

Edwin Powell Hubble, - The Realm of the Nebulae.

埃德温·鲍威尔·哈勃(Edwin Powell Hubble)- 星云的境界。

翻译自: https://medium.com/swlh/classifying-galaxies-using-multilayered-perceptron-model-6e1c8fe5b044

多层神经元感知器模型


http://www.taodudu.cc/news/show-4456096.html

相关文章:

  • COSMOS认证辅导,原材料生产到成品分销的各个环节预防和安全原则的约束
  • 科技爱好者周刊(第 159 期):游戏开发者的年薪
  • ubuntu18.04安装Cosmos Scaffold遇到的问题及解决方案
  • 2011动作科幻《美少女特工队》BD中英双字1024/1280高清 下载
  • 【移动安全高级篇】————1、Android沙盘原理与实现
  • 看看安卓开发者在APP推广路途中是如何被金山“恶霸”所“黑打”的!
  • Ubuntu有线网络无法连接—有线网络连接图标变为灰色,无法点击
  • 手机病毒“僵尸网络”进入高发期
  • N97mini用什么杀毒软件最好?机器容易中毒吗 我已经删了网秦
  • 网秦大战奇虎360?先看看双方实力对比
  • 网秦手机杀毒软件 v2.1 symbian uiq 是什么
  • 计算机三级网络题,计算机三级网络试题及答案解析
  • 网秦手机杀毒软件 v2.1 symbian s60 _symbian 7.0+ 免费
  • 20款国内外免费使用 主流杀毒软件
  • 通过python实现乘法口诀
  • 经典乘法口诀表(C++)
  • python乘法口诀倒序_利用Python的For控制流输出乘法口诀
  • 乘法口诀数列
  • c语言乘法口诀金字塔,Scala编写的打印乘法口诀和金字塔
  • java在屏幕上打印出乘法口诀,Java打印乘法口诀
  • python九九乘法口诀_Python打印出九九乘法口诀
  • 乘法口诀.
  • 矩阵的乘法口诀(一)
  • 【C语言】 输出乘法口诀表
  • 【Leetcode】1137. 第 N 个泰波那契数
  • 剑指offer面试题之求第n个丑数
  • 写一个函数,输入n,求斐波那契数列的第n项。
  • 回溯法之n皇后问题
  • 求斐波那契数列的第n项
  • 现要求输入一个整数n,请输出斐波那契数列的第n项

多层神经元感知器模型_使用多层感知器模型对星系进行分类相关推荐

  1. seq2seq模型_对话生成:seq2seq模型原理及优化

    更多干货内容敬请关注「平安寿险PAI」(公众号ID:PAL-AI),文末有本期分享内容资料获取方式. 人机对话作为人机交互系统的核心功能之一,发挥着十分重要的作用.目前,生成式的人机对话存在内容把控性 ...

  2. lr模型和dnn模型_建立ML或DNN模型的技巧

    lr模型和dnn模型 机器学习 (Machine Learning) Everyone can fit data into any model machine learning or deep lea ...

  3. 结构方程模型_简单易懂,结构方程模型思路总结

    结构方程模型是结合了多种统计分析方法,可同时检验因子.分析项.误差项间的关系.本文将基于SPSSAU系统进行说明. 1.方法辨别 结构方程模型SEM包括测量关系和影响关系:既可以测量各因素内部结构及相 ...

  4. 网页怎么预先加载模型_使用预先训练的模型进行转移学习

    网页怎么预先加载模型 深度学习 (Deep Learning) 什么是转学? (What is Transfer Learning?) Transfer learning is a research ...

  5. 全面理解java内存模型_深入理解Java内存模型(八)——总结

    处理器内存模型 顺序一致性内存模型是一个理论参考模型,JVM和处理器内存模型在设计时通常会把顺序一致性内存模型作为参照.JVM和处理器内存模型在设计时会对顺序一致性模型做一些放松,因为如果完全按照顺序 ...

  6. 怎么做 空间杜宾模型_面板数据空间杜宾模型

    4.3.1 模型及估计 (1) 无固定效应模型 当SAR和SEM模型在一定的显著性水平下同时成立时,我们需要进一步考虑面板数据空间杜宾模型,即解释变量的空间滞后项影响被解释变量时,就应该考虑建立空间杜 ...

  7. mesh 协调器 路由器_双模网络协调器、双模路由器、双模mesh组网系统及其方法与流程...

    本发明涉及mesh组网领域,特别涉及双模网络协调器.双模路由器.双模mesh组网系统及其方法. 背景技术: 无线mesh是一种非常适合于覆盖大面积开放区城(包括室外和室内)的无线区域网络解决方案.无线 ...

  8. python knn模型_使用Python训练KNN模型并进行分类

    K临近分类算法是数据挖掘中较为简单的一种分类方法,通过计算不同数据点间的距离对数据进行分类,并对新的数据进行分类预测.我们在之前的文章<K邻近(KNN)分类和预测算法的原理及实现>和< ...

  9. fluent p1模型_干货 | ANSYS Fluent燃烧模型简介

    燃烧是一种相当复杂的化学反应,通常还伴随着流体流动.离散相颗粒扩散.传热.污染物产生等多种物理情况.为尽可能详细仿真多种化学反应,ANSYS Fluent提供了多种化学反应模型如EDC,EDM,PDF ...

最新文章

  1. 日本光伏相关企业倒闭数量上升 帝国征信调查
  2. PL/SQL12中文版
  3. [Windows编程] 获取系统CPU 个数
  4. 阿里开源那个牛哄哄问题排查工具竟然不会用?最佳实践来了!
  5. 【Spring Boot】【Thymeleaf】The SpringStandard Dialect
  6. java类内部的变量
  7. 我的第一款 Drone 插件
  8. ultraedit 运行的是试用模式_单元测试 —— 前后端分离开发模式下后端质量的保证...
  9. centos7安装samba文件服务器,Centos7.7部署文件共享服务Samba
  10. testufo测试刷新率测试_【中立观点】黑鲨3测试体验报告
  11. 电子政务互联互通软件平台的体系架构
  12. 使用matlab建立机器人雅克比矩阵
  13. 2课:单片机引脚介绍
  14. 2022全球程序员薪资排行:中国倒数,美国写Go最挣钱
  15. 微信公众平台开发(2)--微信认证流程图文详解
  16. return返回值返回到哪里
  17. uniapp 微信语音播放功能(整理)
  18. 用java编写围棋游戏
  19. css 实现 图片旋转
  20. Android仿淘宝购物车

热门文章

  1. 汉诺塔 = 套娃 ?
  2. 【githubshare】KCon 黑客大会演讲 macOS Big Sur 内核漏洞挖掘、云虚拟化安全、服务器硬件可信与安全实践
  3. 安卓逆向:重温Thumb汇编指令细节
  4. python日历函数_Python—日历函数—日历模块的常用函数,calendar,常见
  5. MobileNet相关知识整理
  6. Office 2016 定制安装工具 v1.0 | Office 2016 自定义安装组件
  7. SSM整合-异常处理器及项目异常处理方案
  8. 计算机资源管理器不显示桌面图标,Win7 64位系统启动后,如何解决桌面不显示图标和任务栏的问题...
  9. 1032 挖掘机技术哪家强 (20分) 测试点4
  10. 微生物 Alpha多样性 作图 16S 菌群 R语言