<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Berke Bünyamin Süle on Medium]]></title>
        <description><![CDATA[Stories by Berke Bünyamin Süle on Medium]]></description>
        <link>https://medium.com/@berke.brk11?source=rss-12f7f41957a9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9Fn5V-EyumX2n_3o2gSg4Q.jpeg</url>
            <title>Stories by Berke Bünyamin Süle on Medium</title>
            <link>https://medium.com/@berke.brk11?source=rss-12f7f41957a9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 07:42:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@berke.brk11/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Web Assembly: Web Geliştirmenin Yeni Paradigması]]></title>
            <link>https://medium.com/@berke.brk11/web-assembly-web-geli%C5%9Ftirmenin-yeni-paradigmas%C4%B1-3d08772b6e92?source=rss-12f7f41957a9------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d08772b6e92</guid>
            <category><![CDATA[web]]></category>
            <category><![CDATA[website]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Berke Bünyamin Süle]]></dc:creator>
            <pubDate>Thu, 15 Feb 2024 12:12:54 GMT</pubDate>
            <atom:updated>2024-02-15T12:12:54.864Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Web Assembly: Web Geliştirmenin Yeni Paradigması</strong></p><p>Web Assembly (Web Assembly veya kısaca Wasm), web geliştirme dünyasında son yıllarda dikkat çeken bir teknoloji olmuştur. Geleneksel web uygulamalarının performansını artırmak, daha hızlı ve daha verimli uygulamalar oluşturmak için kullanılan bu yeni teknoloji, pek çok avantajı ve bazı dezavantajları da beraberinde getirmektedir. Web Assembly, web tarayıcılarında çalıştırılabilir hale getirilmek üzere tasarlanmış bir düşük seviyeli derleme hedefidir. Geleneksel olarak, web uygulamaları JavaScript gibi yüksek seviyeli dillerde yazılmıştır. Ancak, JavaScript’in performansı bazen yetersiz olabilir ve özellikle karmaşık uygulamalarda sorunlara neden olabilir. İşte bu noktada Web Assembly devreye girer.</p><p><strong>Web Assembly’nin İşleyişi:</strong></p><p>Web Assembly’nin temel çalışma prensibi, kaynak kodunun derlenmesi ve tarayıcıda doğrudan yürütülmesidir. Kaynak kod, genellikle C, C++, Rust gibi dillerde yazılır. Derleme sürecinde, kaynak kod Web Assembly diline çevrilir ve ikili bir formatta kodlanır. Bu ikili format, tarayıcı tarafından doğrudan yürütülebilir.</p><p>Web Assembly kodu, tarayıcı tarafından yürütülmek üzere indirildiğinde, tarayıcı tarafından bir sanal makine tarafından işlenir. Bu sanal makine, Web Assembly kodunu yerel makine koduna (native machine code) dönüştürerek, bilgisayar donanımı üzerinde doğrudan yürütülebilir hale getirir.</p><p>Bu işlem, tarayıcıların daha verimli bir şekilde kodu yürütmesini sağlar. Çünkü Web Assembly kodu, ikili bir formatta bulunduğu için, tarayıcının yorumlama sürecini atlar ve doğrudan işletilir. Bu, web uygulamalarının daha hızlı ve daha verimli çalışmasını sağlar.</p><p>Web Assembly’nin bir diğer önemli özelliği, dil bağımsızlığıdır. Yani, Web Assembly kodu farklı programlama dillerinde yazılmış olabilir. Bu, geliştiricilere daha geniş bir dil seçeneği sunar ve tercih ettikleri dili kullanmalarına olanak tanır.</p><p>Özetle, Web Assembly, web tarayıcılarında yüksek performanslı web uygulamaları oluşturmak için kullanılan bir teknolojidir. Kaynak kodun Web Assembly koduna derlenmesi ve tarayıcıda doğrudan çalıştırılması, bu teknolojinin temel işleyişini oluşturur. Bu sayede, daha verimli</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d08772b6e92" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Assembly: The New Paradigm in Web Development]]></title>
            <link>https://medium.com/@berke.brk11/web-assembly-the-new-paradigm-in-web-development-9e8aa234c01d?source=rss-12f7f41957a9------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e8aa234c01d</guid>
            <category><![CDATA[web]]></category>
            <category><![CDATA[website]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[web3]]></category>
            <dc:creator><![CDATA[Berke Bünyamin Süle]]></dc:creator>
            <pubDate>Thu, 15 Feb 2024 12:11:47 GMT</pubDate>
            <atom:updated>2024-02-15T12:11:47.974Z</atom:updated>
            <content:encoded><![CDATA[<p>Web Assembly: The New Paradigm in Web Development</p><p>Web Assembly (WebAssembly or Wasm for short) has emerged as a notable technology in the world of web development in recent years. This new technology, aimed at improving the performance of traditional web applications and creating faster and more efficient applications, brings with it many advantages and some disadvantages. Web Assembly is designed as a low-level compilation target to be executable in web browsers. Traditionally, web applications have been written in high-level languages like JavaScript. However, JavaScript’s performance can sometimes be inadequate, particularly in complex applications. This is where Web Assembly comes into play.</p><p>The fundamental principle of Web Assembly is the compilation of source code and its direct execution in the browser. Source code is typically written in languages such as C, C++, or Rust. During the compilation process, the source code is translated into Web Assembly language and encoded in a binary format. This binary format can be directly executed by the browser.</p><p>When Web Assembly code is downloaded to be executed by the browser, it is processed by a virtual machine within the browser. This virtual machine translates the Web Assembly code into native machine code, making it directly executable on the computer hardware. This process enables browsers to execute the code more efficiently. Because Web Assembly code is in a binary format, it bypasses the browser’s interpretation process and is executed directly. This leads to faster and more efficient operation of web applications.</p><p>Another important feature of Web Assembly is its language independence. This means that Web Assembly code can be written in different programming languages, providing developers with a wider range of language options and allowing them to use their preferred language.</p><p>In summary, Web Assembly is a technology used to create high-performance web applications in web browsers. The compilation of source code into Web Assembly code and its direct execution in the browser constitute the fundamental operation of this technology. This enables the development of more efficient and performant web applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e8aa234c01d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Jamstack: A Modern Approach to Web Development]]></title>
            <link>https://medium.com/@berke.brk11/understanding-jamstack-a-modern-approach-to-web-development-9f263d2d5b0c?source=rss-12f7f41957a9------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f263d2d5b0c</guid>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[jamstack]]></category>
            <category><![CDATA[website]]></category>
            <dc:creator><![CDATA[Berke Bünyamin Süle]]></dc:creator>
            <pubDate>Fri, 09 Feb 2024 17:32:37 GMT</pubDate>
            <atom:updated>2024-02-09T17:32:37.882Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is JAMstack:</strong></p><p>JAMstack is an architectural and development approach used in modern web development. This approach utilizes a combination of fundamental technologies such as JavaScript, APIs, and Markup (markup language) when building websites. JAMstack minimizes server-side processing, thereby enhancing website performance while ensuring security. Essentially, JAMstack pre-renders content using static files and distributes it through Content Delivery Networks (CDNs). This results in faster website loading times and reduces the attack surface.</p><p><strong>Why it’s Used:</strong></p><p><strong>1.Performance Boost:</strong></p><ul><li>Utilizing static files and integrating with CDNs enhances website speed. This improves user experience and can increase conversion rates.</li></ul><p><strong>2. Security:</strong></p><ul><li>By eliminating server-side processing, JAMstack reduces the attack surface, making websites more secure. Static files minimize security vulnerabilities, enhancing overall site security.</li></ul><p><strong>3.Scalability:</strong></p><ul><li>Static files and service calls make scaling websites easier. This ensures consistent performance even during periods of high traffic.</li></ul><p><strong>4.Cost Efficiency:</strong></p><ul><li>Reduced server-side processing leads to lower hosting costs. Hosting static files is generally cheaper and requires fewer resources.</li></ul><p><strong>Advantages of JAMstack:</strong></p><p><strong>1.Performance Boost:</strong></p><ul><li>Using static files and integrating with CDNs improves website speed.</li><li>Pre-rendering content reduces server-side processing, resulting in faster loading times.</li></ul><p><strong>2.Security:</strong></p><ul><li>Decreased server-side processing reduces security vulnerabilities.</li><li>Static files minimize security risks and reduce the attack surface.</li></ul><p><strong>3.Scalability:</strong></p><ul><li>Static files and service calls make it easier to scale websites.</li><li>Ensures consistent performance even during high traffic periods.</li></ul><p><strong>4.Cost Efficiency:</strong></p><ul><li>Reduced need for server-side processing leads to lower hosting costs.</li><li>Requires less infrastructure and maintenance costs.</li></ul><p><strong>Disadvantages of JAMstack:</strong></p><p><strong>1.Dynamic Content Management:</strong></p><ul><li>Fully static approach may make managing dynamic content challenging.</li><li>Not suitable for websites requiring dynamic content.</li></ul><p><strong>2.Complexity:</strong></p><ul><li>Managing and updating static files may introduce complexity.</li><li>Integration of multiple services or resources can complicate development and maintenance processes.</li></ul><p><strong>Current Status of JAMstack:</strong></p><p>The adoption of JAMstack is steadily increasing. Many developers and companies prefer JAMstack due to its emphasis on performance, security, and scalability. It’s particularly popular for websites with static content. However, it may not be suitable for websites requiring dynamic content or frequently changing content.</p><p><strong>Future Outlook for JAMstack:</strong></p><p>The future of JAMstack looks promising. The web development industry continues to embrace approaches that prioritize performance and security. However, due to the importance and complexity of dynamic content, it’s important to recognize that JAMstack may not be a one-size-fits-all solution for every type of website. In the coming years, increased adoption of JAMstack and the development of tools and services based on this architecture are expected.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f263d2d5b0c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jamstack’i Anlamak: Web Geliştirme İçin Modern Bir Yaklaşım]]></title>
            <link>https://medium.com/@berke.brk11/jamstacki-anlamak-web-geli%C5%9Ftirme-i%CC%87%C3%A7in-modern-bir-yakla%C5%9F%C4%B1m-2c05f9da5efe?source=rss-12f7f41957a9------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c05f9da5efe</guid>
            <category><![CDATA[jamstack]]></category>
            <category><![CDATA[internet]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Berke Bünyamin Süle]]></dc:creator>
            <pubDate>Tue, 06 Feb 2024 13:19:31 GMT</pubDate>
            <atom:updated>2024-02-06T13:19:31.492Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>JAMstack(Javascript,APIs,Markup)Nedir:</strong></p><p>JAMstack, modern web geliştirme için kullanılan bir mimari ve geliştirme yaklaşımıdır. Bu yaklaşım, web sitelerini oluştururken JavaScript, API’ler ve Markup (işaretleme dili) gibi temel teknolojilerin bir kombinasyonunu kullanır. JAMstack, sunucu tarafı işlemlerini minimumda tutarak, web sitelerinin performansını artırır ve aynı zamanda güvenliğini de sağlar. Temel olarak, JAMstack statik dosyaları kullanarak içeriği ön belleğe alır ve CDN’ler (İçerik Dağıtım Ağı) aracılığıyla dağıtır. Bu, web sitelerinin daha hızlı yüklenmesini sağlar ve saldırı yüzeyini azaltır.</p><p><strong>Neden Kullanılır:</strong></p><p>1. <strong>Performans Artışı</strong>: Statik dosyaların kullanılması ve CDN’lerin entegrasyonu, web sitelerinin hızını artırır. Bu da kullanıcı deneyimini iyileştirir ve dönüşüm oranlarını artırabilir.</p><p>2. <strong>Güvenlik</strong>: JAMstack , sunucu taraflı işlemleri ortadan kaldırarak saldırı yüzeyini azaltır. Statik dosyalar, güvenlik açıklarını en aza indirir ve sitenin daha güvenli olmasını sağlar.</p><p>3. <strong>Ölçeklenebilirlik</strong>: Statik dosyalar ve hizmet çağrıları, sitenin ölçeklenmesini kolaylaştırır. Yoğun trafik dönemlerinde bile sitenin performansını korur.</p><p>4. <strong>Maliyet Verimliliği</strong>: Sunucu taraflı işlemlerin azalması, barındırma maliyetlerini düşürür. Statik dosyaları barındırmak genellikle daha ucuzdur ve daha az kaynak gerektirir.</p><p><strong>JAMstack Avantajları:</strong></p><ol><li><strong>Performans Artışı:</strong></li></ol><ul><li>Statik dosyaların kullanılması ve CDN’lerin entegrasyonu, web sitelerinin hızını artırır.</li><li>İçeriğin önceden derlenmesi, sunucu tarafı işleminin azalmasını sağlar, bu da daha hızlı yükleme süreleriyle sonuçlanır.</li></ul><ol><li><strong>Güvenlik:</strong></li></ol><ul><li>Sunucu taraflı işlemlerin azalması, güvenlik açıklarını en aza indirir.</li><li>Statik dosyalar, güvenlik açıklarını azaltır ve saldırı yüzeyini azaltır.</li></ul><ol><li><strong>Ölçeklenebilirlik:</strong></li></ol><ul><li>Statik dosyalar ve hizmet çağrıları, sitenin ölçeklenmesini kolaylaştırır.</li><li>Yoğun trafik dönemlerinde bile sitenin performansını korur.</li></ul><ol><li><strong>Maliyet Verimliliği:</strong></li></ol><ul><li>Sunucu taraflı işleme ihtiyacı olmadığı için, barındırma maliyetleri genellikle daha düşüktür.</li><li>Daha az altyapı ve bakım maliyetleri gerektirir.</li></ul><p><strong>JAMstack Dezavantajları:</strong></p><ol><li><strong>Dinamik İçerik Yönetimi:</strong></li></ol><ul><li>Tamamen statik bir yaklaşım, dinamik içeriği yönetmeyi zorlaştırabilir.</li><li>Dinamik içerik gerektiren web siteleri için uygun olmayabilir.</li></ul><ol><li><strong>Karmaşıklık:</strong></li></ol><ul><li>Bazı projeler için, statik dosyaları yönetmek ve güncellemek ek karmaşıklık yaratabilir.</li><li>Birden fazla hizmetin veya kaynağın entegrasyonu, geliştirme ve bakım süreçlerini karmaşık hale getirebilir.</li></ul><p><strong>JAMstack’in Güncel Durumu:</strong></p><p>JAMstack’in kullanımı giderek artmaktadır. Özellikle performansı, güvenliği ve ölçeklenebilirliği sağlaması nedeniyle birçok geliştirici ve şirket JAMstack’i tercih etmektedir. Özellikle statik içeriğe sahip web siteleri için popüler bir seçenektir. Ancak, dinamik içerik gerektiren veya büyük ölçüde değişen içeriğe sahip olan siteler için uygun olmayabilir.</p><p><strong>JAMstack’in Gelecekteki Durumu:</strong></p><p>JAMstack’in geleceği parlaktır. Web geliştirme endüstrisi, performansı ve güvenliği ön planda tutan yaklaşımları benimsemeye devam edecektir. Ancak, dinamik içeriğin önemi ve kompleksliği nedeniyle, JAMstack’in tamamen her türlü web sitesi için uygun bir çözüm olmadığı unutulmamalıdır. İlerleyen zamanlarda, JAMstack’in daha fazla benimsenmesi ve bu mimariye dayalı araçların ve hizmetlerin gelişmesi beklenmektedir.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c05f9da5efe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Neural Networks: Understanding and Applications]]></title>
            <link>https://medium.com/@berke.brk11/neural-networks-understanding-and-applications-2454673ac790?source=rss-12f7f41957a9------2</link>
            <guid isPermaLink="false">https://medium.com/p/2454673ac790</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[tensorflow]]></category>
            <dc:creator><![CDATA[Berke Bünyamin Süle]]></dc:creator>
            <pubDate>Sat, 03 Feb 2024 18:33:08 GMT</pubDate>
            <atom:updated>2024-02-03T19:45:46.896Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kjlcSSwbC64P5hLbzRjyLw.png" /></figure><p><strong>Introduction:</strong> Neural networks are artificial intelligence models inspired by biological neural systems. These models can process input data, acquire learning capabilities, and perform various tasks. Neural networks are typically composed of units called neurons, organized in layers, including an input layer, one or more hidden layers, and an output layer.</p><p>Neural networks find applications in image and speech recognition, natural language processing, game AI, medical diagnostics, financial analysis, autonomous driving, and many other fields. Thanks to their learning abilities, they are effective in tasks such as pattern recognition, classification, and prediction from large datasets.</p><p><strong>Application Diagram: Price Prediction Application</strong></p><p>In this diagram, an example illustrates how a price prediction application can be implemented using a simple neural network. The application is framed as a regression problem to predict house prices.</p><ol><li><strong>Data Collection and Preparation:</strong></li></ol><ul><li>Collect a dataset containing house features and prices.</li><li>Split the data into training and testing sets.</li><li>Apply preprocessing steps, such as scaling.</li></ul><ol><li><strong>Neural Network Model Creation:</strong></li></ol><ul><li>Utilize TensorFlow to create a neural network model.</li><li>Design layers including an input layer, one or more hidden layers, and an output layer with a single neuron for regression.</li></ul><ol><li><strong>Compiling the Model:</strong></li></ol><ul><li>Compile the model, specifying loss function, optimizer, and evaluation metrics. Mean Squared Error (MSE) is often used for regression problems.</li></ul><ol><li><strong>Training the Model:</strong></li></ol><ul><li>Train the neural network model on the prepared dataset.</li><li>The model adjusts weights during training to minimize the error between predicted and actual prices.</li></ul><ol><li><strong>Model Evaluation:</strong></li></ol><ul><li>Assess the model’s performance on the test dataset using the chosen evaluation metric.</li></ul><ol><li><strong>Prediction:</strong></li></ol><ul><li>Use the trained model to predict prices for new houses based on provided features.</li></ul><p><strong>Python TensorFlow Code for Price Prediction Application:</strong></p><p>Below is a simplified Python code for a price prediction application using TensorFlow. Keep in mind that real-world applications could involve more complexity and additional features.</p><pre>import numpy as np<br>import tensorflow as tf<br>from sklearn.model_selection import train_test_split<br>from sklearn.preprocessing import StandardScaler<br>from sklearn.datasets import fetch_california_housing<br><br># Load the dataset<br>california_housing = fetch_california_housing()<br>X = california_housing.data<br>y = california_housing.target<br><br># Split the data into training and testing sets<br>X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)<br><br># Scale the data<br>scaler = StandardScaler()<br>X_train_scaled = scaler.fit_transform(X_train)<br>X_test_scaled = scaler.transform(X_test)<br><br># Create a neural network model<br>model = tf.keras.Sequential([<br>    tf.keras.layers.Dense(32, activation=&#39;relu&#39;, input_shape=(X_train.shape[1],)),<br>    tf.keras.layers.Dense(1)<br>])<br><br># Compile the model<br>model.compile(optimizer=&#39;adam&#39;, loss=&#39;mean_squared_error&#39;)<br><br># Train the model<br>model.fit(X_train_scaled, y_train, epochs=50, batch_size=32, validation_data=(X_test_scaled, y_test))<br><br># Evaluate the model&#39;s performance<br>loss = model.evaluate(X_test_scaled, y_test)<br>print(f&#39;Test Loss: {loss}&#39;)<br><br># Make price predictions for a new house<br>new_house_features = np.array([[0.3, 8.0, 4.0, 2.0, 800.0, 2.0, 38.0, -122.0]])  # Sample house features<br>new_house_features_scaled = scaler.transform(new_house_features)<br>predicted_price = model.predict(new_house_features_scaled)<br>print(f&#39;Predicted House Price: {predicted_price[0][0]}&#39;)</pre><p>In this application, house prices were predicted using neural networks. A similar approach can be employed in finance for market trend analysis, image classification for recognizing objects, natural language processing for understanding and generating text, and in medical diagnosis and imaging for detecting diseases and analyzing medical images.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2454673ac790" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gradient Descent with python application:]]></title>
            <link>https://medium.com/@berke.brk11/gradient-descent-with-python-application-4aae8c00d2b6?source=rss-12f7f41957a9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4aae8c00d2b6</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[gradient-descent]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Berke Bünyamin Süle]]></dc:creator>
            <pubDate>Sat, 27 Jan 2024 21:45:19 GMT</pubDate>
            <atom:updated>2024-01-27T21:45:19.531Z</atom:updated>
            <content:encoded><![CDATA[<p>Gradient descent is an optimization algorithm used to find the minimum of a function, commonly employed in training machine learning models. It starts at a specified initial point in the parameter space and seeks to reach the minimum by moving in the direction of steepest descent of the function. Essentially, it progresses towards the minimum by making iterative updates based on the gradient (slope) of the function.</p><ol><li>Determining the Initial Point: First, an initial point is chosen in the parameter space.</li><li>Gradient Computation: The gradient (slope) of the function is calculated at the chosen point. This involves taking derivatives with respect to each parameter of the function.</li><li>Update: The parameters are updated using the gradient multiplied by a learning rate. This ensures a step towards the direction of steepest descent of the function.</li><li>Iteration: Steps 2–3 are repeated until a certain number of iterations or a specific error threshold is reached.</li></ol><p>These steps are repeated until the function converges to a minimum. However, factors such as the choice of learning rate or the selection of an appropriate initial point can influence the convergence speed of the algorithm.</p><p>You can better grasp the topic by examining the following application.</p><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*UofSwsAE1WPLkpyhIaJxNw.png" /></figure><pre>import numpy as np<br>import matplotlib.pyplot as plt<br><br># Veri seti oluşturma<br>np.random.seed(42)<br>X = 2 * np.random.rand(100, 1)<br>y = 4 + 3 * X + np.random.randn(100, 1)<br><br># Model parametreleri<br>theta = np.random.randn(2, 1)<br><br># Hata fonksiyonu (MSE)<br>def compute_cost(X, y, theta):<br>    m = len(y)<br>    predictions = X.dot(theta)<br>    cost = np.sum((predictions - y) ** 2) / (2 * m)<br>    return cost<br><br># Gradyan inişi fonksiyonu<br>def gradient_descent(X, y, theta, learning_rate, iterations):<br>    m = len(y)<br>    cost_history = np.zeros(iterations)<br><br>    for i in range(iterations):<br>        predictions = X.dot(theta)<br>        errors = predictions - y<br>        gradient = X.T.dot(errors) / m<br>        theta = theta - learning_rate * gradient<br>        cost_history[i] = compute_cost(X, y, theta)<br><br>    return theta, cost_history<br><br># Bias terimi eklenmiş giriş verileri<br>X_b = np.c_[np.ones((100, 1)), X]<br><br># Gradyan inişi ile modeli eğitme<br>learning_rate = 0.01<br>iterations = 1000<br>theta, cost_history = gradient_descent(X_b, y, theta, learning_rate, iterations)<br><br># Eğitim sonrası model parametreleri<br>print(&quot;Eğitim sonrası theta:&quot;, theta)<br><br># Maliyetin zaman içindeki değişimi<br>plt.plot(cost_history)<br>plt.xlabel(&#39;İterasyon&#39;)<br>plt.ylabel(&#39;Maliyet&#39;)<br>plt.title(&#39;Gradyan İnişi - Maliyetin İterasyonla Değişimi&#39;)<br>plt.show()</pre><p>Explanation:</p><ol><li>Data set creation:</li></ol><pre>np.random.seed(42)<br>X = 2 * np.random.rand(100, 1)<br>y = 4 + 3 * X + np.random.randn(100, 1)</pre><ul><li>X: A column vector is created with random numbers between 0 and 2.</li><li>y: An effect is added to these X values to simulate a linear relationship (4 + 3X + error).</li></ul><p>2.Model Parameters:</p><pre>theta = np.random.randn(2, 1)</pre><p>Initializing the starting values for theta, which are the parameters of the model. These initial values will be updated using gradient descent.</p><p>3.Error Function (MSE — Mean Squared Error):</p><pre>def compute_cost(X, y, theta):<br>    # ...</pre><p>A function that calculates the Mean Squared Error (MSE). It measures the amount of error between the current parameters of the model and the actual values. You can refer to the cost function topic for MSE.</p><p>4.Gradient Descent Function:</p><pre>def gradient_descent(X, y, theta, learning_rate, iterations):<br>    # ...</pre><p>A function that applies the gradient descent algorithm. It updates the model parameters and calculates the cost at each iteration.</p><p>5.Input Data with Added Bias Term:</p><pre>X_b = np.c_[np.ones((100, 1)), X]</pre><p>Adding a bias term to the input data. This ensures a constant term during matrix multiplication.</p><p>6.Training the Model with Gradient Descent:</p><pre>theta, cost_history = gradient_descent(X_b, y, theta, learning_rate, iterations)</pre><p>Training the model using the gradient descent function. The updated parameters of the model and the cost at each iteration are recorded.</p><p>7.Post-Training Model Parameters and Cost Graph:</p><pre>print(&quot;Eğitim sonrası theta:&quot;, theta)<br><br>plt.plot(cost_history)<br>plt.xlabel(&#39;İterasyon&#39;)<br>plt.ylabel(&#39;Maliyet&#39;)<br>plt.title(&#39;Gradyan İnişi - Maliyetin İterasyonla Değişimi&#39;)<br>plt.show()</pre><p>After training, the model parameters are printed to the screen. A graph depicting the change in cost over time is drawn. This graph illustrates how well the gradient descent algorithm is performing.</p><p>This code updates the parameters of the model using gradient descent to solve a simple regression problem. It provides a foundational understanding for addressing more complex problems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4aae8c00d2b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gradyan İnişi (Gradient Descent) with python application:]]></title>
            <link>https://medium.com/@berke.brk11/gradyan-i%CC%87ni%C5%9Fi-gradient-descent-with-python-application-dcf037769764?source=rss-12f7f41957a9------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcf037769764</guid>
            <category><![CDATA[lineer-regresyon]]></category>
            <category><![CDATA[gradient-descent]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificalintelligence]]></category>
            <dc:creator><![CDATA[Berke Bünyamin Süle]]></dc:creator>
            <pubDate>Sun, 21 Jan 2024 18:12:05 GMT</pubDate>
            <atom:updated>2024-01-21T18:12:05.594Z</atom:updated>
            <content:encoded><![CDATA[<p>Gradyan inişi, bir fonksiyonun minimumunu bulmak için kullanılan bir optimizasyon algoritmasıdır. Bu genellikle makine öğrenimi modellerini eğitmek için kullanılır. Gradyan inişi, bir parametre uzayında başlangıç noktasından başlayarak, fonksiyonun eğiminin en dik olduğu yöne giderek minimuma ulaşmaya çalışır. Temel olarak, bir fonksiyonun eğimi (gradyanı) üzerinde iteratif güncellemeler yaparak minimuma doğru ilerler.</p><ol><li>Başlangıç Noktası Belirleme: İlk olarak, parametre uzayında bir başlangıç noktası belirlenir.</li><li>Gradyan Hesaplama: Belirlenen noktada fonksiyonun gradyanı (eğimi) hesaplanır. Bu, fonksiyonun her bir parametresine göre türev alınarak elde edilir.</li><li>Güncelleme: Gradyan ile çarpılan bir öğrenme oranı (learning rate) kullanılarak parametreler güncellenir. Bu, fonksiyonun eğiminin en dik olduğu yöne doğru bir adım atılmasını sağlar.</li><li>Yineleme: Belirli bir iterasyon sayısı veya belirli bir hata eşiği sağlanana kadar 2–3. adımlar tekrarlanır.</li></ol><p>Bu adımlar, fonksiyonun minimuma ulaşana kadar tekrar edilir. Ancak, yanlış bir öğrenme oranı seçimi veya başlangıç noktasının yanlış belirlenmesi gibi faktörler, algoritmanın yakınsama hızını etkileyebilir.</p><p>Aşağıdaki uygulamayı inceleyip konuyu daha iyi kavrayabilirsiniz.</p><p>çıktı:</p><figure><img alt="ÇIKTI" src="https://cdn-images-1.medium.com/max/724/1*UofSwsAE1WPLkpyhIaJxNw.png" /></figure><pre>import numpy as np<br>import matplotlib.pyplot as plt<br><br># Veri seti oluşturma<br>np.random.seed(42)<br>X = 2 * np.random.rand(100, 1)<br>y = 4 + 3 * X + np.random.randn(100, 1)<br><br># Model parametreleri<br>theta = np.random.randn(2, 1)<br><br># Hata fonksiyonu (MSE)<br>def compute_cost(X, y, theta):<br>    m = len(y)<br>    predictions = X.dot(theta)<br>    cost = np.sum((predictions - y) ** 2) / (2 * m)<br>    return cost<br><br># Gradyan inişi fonksiyonu<br>def gradient_descent(X, y, theta, learning_rate, iterations):<br>    m = len(y)<br>    cost_history = np.zeros(iterations)<br><br>    for i in range(iterations):<br>        predictions = X.dot(theta)<br>        errors = predictions - y<br>        gradient = X.T.dot(errors) / m<br>        theta = theta - learning_rate * gradient<br>        cost_history[i] = compute_cost(X, y, theta)<br><br>    return theta, cost_history<br><br># Bias terimi eklenmiş giriş verileri<br>X_b = np.c_[np.ones((100, 1)), X]<br><br># Gradyan inişi ile modeli eğitme<br>learning_rate = 0.01<br>iterations = 1000<br>theta, cost_history = gradient_descent(X_b, y, theta, learning_rate, iterations)<br><br># Eğitim sonrası model parametreleri<br>print(&quot;Eğitim sonrası theta:&quot;, theta)<br><br># Maliyetin zaman içindeki değişimi<br>plt.plot(cost_history)<br>plt.xlabel(&#39;İterasyon&#39;)<br>plt.ylabel(&#39;Maliyet&#39;)<br>plt.title(&#39;Gradyan İnişi - Maliyetin İterasyonla Değişimi&#39;)<br>plt.show()</pre><p>Açıklama:</p><ol><li>Veri seti oluşturma:</li></ol><pre>np.random.seed(42)<br>X = 2 * np.random.rand(100, 1)<br>y = 4 + 3 * X + np.random.randn(100, 1)</pre><ul><li>X: 0 ile 2 arasında rastgele sayılar içeren bir sütun vektörü oluşturuluyor.</li><li>y: Bu X değerlerine karşılık gelen lineer bir ilişkiyi simüle eden bir etki ekleniyor (4 + 3X + hata).</li></ul><p>2.Model Parametreleri:</p><pre>theta = np.random.randn(2, 1)</pre><p>Modelin parametreleri olan theta’nın başlangıç değerleri atanıyor. Bu başlangıç değerleri, gradyan inişi ile güncellenecek.</p><p>3.Hata Fonksiyonu (MSE):</p><pre>def compute_cost(X, y, theta):<br>    # ...</pre><p>Ortalama Kare Hatası (MSE) hesaplayan bir fonksiyon. Modelin mevcut parametreleri ile gerçek değerler arasındaki hata miktarını ölçer.MSE için cost function konusuna bakabilirsiniz.</p><p>4.Gradyan İnişi Fonksiyonu:</p><pre>def gradient_descent(X, y, theta, learning_rate, iterations):<br>    # ...</pre><p>Gradyan inişi algoritmasını uygulayan fonksiyon. Model parametrelerini günceller ve her iterasyonda maliyeti hesaplar.</p><p>5.Bias Terimi Eklenmiş Giriş Verileri:</p><pre>X_b = np.c_[np.ones((100, 1)), X]</pre><p>Giriş verilerine bir bias terimi ekleniyor. Bu, matris çarpımı sırasında sabit bir terimin olmasını sağlar.</p><p>6.Gradyan İnişi ile Modeli Eğitme:</p><pre>theta, cost_history = gradient_descent(X_b, y, theta, learning_rate, iterations)</pre><p>Gradyan inişi fonksiyonu kullanılarak model eğitiliyor. Modelin güncellenmiş parametreleri ve her iterasyondaki maliyet kaydediliyo</p><p>7.Eğitim Sonrası Model Parametreleri ve Maliyet Grafiği:</p><pre>print(&quot;Eğitim sonrası theta:&quot;, theta)<br><br>plt.plot(cost_history)<br>plt.xlabel(&#39;İterasyon&#39;)<br>plt.ylabel(&#39;Maliyet&#39;)<br>plt.title(&#39;Gradyan İnişi - Maliyetin İterasyonla Değişimi&#39;)<br>plt.show()</pre><ul><li>Eğitim sonrası model parametreleri ekrana yazdırılıyor.</li><li>Maliyetin zaman içindeki değişimini gösteren bir grafik çiziliyor. Bu grafik, gradyan inişi algoritmasının ne kadar iyi çalıştığını gösterir.</li></ul><p>Bu kod, basit bir regresyon problemini çözmek için gradyan inişini kullanarak modelin parametrelerini günceller. Bu, daha karmaşık problemleri çözmek için temel bir anlayış sağlar.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcf037769764" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>