Loss function

Advertisements

In the previous article, we had talked about the concept of Neural Network and how to manipulate weights and biases to get more accurate results based largely on finding the Loss function.

This is done by using the tool for assessing the general variance of the data set from its mean, which is called sum-of-sqaures, which is a statistical measure of deviation from the mean in the data set, which is shown by the equation:

The sum of the variance between the predictive values ​​and the real value is what we call the term sum of squares error, and this is done by squaring the difference by measuring its absolute value.

Through this study we can find accurate formulas for weights and biases that avoid as much as possible the loss of a job that could create a problem in reaching correct results.

Advertisements

Loss Function

Advertisements

كنا قد تحدثنا في المقال السابق عن مفهوم

وكيفية التعامل مع الأوزان Neural Network

والتحيزات للحصول على نتائج أكثر دقة تعتمد

Loss function بشكل كبير على العثور على

التي تعرقل الحصول على تلك النتائج ومعالجتها

بالشكل الصحيح ويتم ذلك باستخدام أداة تقييم التباين

العام لمجموعة البيانات من وسطها والتي

والتي تعتبر مقياس إحصائي sum-of-sqaures تسمى

للانحراف عن المتوسط في مجموعة البيانات

: والموضوح بالمعادلة

فحاصل التباين بين القيم التنبؤية والقيمة الحقيقة هو ما نطلق عليه مصطلح خطأ مجموع المربعات ويتم ذلك بتربيع الفرق بقياس قيمته المطلقة . ومن خلال هذه الدراسة يمكننا إيجاد صيغ دقيقة للأوزان والتحيزات التي تجنبنا قدر الإمكان من فقدان وظيفة يمكن أن تخلق مشكلة في الوصول إلى نتائج صحيحة

Advertisements

What’s A Neural Network?

Advertisements

The general concept of the work of this system can be summarized by analogy with the work system of the brain, which depends for its content on a mathematical mechanism based on several inputs that determine the structure of the required results.

Accordingly, we can define the components of the Neural Network:

  • input layer x
  • Irregular hidden layers
  • output layer ŷ
  • Different equilibriums between classes w and b
  • Determine the sigmoid activation function of the hidden layers σ.

Often when calculating the number of Neural Network layers the input layer is ignored as shown in this two-layer Neural Network architecture diagram :

It is easy to create a Neural Network in Python:

Neural Network Training:

The value of ŷ for a simple two-layer Neural Network is derived by the following equation:

It is clear from the previous equation that the values ​​of the variables represented by the weights w and the biases b, after careful tuning of their values, determine the output of ŷ, which represents the output value, and this is known as the Neural Network training.

We can divide each iteration of the training process into the following stages:

• The stage of calculating the value of the outputs, defined as: feedforward

• The stage of updating the values ​​of w and b, defined as: backpropagation

This is what the sequential graph shows :

feedforward

The above graph shows that Feedforward is a simple calculus and accordingly the output of a two-layer Neural Network is :

By adding the basic task of Feedforward in the Python code in our previous case, assuming that the value of biases is zero, that is, it is equal to zero, we get:

However, we have to find a more accurate method for our predictions.. This method is provided by the Loss Function property that we will learn about in the next essay .

Advertisements

؟ Neural Network ما هو مفهوم

Advertisements

يمكن تلخيص المفهوم العام لعمل هذه المنظومة بتشبيهها بمنظومة عمل الدماغ التي تعتمد بمضمونها على آلية رياضية مبنية على عدة مدخلات تحدد هيكلية النتائج المطلوبة

Neural Network وبناءً على ذلك يمكننا تحديد مكونات

x طبقة الإدخال *

طبقات مخفية غير منتظمة * 

ŷ طبقة الإخراج *

b و w توازنات مختلفة بين بين الطبقات *

σ تحديد وظيفة التنشيط السينية للطبقات المخفية *

Neural Network في الغالب عند حساب عدد طبقات

يتم تجاهل طبقة الإدخال كما هو موضح في

Neural Network هذا الرسم البياني لبنية

: مؤلفة من طبقتين

Neural Network ويعتبر من السهل إنشاء

في لغة بايثون

: Neural Network تدريب

Neural Network لـ ŷ يتم استنتاج قيمة

: بسيطة من طبقتين بالمعادلة التالية

يتبين لنا من خلال المعادلة السابقة أن

b والتحيزات w قيم المتغيرات المتمثلة بالأوزان

بعد تحري الدقة في ضبط قيمها هي التي

التي تمثل قيمة المخرجات ŷ تحدد ناتج

Neural Network وهذا ما يُعرَف بتدريب

يمكننا تقسيم كل تكرار لعملية التدريب

: إلى المراحل التالية

ŷ مرحلة حساب قيمة المخرجات *

    feedforward : والمحددة باسم

    b و w مرحلة تحديث قيم *

    backpropagation : والمحددة باسم

    : وهذا ما يوضحه الرسم البياني المتسلسل

    Feedforward

    Feedforward يوضح الرسم البياني السابق أن

    هو عملية حسابية بسيطة للتفاضل والتكامل

    Neural Network وبناءً عليها يكون ناتج

    : مكونة من طبقتين هو

    Feedforward وبإضافة المهمة الأساسية لـ

    في كود بايثون في حالتنا السابقة مع افتراض

    أن قيمة التحيزات معدومة أي أنها

    : تساوي الصفر ينتج لدينا

    إلا أنه يتوجب علينا إيجاد طريقة

    .. أكثر دقة لتنبؤاتنا

    Loss Function هذه الطريقة توفرها لنا خاصية

    التي ستنعرف عليها في المقال القادم

    Advertisements

    Big Data Analytics Tools: Talend

    Ninth tool

    Advertisements

    A tool that makes data integration simplified and more effective, and it is free and open source of the ETL style, meaning that its function is to organize and coordinate raw, unstructured information and transform it into ready-made data for practical analysis. It has the ability to develop and manage its applications to the fullest extent, as it contains a central store of data with the ability to deal with metadata, making it the ideal tool for performing all analysis techniques with high efficiency and accuracy.

    Advertisements

    Talend : أدوات تحليل البيانات الضخمة

    الأداة التاسعة

    Advertisements

    أداة تجعل تكامل البيانات مبسطاً وأكثر فاعلية

    ETL وهي مجانية مفتوحة المصدر من نمط

    بمعنى أن وظيفتها تنظيم وتنسيق المعلومات الأولية

    غير المنظمة وتحويلها إلى بيانات مهيأة

    لإجراء عمليات التحليل العملي

    هذه العملية توفر للمستخدمين إمكانيات متعددة

    مثل تكامل بيانات المؤسسات والشركات

    بجودة عالية وخاصة الضخمة منها

    ما يوفر لها تطوير تطبيقاتها وإدارتها

    على أكمل وجه فاحتوائها على مخزن مركزي

    للبيانات مع إمكانية التعامل مع البيانات الوصفية

    يجعلها الأداة الأمثل للقيام بكافة تقنيات

    التحليل بكفاءة عالية ودقة متناهية

    Advertisements

    Big Data Analytics Tools : Apache Cassandra

    The eighth tool

    Advertisements

    It is a free and open source NoSQL database, and it is the ideal tool for analyzing big data with an expansive feature, which in turn works to avoid errors during the analysis process, thus obtaining accurate and more effective results.

    The main features of this tool are summarized in the following points:

    •  Its properties are somewhat similar to SQL, including the query language.

    •  Provides a wide display area, especially for writing operations.

    •  The ability to spread securely because it is not restricted to a central server.

    •  Easy system of data.

     • The ability to replicate patterns and the flexibility of modification and coordination.

    Advertisements

    Apache Cassandra : أدوات تحليل البيانات الضخمة  

    الأداة الثامنة

    Advertisements

    وهي عبارة عن قاعدة بيانات مفتوحة المصدر

    NoSQL ومجانية من نمط

    وهي الأداة الأمثل لتحليل البيانات الضخمة ذات الخاصية التوسعية والتي تعمل بدورها على تفادي حدوث خلل أثناء عملية التحليل وبالتالي الحصول على نتائج دقيقة وأكثر فاعلية

    : تتلخص أبرز ميزات هذه الأداة بالنقاط التالية

    بما فيها لغة الاستعلام SQL خصائصها تشبه إلى حد ما *

    توفر مساحة عرض واسعة ولاسيما لعمليات الكتابة *

    قابلية الانتشار الآمن نظراً لعدم تقييده بسيرفر مركزي *

    منظومة سهلة من البيانات *

    قابلية نسخ الأنماط المتماثلة ومرونة التعديل والتنسيق *

    Advertisements