<?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[KoçDigital - Medium]]></title>
        <description><![CDATA[KoçDigital’s IoT and Analytics Stories… - Medium]]></description>
        <link>https://medium.com/kocdigital?source=rss----cac33c9f0c6c---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>KoçDigital - Medium</title>
            <link>https://medium.com/kocdigital?source=rss----cac33c9f0c6c---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 07:45:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/kocdigital" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[From HR Data to Early Warning: Building an Explainable Employee Churn Prediction System at…]]></title>
            <link>https://medium.com/kocdigital/from-hr-data-to-early-warning-building-an-explainable-employee-churn-prediction-system-at-0b82f8973125?source=rss----cac33c9f0c6c---4</link>
            <guid isPermaLink="false">https://medium.com/p/0b82f8973125</guid>
            <category><![CDATA[employee-retention]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[hr]]></category>
            <category><![CDATA[predictive-analytics]]></category>
            <dc:creator><![CDATA[İlkim Sevinç]]></dc:creator>
            <pubDate>Mon, 07 Sep 2026 12:39:37 GMT</pubDate>
            <atom:updated>2026-09-07T12:39:35.884Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>From HR Data to Early Warning: Building an Explainable Employee Churn Prediction System at Enterprise Scale</strong></h3><h3><strong>How enterprise data engineering, LightGBM, and explainable AI came together to turn HR records into a practical early-warning system</strong></h3><p>Employee turnover rarely happens overnight.</p><p>More often, it is the result of signals that build up gradually: long periods in the same role, limited career movement, repeated managerial changes, or a growing disconnect from the surrounding team. On their own, these signals may not say much. But when they are combined across time, they can start to reveal patterns that are difficult to see in traditional HR reports.</p><p>That is where machine learning can become useful — not as a replacement for human judgment, but as a way to help HR teams notice risk earlier and ask better questions.</p><p>In this project, we developed an explainable employee churn prediction framework for six companies operating under the same corporate group. Although the companies shared a broader governance structure, they differed significantly in industry, workforce composition, HR processes, data quality, and turnover dynamics.</p><p>The goal was not simply to build a model that classified employees as “leaving” or “staying.”</p><p>The goal was to create an operational early-warning system that could:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*CU-auQiCew7GQ9IWSAj0dA.png" /></figure><p>The resulting framework combined enterprise data engineering, company-specific LightGBM models, time-based validation, SHAP explainability, and an automated production pipeline.</p><h3><strong>Why Churn Prediction Is Harder Than It Looks</strong></h3><p>Employee churn is a naturally imbalanced problem.</p><p>Within any three-month period, most employees stay. Only a relatively small share leave. This means a model can appear accurate simply by predicting “no churn” for almost everyone — while still failing to identify the people HR teams most need to understand.</p><p>Enterprise HR data introduces further complications.</p><p>Different companies may use different HR systems, populate fields inconsistently, apply different organizational structures, or interpret seemingly similar variables in different ways. Even within the same company, schemas and business processes may change over time.</p><p>A successful enterprise churn model must therefore solve more than a classification problem. It must also address:</p><ul><li>Incomplete and inconsistent data</li><li>Temporal relationships between employee records</li><li>Differences between organizations</li><li>Potential leakage from post-departure HR processes</li><li>Highly imbalanced target classes</li><li>The need for interpretable predictions</li><li>Integration with existing enterprise systems</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*c-A6sDfuPOWb9QFNCKfotg.png" /></figure><p>In other words, the success of a churn prediction system depends as much on data engineering, governance, and validation design as it does on the machine learning algorithm.</p><h3><strong>Building the Data Foundation</strong></h3><p>The analysis was based on approximately four years of monthly workforce snapshots.</p><p>Each snapshot represented the state of an employee at the end of a particular month. It included the information available at that point in time, such as:</p><ul><li>Current position and department</li><li>Company and internal seniority</li><li>Career progression history</li><li>Managerial relationships</li><li>Organizational hierarchy</li><li>Selected behavioral and workforce-planning indicators</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*SBcs_e5LOKrp2w2EkahRNA.png" /></figure><p>This monthly snapshot structure was critical. Instead of treating each employee as a static record, it allowed the model to observe how an employee’s organizational situation changed over time.</p><p>This was essential because churn is a temporal event. The relevant question is not only:</p><p><em>“Did this employee leave?”</em></p><p>It is:</p><p><em>“Based on the information available at this moment, will this employee leave within the next three months?”</em></p><h3><strong>A Layered HR Datamart</strong></h3><p>To create a reliable modeling dataset, data from multiple enterprise HR systems was consolidated into a centralized datamart.</p><p>The architecture followed a layered design:</p><ol><li><strong>Staging layer:</strong> Raw data extracted from operational systems with minimal modification</li><li><strong>Transformation layer:</strong> Cleaned, standardized, and integrated data</li><li><strong>Analytical layer:</strong> Final employee snapshots and features used by the machine learning pipeline</li></ol><p>This separation improved data lineage, maintainability, and traceability. It also allowed modeling logic to remain independent from the structures of individual source systems.</p><h3><strong>Keeping Invalid Records Visible</strong></h3><p>One of the most important preprocessing mechanisms was an <strong>Out-of-Model filtering process</strong>.</p><p>Some records contained structural problems that could not be safely resolved through simple imputation. Examples included:</p><ul><li>Missing internal seniority</li><li>Invalid relationships between hiring and snapshot dates</li><li>Inconsistent employment timelines</li><li>Missing or malformed current-position information</li><li>Organizational hierarchy conflicts</li></ul><p>Instead of silently correcting or deleting these observations, the pipeline moved them into a dedicated exclusion layer.</p><p>This served two purposes.</p><p>First, it prevented invalid records from affecting target generation and model training.</p><p>Second, it preserved traceability. HR and data teams could inspect excluded records separately and identify recurring upstream data-quality problems.</p><p>This distinction matters. In enterprise machine learning, removing a record from modeling should not mean losing visibility into why it was removed.</p><h3><strong>Turning HR Records Into Predictive Signals</strong></h3><p>Most operational HR systems are built for payroll, organizational management, reporting, and administrative workflows. Their variables are not created for prediction by default.</p><p>For that reason, feature engineering became one of the most important parts of the project.</p><p>Early experiments focused primarily on individual employee attributes such as tenure, job grade, department, and demographic variables. These features provided some predictive signal, but they did not sufficiently capture the organizational context surrounding employee turnover.</p><p>The key improvement came from expanding the dataset beyond the individual employee.</p><h3><strong>Career Progression Features</strong></h3><p>Career-related variables were created to describe how an employee’s position within the organization evolved over time.</p><p>Examples included:</p><ul><li>Total time within the company</li><li>Internal seniority</li><li>Time spent in the current position</li><li>Time spent in the current department</li><li>Time spent at the current grade level</li><li>Indicators of career stability or stagnation</li></ul><p>These variables helped represent whether an employee was progressing, remaining stable, or spending unusually long periods in the same organizational position.</p><h3><strong>Managerial Context Features</strong></h3><p>Employee behavior does not exist independently from leadership and team structure.</p><p>To incorporate managerial context, employee snapshots were enriched with information about the employee’s current manager, such as:</p><ul><li>Manager tenure within the company</li><li>Manager’s time in the current department</li><li>Manager’s time at the current grade</li><li>Managerial career history</li><li>Stability of the employee–manager relationship</li></ul><p>This allowed the model to identify patterns that individual-level attributes alone could not reveal.</p><p>For example, an employee’s tenure might not be particularly informative by itself. However, the proportion of that tenure spent under the same manager may indicate a very different organizational experience.</p><h3><strong>Relative and Ratio-Based Features</strong></h3><p>We also created variables that compared employee characteristics with managerial and organizational values.</p><p>Examples included:</p><ul><li>The proportion of employee tenure spent with the current manager</li><li>Internal seniority relative to total career length</li><li>Employee tenure relative to manager tenure</li><li>Position duration relative to team or organizational norms</li></ul><p>These relative measures often carried more meaning than absolute values.</p><p>Five years in the same role may be normal in one organizational context but may signal career stagnation in another. Ratio-based features allow the model to interpret employee characteristics within their surrounding hierarchy.</p><p>One of the clearest lessons from this stage was:</p><p><em>Employee churn cannot be fully understood through employee attributes alone. Managerial relationships and organizational context matter.</em></p><h3><strong>Framing Churn as a Three-Month Prediction Problem</strong></h3><p>The target variable was designed to support early intervention.</p><p>For every monthly employee snapshot, the system checked whether the employee left the company during the following 90 days.</p><p>The target was defined as:</p><ul><li><strong>1:</strong> The employee leaves within the next three months</li><li><strong>0:</strong> The employee remains beyond the three-month prediction horizon</li></ul><p>This produced a forward-looking target rather than a historical label.</p><p>An employee could therefore appear in multiple monthly snapshots, with each snapshot representing a new prediction point. The model learned from the conditions observed before departure rather than from a single final employee record.</p><p>The three-month horizon was chosen as a practical balance: close enough to support near-term HR planning, but still early enough to leave room for a potential retention action.</p><h3><strong>Avoiding the Trap of Data Leakage</strong></h3><p>Data leakage is one of the greatest risks in employee churn prediction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hlkLbhz3FWk_KKGk_myZlQ.png" /></figure><p>Some administrative variables may be updated after an employee has already initiated a resignation or termination process. If these fields are included in model training, the model can appear highly accurate while learning information that would not actually be available during real-world prediction.</p><p>To reduce this risk, we introduced an iterative leakage-detection stage.</p><p>Shallow decision trees were trained as diagnostic models using the candidate feature set. Features with unexpectedly high predictive importance were reviewed to determine whether they might indirectly represent post-event information.</p><p>Suspicious variables were removed, and the process was repeated until the remaining features represented information that could realistically exist before a potential departure.</p><p>This procedure was performed independently for each company because leakage risks differed according to local HR systems and processes.</p><p><em>A high-performing model is not useful if its performance depends on information from the future.</em></p><h3><strong>Choosing LightGBM for Large-Scale Tabular HR Data</strong></h3><p>During the early stages of model development, Logistic Regression was evaluated as a simpler baseline approach. However, its predictive performance remained below the tree-based boosting models.</p><p>The structure of the enterprise HR data also made boosting methods more suitable for the problem. The datasets contained missing values, high-dimensional engineered features, nonlinear relationships, and interactions between employee, managerial, and organizational variables. Logistic Regression required additional preprocessing and imputation to handle these characteristics effectively, while tree-based boosting methods were better suited to capturing the underlying complexity of the data.</p><p>Based on these early experiments, the modeling process shifted toward gradient-boosting algorithms.</p><p>Both XGBoost and LightGBM were then evaluated during model development. LightGBM produced the strongest and most stable results across the company-specific datasets and was selected as the final algorithm.</p><p>It was particularly suitable for this use case because it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*2TJApW1x15nEMXikXDCCLw.png" /></figure><p>The models were trained with balanced class weights to account for the low frequency of churn events. Parameters controlling tree depth, leaf count, minimum observations, and L1/L2 regularization were tuned to reduce overfitting.</p><p>Rather than producing a simple yes-or-no result, LightGBM generated a churn probability for every employee snapshot.</p><p>These probabilities were then used to rank employees by relative risk.</p><p><strong>Why We Did Not Use One Global Model</strong></p><p>At first glance, building one model for all six companies might appear more scalable.</p><p>However, the companies differed in several important ways:</p><ul><li>Industry and business model</li><li>Workforce size</li><li>Promotion and career structures</li><li>Organizational hierarchy</li><li>Feature availability</li><li>Data-entry practices</li><li>Baseline churn rate</li><li>Managerial dynamics</li></ul><p>A pattern that signals elevated churn risk in one organization may be normal in another.</p><p>For this reason, a separate model was trained for each company while keeping the broader data engineering and modeling pipeline consistent.</p><p>This approach provided a useful balance:</p><ul><li><strong>Shared infrastructure and methodology</strong></li><li><strong>Company-specific learning and feature selection</strong></li></ul><p>The most useful feature set was also selected separately for each organization. This allowed each model to retain the variables most relevant to its own workforce dynamics.</p><h3><strong>Training on the Past, Testing on the Future</strong></h3><p>Random train–test splitting was not appropriate for this project.</p><p>Random splitting could place a later employee snapshot in the training set while an earlier snapshot of the same employee appeared in the test set. It could also mix historical and future workforce conditions, producing an unrealistic estimate of model performance.</p><p>Instead, we used a strict time-based split.</p><p>The latest three months of available snapshots were reserved for testing, while earlier snapshots were used for training.</p><p>Time-series-based validation was also used during model development to simulate repeated scenarios of:</p><p><em>Train on historical workforce data, then predict a later period.</em></p><p>This setup was much closer to production conditions, where a model trained on existing data must score employees in a newly completed monthly snapshot.</p><h3><strong>Measuring What Actually Matters</strong></h3><p>ROC AUC was selected as the primary evaluation metric.</p><p>Accuracy was not suitable because churn events were rare. A model predicting that almost no employees would leave could achieve high accuracy but fail to identify meaningful risk.</p><p>Metrics such as precision, recall, and F1 score are useful, but they depend on a specific classification threshold. In this project, the primary objective was to rank employees according to relative risk rather than force every prediction into a fixed binary category.</p><p>ROC AUC measures the probability that an employee who eventually leaves receives a higher risk score than an employee who remains.</p><p>This made it suitable for:</p><ul><li>Imbalanced employee datasets</li><li>Comparing models across companies</li><li>Feature selection</li><li>Hyperparameter optimization</li><li>HR prioritization based on ranked risk</li></ul><h3><strong>What the Models Showed Across Six Companies</strong></h3><p>The models produced the following ROC AUC scores:</p><ul><li><strong>Company A:</strong> 0.83</li><li><strong>Company B:</strong> 0.75</li><li><strong>Company C:</strong> 0.79</li><li><strong>Company D:</strong> 0.75</li><li><strong>Company E:</strong> 0.98</li><li><strong>Company F:</strong> 0.72</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*OPvS9DSqm4_HZ6vkPkjskA.png" /></figure><p>These results showed that the framework could produce meaningful churn-risk rankings across organizations with different workforce structures, data conditions, and HR processes.</p><p>However, the scores must be interpreted together with data quality and preprocessing decisions.</p><h3><strong>Data Quality Strongly Influenced Performance</strong></h3><p>Companies with more complete and consistent HR records generally achieved stronger results.</p><p>Company F, for example, initially produced an AUC close to 0.61. After additional cleaning, feature engineering, and refinement, its performance increased to 0.72.</p><p>This improvement was not primarily the result of switching to a more complex algorithm. It came from improving the quality and representation of the underlying data.</p><h3><strong>Extremely High Performance Required Caution</strong></h3><p>Company E achieved an AUC of 0.98, but this result was not treated as unquestionable success.</p><p>The company used different filtering conditions because of data constraints. Some records were included without the standard exclusions applied elsewhere, increasing the possibility of overfitting or hidden leakage.</p><p><em>An unusually high evaluation score should trigger further validation, not immediate celebration.</em></p><h3><strong>Managerial and Career Features Were Consistently Valuable</strong></h3><p>Across multiple models, features associated with the following themes frequently appeared among the strongest predictors:</p><ul><li>Employee tenure</li><li>Time in the current position</li><li>Time in the current department</li><li>Internal seniority</li><li>Time with the current manager</li><li>Managerial stability</li><li>Promotion and career progression</li><li>Relative employee–manager tenure</li></ul><p>This reinforced one of the central findings of the project: turnover risk is shaped by an employee’s position within an organizational system, not only by isolated personal attributes.</p><h3><strong>Making Risk Scores Usable for HR Teams</strong></h3><p>Raw probability scores can be difficult to use in HR operations.</p><p>To improve interpretability, predicted probabilities were converted into six risk groups:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*io4zzPz_zRfDubzUSNrK2A.png" /></figure><p>This segmentation created a clearer interface between the model and HR users.</p><p>Rather than examining thousands of decimal values, teams could monitor how employees were distributed across risk groups and prioritize cases requiring closer review.</p><p>Risk categories could also be aggregated by:</p><ul><li>Department</li><li>Job family</li><li>Manager</li><li>Company</li><li>Organizational unit</li><li>Reporting period</li></ul><p>These categories were not designed to make automatic employment decisions. They were designed to help human decision-makers identify areas that deserved closer review.</p><h3><strong>Explaining Predictions With SHAP</strong></h3><p>Accuracy alone was not sufficient for an HR application.</p><p>A model may identify an employee as high risk, but HR professionals still need to understand what influenced that result.</p><p>SHAP values were therefore integrated into the prediction pipeline.</p><p>For each employee, SHAP estimated how individual features moved the prediction above or below the model’s baseline risk.</p><p>A positive contribution increased the predicted churn risk, while a negative contribution reduced it.</p><p>An employee’s explanation might indicate that risk was influenced by factors such as:</p><ul><li>Extended time in the same position</li><li>Limited recent career movement</li><li>A change in managerial structure</li><li>An unusual employee–manager tenure relationship</li><li>Department-level instability</li></ul><p>SHAP supported two different levels of interpretation.</p><p><strong>Local Explainability</strong></p><p>Local explanations described why the model assigned a particular risk score to an individual employee.</p><p><strong>Global Explainability</strong></p><p>Aggregated SHAP values showed which features were most influential across an entire company or workforce segment.</p><p>Both the probability predictions and feature-level explanations were stored in structured enterprise tables so that reporting and analytics systems could use them together.</p><p>This turned the model from a black-box scoring mechanism into an interpretable decision-support tool.</p><h3><strong>From Notebook Experiment to Production Pipeline</strong></h3><p>A machine learning model provides limited business value if it only runs manually in a development notebook.</p><p>The churn framework was therefore designed as an automated production pipeline.</p><p>Its main stages were:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zryX3SIZ1Z3s7n7bxmguuQ.png" /></figure><p>The workflow was orchestrated through Apache Airflow and deployed within a containerized environment.</p><p>Airflow represented the process as a series of dependent tasks. This made it possible to control execution order, monitor failures, schedule monthly runs, and ensure that upstream HR data processes completed before model scoring began.</p><p>Model artifacts were versioned so historical predictions could be associated with the model version and workforce snapshot that generated them.</p><p>This operational layer was a major part of the project. The final outcome was not just a predictive model, but a repeatable workforce analytics system.</p><h3><strong>Key Lessons From the Project</strong></h3><p><strong>1. Data Quality Matters More Than Algorithm Complexity</strong></p><p>A sophisticated model cannot compensate for inconsistent employment dates, incomplete position information, or unreliable organizational hierarchies.</p><p>Several of the largest performance improvements came from better data preparation rather than more advanced modeling.</p><p><strong>2. Organizational Context Improves Churn Prediction</strong></p><p>Employee-level variables alone did not explain turnover sufficiently.</p><p>Manager characteristics, hierarchical relationships, and relative career-position features added important predictive information.</p><p><strong>3. Every Company Has Its Own Churn Dynamics</strong></p><p>Companies within the same corporate group may still require different models, features, thresholds, and validation strategies.</p><p>A shared technical framework does not require a single global model.</p><p><strong>4. Temporal Validation Is Essential</strong></p><p>A churn model must be evaluated on a future period, not on a random sample drawn from the same historical distribution.</p><p>Otherwise, reported performance may not reflect real deployment conditions.</p><p><strong>5. Explainability Must Be Part of the Architecture</strong></p><p>Adding explanations after deployment is not enough.</p><p>Explainability should be calculated, stored, monitored, and delivered as a standard component of the prediction pipeline.</p><p><strong>6. Very High Scores Can Be Warning Signs</strong></p><p>An AUC of 0.98 may indicate excellent predictive signal, but it may also point to leakage, overfitting, or inconsistent preprocessing.</p><p>Model evaluation always requires context.</p><h3><strong>What This Framework Still Cannot Solve</strong></h3><p>The framework still has important limitations.</p><p>First, the company-specific models cannot automatically be transferred to unrelated organizations. Each company has its own processes, workforce distributions, and data practices.</p><p>Second, model performance remains dependent on upstream HR data quality. Changes in schemas, delayed pipelines, or inconsistent field population can affect prediction reliability.</p><p>Third, the target captures only departures within the next 90 days. It does not directly model long-term disengagement, internal mobility, or the exact expected time of departure.</p><p>Fourth, major external events such as economic shocks, mergers, restructurings, or changes in labor-market conditions may alter employee behavior faster than the model can adapt.</p><p>Finally, explainability does not remove ethical risk. Features involving age, gender, seniority, organizational status, or related proxies require careful governance. Churn predictions should support human review — not automate employment decisions or label employees as disloyal.</p><h3><strong>Where the Framework Can Go Next</strong></h3><p>Several extensions could strengthen the system.</p><p>Sequence-aware or survival-analysis models could be used to estimate not only whether an employee will leave, but also when departure is most likely.</p><p>Automated drift monitoring could track changes in:</p><ul><li>Feature distributions</li><li>Churn rates</li><li>Prediction distributions</li><li>Model performance</li><li>SHAP explanation patterns</li></ul><p>Probability calibration could improve the relationship between predicted risk and observed churn frequency.</p><p>Fairness audits could compare model behavior across employee groups and identify potential disparities.</p><p>The final step would be to connect prediction with intervention measurement. Instead of only identifying risk, organizations could track which retention actions were taken and whether they changed subsequent outcomes.</p><p>This would move the system from predictive analytics toward evidence-based, prescriptive workforce intelligence.</p><h3><strong>Final Thoughts</strong></h3><p>Employee churn prediction is not just a machine learning problem.</p><p>It is a combination of:</p><ul><li>Data integration</li><li>Temporal modeling</li><li>Feature engineering</li><li>Organizational understanding</li><li>Explainable AI</li><li>Model governance</li><li>Production engineering</li></ul><p>The strongest outcome of this project was not a single AUC score.</p><p>It was the creation of a common enterprise framework that could adapt to six different companies while preserving traceability, interpretability, and operational consistency.</p><p>By combining monthly workforce snapshots, company-specific LightGBM models, SHAP explanations, and an automated data pipeline, the system helped shift HR analytics from retrospective turnover reporting toward proactive workforce analysis.</p><p>Machine learning cannot determine why a person truly chooses to leave an organization. It should not replace managerial judgment, and it should never be used as an automatic decision mechanism.</p><p>But when it is designed responsibly, validated over time, and supported by strong data governance, it can help organizations notice meaningful patterns earlier — and ask better questions before valuable employees walk out the door.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_dEnXfRVdzwmDZOg0ThlTw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b82f8973125" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kocdigital/from-hr-data-to-early-warning-building-an-explainable-employee-churn-prediction-system-at-0b82f8973125">From HR Data to Early Warning: Building an Explainable Employee Churn Prediction System at…</a> was originally published in <a href="https://medium.com/kocdigital">KoçDigital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Tomorrow’s Supply Chains: A Deep Dive into Four Generative AI Applications]]></title>
            <link>https://medium.com/kocdigital/mastering-tomorrows-supply-chains-a-deep-dive-into-four-generative-ai-applications-03140d0492a0?source=rss----cac33c9f0c6c---4</link>
            <guid isPermaLink="false">https://medium.com/p/03140d0492a0</guid>
            <category><![CDATA[supply-chain-management]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[supply-chain]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <dc:creator><![CDATA[İrem Taş]]></dc:creator>
            <pubDate>Fri, 29 Dec 2023 10:16:06 GMT</pubDate>
            <atom:updated>2023-12-29T10:16:06.167Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3k8Ulsr6ydGKAxV8o5ZYGw.png" /><figcaption>Aerial top view of a cargo ship carrying container for import export goods to customer — Somsak Siripatcharathorn-Getty Images</figcaption></figure><p>In the ever-changing environment of supply chain management, technological innovations continue to reshape traditional approaches, and among these groundbreaking advancements stands Generative Artificial Intelligence (AI). The potential of Generative Artificial Intelligence in the supply chain domain lies in its transformative capability to optimize operational processes. Throughout the deployment of generative models, organizations can reach increased precision in demand forecasting, improve inventory management strategies, and develop adaptive capabilities in response to unexpected disruptions.</p><p>According to a survey conducted by McKinsey, in Generative AI, the top areas are Customer Service Operations, Operations Process Optimization, Production Planning/Scheduling, Quality Control/Inspections, and Inventory Management, ranked by executives on the field regarding where to apply Generative AI in operations.* When considering the challenges posed by a dynamic supply chain environment, it is not surprising to see operations involved in the supply chain in the top areas list. After the launches of many successful large language models such as GPT3, GPT4, Llama, Claude, Bard, etc., Generative AI is applied in many cases in the supply chain as anticipated. Here are four ways in which Generative AI can be utilized in the supply chain:</p><p>1. <strong>Analytics and Business Intelligence</strong></p><p>In the realm of supply chain, business intelligence (BI) plays a profound role, offering organizations insights and data-driven tools needed to facilitate decision-making processes. By harnessing these tools, organizations make informed strategic choices and proactively respond to today’s market dynamics. Generative AI can be employed in business intelligence tools to provide further analysis, interpretation, and recommendations regarding data. Many business intelligence tools provide services or add-in applications of Generative AI. Microsoft PowerBI Copilot, Tableau AI, and Qlik Sense can be given as examples of BI tools having embedded generative AI services. Below is an example of Microsoft PowerBI Copilot that generates a summary in response to questions about tables and visuals.</p><figure><img alt="Microsoft PowerBI Copilot https://learn.microsoft.com/tr-tr/power-bi/create-reports/copilot-introduction" src="https://cdn-images-1.medium.com/max/841/1*lv1dI6AZI-7dtepbr1HmPg.png" /><figcaption>Microsoft PowerBI Copilot**</figcaption></figure><p>2. <strong>Demand Forecasting and Demand Planning</strong></p><p>In the pursuit of forecasting demand accurately, the application of Generative AI proves to be instrumental in comprehensively discerning external and internal impacts. Leveraging Generative AI, businesses extract the effects of demand drivers such as seasons, promotions, campaigns, holiday seasons and special events, etc. Based on these inferences, generative AI makes recommendations about demand plans thus enabling businesses to adapt swiftly to changing landscapes. Various products within the market offer recommendations about demand planning, thereby illustrating a diversity of solutions available for businesses aiming to optimize their forecasting strategies. Pluto7, Nextatlas, and OMP are companies providing generative AI solutions.</p><p>3. <strong>Inventory management</strong></p><p>In the intricacies of supply chain management, the significance of inventory optimization shines through as a main strategy, streamlining operations, decreasing costs, and offering adaptability to the ever-changing demands of the market. The utilization of Generative AI in this context serves as a critical analytical tool, contributing to the optimization of inventories. Generative AI can make inventory recommendations harnessing historical sales data and other external data that may affect demand. Based on inventory data, reorder point recommendations can be generated utilizing Generative AI. LeewayHertz provides an inventory optimization service embedded with OpenAI. It recommends a detailed inventory plan by generating reports.</p><p>4. <strong>Route optimization</strong></p><p>The strategic implementation of route optimization stands as a pivotal initiative, improving operational efficiency, minimizing costs, and enhancing logistical processes in the continuous movement of goods from origin to destination. Integration of Generative AI methodologies offers a sophisticated and adaptive solution for the optimization of complex transportation networks. Generative AI can provide an optimized route plan by minimizing cost and time and maximizing customer satisfaction. It can provide insights regarding routes and recommendations. LeewayHertz provides a route optimization service embedded with OpenAI which shortens the needed time for inventory management processes. GEP also integrates OpenAI to address potential disruptions, thus optimizing logistics.</p><p><strong>Conclusion</strong></p><p>Generative AI holds profound significance in supply chain management. Through the strategic deployment of generative AI models, businesses can improve their demand forecasting accuracy, augment the data effectively, manage their inventories proactively, and extract business insights. This innovative technology facilitates a proactive approach to inventory management, allowing businesses to adapt swiftly to today’s dynamic landscapes. The overarching impact of Generative AI extends beyond mere operational improvements, empowering businesses with increased agility and the capability to navigate the complexity of today’s dynamic environment with adept responsiveness.</p><p>İrem Taş</p><p>Analytics Consultant</p><p><strong>References</strong></p><ul><li>KPMG, 2023. Generative AI in Supply Chain: A Path to Better Returns</li><li><a href="https://learn.microsoft.com/tr-tr/power-bi/create-reports/copilot-introduction">https://learn.microsoft.com/tr-tr/power-bi/create-reports/copilot-introduction</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=03140d0492a0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kocdigital/mastering-tomorrows-supply-chains-a-deep-dive-into-four-generative-ai-applications-03140d0492a0">Mastering Tomorrow’s Supply Chains: A Deep Dive into Four Generative AI Applications</a> was originally published in <a href="https://medium.com/kocdigital">KoçDigital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FORECASTING IN FLUX: DECODING THE DYNAMIC DANCE OF PRICE CHANGES AND DEMAND PREDICTIONS]]></title>
            <link>https://medium.com/kocdigital/forecasting-in-flux-decoding-the-dynamic-dance-of-price-changes-and-demand-predictions-326b0251b2ae?source=rss----cac33c9f0c6c---4</link>
            <guid isPermaLink="false">https://medium.com/p/326b0251b2ae</guid>
            <category><![CDATA[demand-forecasting]]></category>
            <category><![CDATA[discount]]></category>
            <category><![CDATA[price]]></category>
            <category><![CDATA[demand]]></category>
            <category><![CDATA[inflation]]></category>
            <dc:creator><![CDATA[İrem Taş]]></dc:creator>
            <pubDate>Thu, 23 Nov 2023 09:56:45 GMT</pubDate>
            <atom:updated>2023-11-23T09:56:45.433Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*btjBIixuXqZslDhun0qiZQ.jpeg" /><figcaption>Drivers line up at a QuickTrip filling station in Atlanta on Tuesday | Megan Varner- The New York Times — Getty Images</figcaption></figure><p>In the highly evolving and dynamic world of today’s market, where disruptions have become usual rather than the exception, understanding and predicting customer behaviors in response to external factors are crucial. The COVID-19 pandemic has disrupted supply chains since the lockdowns have led to decreases in production and the logistics problems have caused longer disruptions in many sectors. Eventually these disruptions caused persistent inflationary pressures. Due to these external factors, traditional forecasting models with limited features fall short, prompting further investigations regarding understanding customer behaviors of today’s unsteady markets.</p><p>These investigations are implemented with the Continuous AI approach Koçdigital embraces. For a deeper exploration of our Continuous AI approach, you can visit: <a href="https://medium.com/kocdigital/a-manifest-for-continuous-ai-93d37848c21c">A Manifest for Continuous AI</a>. Digging deeper into why traditional demand forecasting models fail, three factors emerge: data drift, concept drift and algorithm drift. For detailed explanations of these factors, you can check our blog post: <a href="https://medium.com/kocdigital/drifting-effects-on-ai-models-why-continuous-ai-is-a-must-f6f708e13d1d">Drifting Effects on AI Models: Why Continuous AI is a Must?</a></p><p>Among the numerous variables contributing data drift, price volatility plays a significant role. It is observed that sales of regular customers fluctuate especially during price list change periods, since the companies unveil the alterations in price in advance and these announcements trigger shifts of usual orders. In a highly inflated environment, the most common price list change is price increases. Some of the regular customers may stock up on their purchase orders depending on their stocking capabilities and cash flows which eventually affects the demands for products. These cases are often seen in fuel-oil, fast fashion products, cosmetics and other sectors that announce their price list changes officially or word-of-mouth. Good news is that these behaviors are interpretable, thus they can be foreseen. In this blog post, I will explain how to enhance forecasting models with comprehensive studies that account for price volatility.</p><h4><strong>Who disrupts the predictions?</strong></h4><p>First, we need to make an analysis to determine the scope of the study. To foresee the customers who can buy excessive number of products and stock up should be detected as not all customers are able to do so, due to two main reasons: They may not have enough cash to buy more than their regular orders before the prices increase or the limited stocking (and protecting) capacity of customers do not allow such strategies. This kind of stockpiling requires idle storage and thus only a limited number of customers may have enough space and equipment to store and protect the products properly. Once these specific customers are detected, their orders during these price list change periods should be analyzed.</p><h4><strong>When does the accuracy of predictions decrease?</strong></h4><p>In highly inflated countries, pricelist changes occur quite often, though not all price changes create the same fluctuations at customer side. The case can be limited to only a subset of price changes that are relatively higher than the rest. Customers do not bother for minor price changes as those will be seen not worth tying the cash flow to the product purchases of future periods and/or occupying the limited warehouse space.</p><h4><strong>What happens as prices increase and what can be done to predict more precisely?</strong></h4><p>Since the “who” and “when” are determined, now “what” should be found. The sales to “the customers” during the specific pricelist change periods should be analyzed.<strong> </strong>When the price increases are announced in advance, the regular customers which are specified before, advance their order. This behavior leads to sales increase in the short term just before the price increase. Since these customers meet their demands in advance, they postpone their next orders. That’s why sales decrease after the price increase. Eventually when the balance is achieved, sales are back to their previous amount.</p><p>To elaborate on this case, let’s illustrate it with an example. Let’s say that a distributor sells coffee beans to coffee shops weekly. Due to high maintaining costs, the distributor has decided to increase the price. Previously, he used to sell coffee beans for 5.00 $ per kg. The new listing price is 7.50 $ per kg. The raise ratio is %50, which can be considered high. This price increase may lead to customer loss but let’s assume that this market is not highly competitive, and the customers are loyal to the distributor. This distributor announced the price list change beforehand to provide transparency. Some of the customers decided to rearrange their orders and increased them, at the same time as they hear about the coming change. Hence, sales right before the new price arrangement were increased. The next week, since the customers have already enough coffee to cover the demand for a while, they would not order coffee as usual. In summary, coffee demand fluctuated during these 2 weeks. The graph of these sales would be similar to the graph shown below. Week 5 is the week in which the new price is valid. Week 4 is the week in which the new price listing is announced. The model accuracy of both 2 weeks decrease.</p><figure><img alt="Graph 1. An example of Sales versus Predictions in price increases" src="https://cdn-images-1.medium.com/max/746/1*GKenXEvxkGfK5pBP_tHNiQ.png" /><figcaption>Graph 1. An example of sales versus predictions in price increases</figcaption></figure><p>As can be seen in graph 1, the sales fluctuate between week 4 and week 5. The total sales of Week 4 and Week 5 are 170. Total prediction for these 2 weeks is 152. Total accuracy seems fine with %11 mean absolute percentage error. However, weekly accuracy of both 2 weeks is low. As we analyze the sales further, we can see that some of the sales of week 5 shifted to week 4. Hence, we can say that a %50 price change has led to a %15 of total sales shift to former week, creating imbalance. If we could split our total prediction for these weeks with the ratio 65:35, the new calculated accuracy would be higher than the previous accuracy. The new graph of adjusted predictions and sales can be seen below in Graph 2. Of course, to come up with an accurate ratio, many historic price adjustments should be analyzed. If the total accuracy of these two weeks seems successful, shifting some of the orders from the second week to the first week can improve the accuracy of the model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*_wLib8TSgyZwNVokQlufcA.png" /><figcaption>Graph 2. An example of adjusted sales versus predictions in price increases</figcaption></figure><p>Accurate price change data for future periods are critical to apply these kinds of adjustments to the base predictions. As the behaviors of customers are linked to the price change expectations, this data should be updated regularly. The more accurate the price change expectation data is, the more precise the predictions will be.</p><h4><strong>What if the opposite happens?</strong></h4><p>The exact opposite of the mentioned customer behaviors can be observed in price discounts. When the customers hear that a special discount would happen or a new promotion /campaign will be run in advance, they may tend to postpone their non-urgent demands. Again, not all customers can postpone their orders, since they may not have enough stock to handle until the start of promotion / discount date and/or not all the discounts are considered worth postponing the orders and facing stock out risks. The first step is to analyze the customers who would be able to postpone, and discount ranges they would be tempted to do so. Next, the data should be analyzed using previous discounts and/or promotions, to understand which and how discounts /promotions would affect demand. Only after a clear pattern is seen the predictions can be improved with some adjustments.</p><p>Let’s assume that a fashion brand announced that it would apply a %50 discount at its products 1 week in advance. Customers postpone their orders to the week in which the discount would be implemented so that they can make their orders at discounted prices. Graph 3 represents an example of discount announcement effects on demand. Week 4 is in which the announcement is made and week 5 is in which the discount is implemented. The ratio of sales of week 4 to the total sales of week 4 and week 5 is %40. Since the accuracy of the total prediction seems reasonable, we can use this ratio to find out the adjusted prediction of week 4 and week 5. The adjusted prediction with this ratio is represented by the green line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*ovxj3MRTqyp8uUlS5hriRw.png" /><figcaption>Graph 3. An example of sales behaviors and prediction adjustments in discount events</figcaption></figure><p>Conclusion</p><p>In unsteady and dynamic market settings, it is crucial for companies to predict uncertainties to align strategically. Customer behaviors in such settings might set off a chain-reacting effect in supply chains. It is critical to understand what are the triggers for distinct customer preferences. In environments marked by frequent inflation, price increase announcements can cause stockpiling before increase takes place, eventually postponing some of the orders to later periods. Price decreases and promotion/campaign implementations may also lead to fluctuations by decreases in sales prior to these implementations and increase in sales after. Similar patterns are generally repeated in similar price list changes. Hence, if the pattern is understood and interpreted clearly, predictions can be adjusted more accurately.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=326b0251b2ae" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kocdigital/forecasting-in-flux-decoding-the-dynamic-dance-of-price-changes-and-demand-predictions-326b0251b2ae">FORECASTING IN FLUX: DECODING THE DYNAMIC DANCE OF PRICE CHANGES AND DEMAND PREDICTIONS</a> was originally published in <a href="https://medium.com/kocdigital">KoçDigital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scalable Batch Inference on Large Language Models Using Ray]]></title>
            <link>https://medium.com/kocdigital/scalable-batch-inference-on-large-language-models-using-ray-ac3bf1cf1384?source=rss----cac33c9f0c6c---4</link>
            <guid isPermaLink="false">https://medium.com/p/ac3bf1cf1384</guid>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[rays]]></category>
            <category><![CDATA[batch-inferences]]></category>
            <dc:creator><![CDATA[Büşra Korkmaz]]></dc:creator>
            <pubDate>Tue, 31 Oct 2023 09:52:39 GMT</pubDate>
            <atom:updated>2023-10-31T09:52:39.741Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong></p><p>Large language models (LLMs) have become very popular in recent years. To use these models effectively, we need to integrate current technologies. At Koc Digital, we have been using the Ray library in our projects since 2019 and achieving significant performance improvements. In this article we co-authored with Murat Koc, we explore the batch inference performance of an LLM model with a Ray library. We will show how we can do this using Ray Data, one of the Ray AI Runtime libraries. For this, we will create a Ray cluster to work on. We will compare two types of batch inference applications: sequential and distributed. In this study, we use the GP2-Large model for text-generation prediction. The data we use consists of repeated questions with 6480 lines.</p><p>In this post, we will discover the following topics:</p><ul><li>Inference with Ray AIR Datasets.</li><li>Get to know the inference task.</li><li>Implement sequential inference.</li><li>Learn about three distributed batch inference design patterns with Ray.</li><li>Implement distributed inference patterns.</li></ul><p><strong>1.Scaling Batch Inference with Ray</strong></p><p><strong>What is batch inference?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*hJi4B9WIPs8FYUfwssNN8A.png" /><figcaption>Batch Inference Diagram</figcaption></figure><p>Batch inference, also known as offline inference, is the process of generating predictions about a set of observations. Estimates of batches, usually created according to recurring schedules, are stored in a database. This data can be made available to developers. For example, it can be processed and new predictions can be created using big data technologies.</p><p><strong>Batch inference using Ray AIR Data</strong></p><p>Ray Data is a utility for large-scale, distributed or sequential batch inference. Ray Data supports various predictors like TorchPredictor, HuggingFacePredictor or TFPredictor.</p><p><strong>2.Prepare Environment</strong></p><p>We ran the following scripts to create the Ray cluster.</p><pre>ray stop # If there is an active cluster, to stop it<br>export RAY_ENABLE_RECORD_ACTOR_TASK_LOGGING=1 # To view worker logs of actor classes in detail<br>export CUDA_VISIBLE_DEVICES=2,3,5 # To determine the GPUs that the Ray cluster will run on (we have 6 GPUs, we chose a few of them)<br>ray start --head --num-cpus=30 --num-gpus=3 --port=8266  --dashboard-port=8267 # To run the ray cluster with 3 gpu and 30 cpu</pre><p>We used the following script to submit the following python codes to the ray cluster. (ray_batch_inf.py is the file name we created)</p><pre>RAY_ADDRESS=&#39;http://127.0.0.1:8267&#39; ray job submit --working-dir . -- python ray_batch_inf.py</pre><p>Ray version: 2.7.1</p><p>Python version: 3.10.4</p><p>Using the <strong><em>ray status </em></strong>script, we displayed the cluster information we created as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aeCwwcefOpHHFtoyUdA3Uw.png" /><figcaption>Ray Cluster Info</figcaption></figure><p><strong>3. Sequential Batch Inference</strong></p><p>To begin with this batch inference task, we will take a basic approach with a worker sequentially generating predictions on groups. We will work with a single worker and process all the data by dividing it into batches and see how it uses time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QNDrmUaQ6Iy1CLw_EX9ABg.png" /></figure><p>We carried out two studies under the title of Sequential Batch Inference. In these studies, we observed the difference between GPU and CPU usage when performing sequential batch inference. You can change the estimation time by reducing data <strong><em>size</em></strong> with <strong><em>take_batch</em></strong> parameter in the <strong><em>map_batches</em></strong> function, or by increasing or decreasing <strong><em>batch_size</em></strong> parameter.</p><pre>from typing import Dict<br>import numpy as np<br>import time<br>import ray<br>from transformers import pipeline  <br> <br>ds = ray.data.read_text(&quot;data.txt&quot;)<br> <br>class HuggingFacePredictor:<br>  <br>    def __init__(self):<br>     <br>        start = time.time()<br>        # We added the device=&quot;cuda&quot; parameter to the function for GPU usage.<br>        self.model = pipeline(&quot;text-generation&quot;, model=&quot;gpt2-large&quot;,device=&quot;cuda&quot;)<br>        end = time.time()<br>  <br>        print(&quot;--------- MODEL LOADING TIME -------&quot;)<br>        print(end-start)<br>  <br>    def __call__(self, batch: Dict[str, np.ndarray]) -&gt; Dict[str, list]:<br>        print(&quot;CALL METHOD&quot;)<br>        start = time.time()<br>        predictions = self.model(list(batch[&quot;text&quot;]), max_length=20, num_return_sequences=1)<br>        batch[&quot;output&quot;] = [sequences[0][&quot;generated_text&quot;] for sequences in predictions]<br>        end = time.time()<br>         <br>        print(&quot;--------- MODEL INFERENCE TIME -------&quot;)<br>        print(end-start)<br>        return batch<br> <br>start = time.time()<br>  <br>predictions = ds.map_batches(<br>HuggingFacePredictor,<br>num_gpus=1, # GPU capacity of each worker<br>#num_cpus=24 # # CPU capacity of each worker<br>batch_size=250, # We will make predictions by dividing 6480 data by 250.<br>compute=ray.data.ActorPoolStrategy(size=1), # The number of Worker. Since it is sequential, we set it to run 1 worker.<br>).take_batch(6480) ## The number of data we want to predict in the dataset<br>  <br>end = time.time()<br>  <br>print(&quot;--------------- TOTAL TIME -----------------&quot;)<br>print(end-start)<br> <br>print(predictions)  print(&quot;--------------- TOTAL TIME -----------------&quot;)<br>print(predictions)<br>print(end-start)</pre><p><strong>Senario 1: 1 Worker &amp; 1 GPU &amp; 6480 Data &amp; 250 Batch Size</strong></p><p>As can be seen in the codes, by adding <strong><em>device=”cuda”</em></strong> parameter to the <strong><em>pipeline </em></strong>function, we enabled it to use GPU while making the prediction. For this purpose, we also determined the gpu usage capacity of the workers by adding the <strong><em>num_gpus</em></strong> parameter to the <strong><em>map_batches</em></strong> function. For Sequential Batch inference, we made the estimation with 1 worker.</p><p>When we view the Cluster status via the <strong>Cluster</strong> Tab of the Ray Dashboard, we can see that 1 GPU is used as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0IRUJ-Meh_SAHO0BOuq9lQ.png" /><figcaption>GPU Usage</figcaption></figure><p>We can see the running workers and their status through the <strong>Actor</strong> Tab of the Ray Dashboard as follows. We can also track the log separately for each worker from here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9muoSw1JysiLqYm7qmrk7A.png" /></figure><p>By using the <strong><em>nvidia-smi</em></strong> script on the machine, we can view the worker running on the machine and which GPU it is using. Since we give 1 GPU capacity to 1 Worker, we get an output like the following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*IWUeqilNzBOxn9zJ7OS33A.png" /></figure><p>The estimation time of a worker with 1 GPU capacity working with 250 batches on 6480 data for text generation with the GPT2-Large model takes approximately 23 minutes as follows. In the next scenario, we will see the speed difference created by using CPU instead of GPU.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*8Or5QeHYe5cBYnl4NG4Ong.png" /></figure><p><strong>Senario 2:</strong> <strong>1 Worker &amp; 24 CPU &amp; 6480 Data &amp; 250 Batch Size</strong></p><p>When we remove <strong><em>device=”cuda”</em></strong> parameter in the <strong><em>pipeline </em></strong>function that creates the model and use the <strong><em>num_cpus</em></strong> parameter instead of <strong><em>num_gpus</em></strong> in the <strong><em>map_batches</em></strong> function, we disable the use of GPUs. When we examine the cluster tab of Ray Dasboard by giving 24 CPU capacity to 1 worker via CPU, we will see that the CPU usage is almost 100% as follows. We can also view the status and logs of running workers via the Actor tab as above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tiKVzzK9Sq7pKPsB3ofD0g.png" /><figcaption>CPU Usage</figcaption></figure><p>Since this job does not run on the GPU, we used the <strong><em>ps -ef | grep ray</em></strong> script to display the worker as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*NmUyJL3D7-TNMpUZ3r4UCw.png" /></figure><p>The estimation time of 1 worker with 24 CPU capacity working with 250 batches on 6480 data for text generation with the GPT2-Large model takes approximately 5 hours as follows. In the next steps, we will simulate distributed batch inference scenarios.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*L3_wpqMPYTcGSYtoAzk4rg.png" /></figure><p><strong>4. Distributed Batch Inference</strong></p><p>It allows you to perform batch inference by copying the existing model on multiple workers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*qFZuWdfZ87ZYaWHOAbZXtA.png" /></figure><p>We have completed two studies under the title Distributed Batch Inference. We clearly observed the difference in speed of estimation when Sequential or Distributed was run in these scenarios. We also examined the differences between GPU and CPU usage when performing distributed batch inference. You can change the estimation time by reducing data <strong><em>size</em></strong> with the <strong><em>take_batch</em></strong> parameter in the <strong><em>map_batches</em></strong> function or by increasing or decreasing <strong><em>batch_size</em></strong> parameter. In addition, you can increase or decrease the number of workers by changing <strong><em>size </em></strong>value of <strong><em>compute </em></strong>parameter in the <strong><em>map_batches </em></strong>function.</p><pre>from typing import Dict<br>import numpy as np<br>import time<br>import ray<br>from transformers import pipeline  <br> <br>ds = ray.data.read_text(&quot;data.txt&quot;)<br> <br>class HuggingFacePredictor:<br>  <br>    def __init__(self):<br>     <br>        start = time.time()<br>        # We added the device=&quot;cuda&quot; parameter to the function for GPU usage.<br>        self.model = pipeline(&quot;text-generation&quot;, model=&quot;gpt2-large&quot;, device=&quot;cuda&quot; )<br>        end = time.time()<br>  <br>        print(&quot;--------- MODEL LOADING TIME -------&quot;)<br>        print(end-start)<br>  <br>    def __call__(self, batch: Dict[str, np.ndarray]) -&gt; Dict[str, list]:<br>        print(&quot;CALL METHOD&quot;)<br>        start = time.time()<br>        predictions = self.model(list(batch[&quot;text&quot;]), max_length=20, num_return_sequences=1)<br>        batch[&quot;output&quot;] = [sequences[0][&quot;generated_text&quot;] for sequences in predictions]<br>        end = time.time()<br>         <br>        print(&quot;--------- MODEL INFERENCE TIME -------&quot;)<br>        print(end-start)<br>        return batch<br> <br>start = time.time()<br>  <br>predictions = ds.map_batches(<br>HuggingFacePredictor,<br>num_gpus=0.5, # GPU capacity of each worker<br>#num_cpus=1, # CPU capacity of each worker<br>batch_size=250, # We will make predictions by dividing 6480 data by 250.<br>compute=ray.data.ActorPoolStrategy(size=6),# The number of Worker. Since it is distributed, we set it to run 6 worker.<br>).take_batch(6480) ## The number of data we want to predict in the dataset<br>  <br>end = time.time()<br>  <br>print(&quot;--------------- TOTAL TIME -----------------&quot;)<br>print(end-start)<br> <br>print(predictions)  print(&quot;--------------- TOTAL TIME -----------------&quot;)<br>print(predictions)<br>print(end-start)</pre><p><strong>Senario 3:</strong> <strong>6 Worker &amp; 0.5 GPU &amp; 6480 Data &amp; 250 Batch Size</strong></p><p>To speed up the first scenario, we performed distributed batch inference by increasing the number of workers in this scenario. Thus, we accelerated the time in the first scenario even more. In the Cluster tab of the Ray Dashboard, we can see that all 3 GPUs are used at full capacity, as seen below. We can review all the workers we run and their status under the Actor Tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GHd7YqRNo-8RrXnLfyPKmw.png" /></figure><p>By using <strong><em>nvidia-smi</em></strong> script on the machine, we can view how the 6 workers running on the machine and how they are positioned on the GPUs. Since we give 0.5 gpu capacity to 6 Workers, we get an output as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*upG4iqtGp-Wz49AdJ8NXEg.png" /></figure><p>The estimation time of our 6 workers with 0.5 gpu capacity, working with 250 batches on 6480 data for text generation with the GPT2-Large model, takes approximately 6 minutes as follows. In the next scenario we will examine the usage of distributed batch inference on the CPU.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*5VtLwzZqY2_I4Ijdsft-gg.png" /></figure><p><strong>Senario 4:</strong> <strong>6 Worker &amp; 4 CPU &amp; 6480 Data &amp; 250 Batch Size</strong></p><p>When we remove <strong><em>device=”cuda”</em></strong> parameter in the <strong><em>pipeline </em></strong>function that creates the model and use the <strong><em>num_cpus</em></strong> parameter instead of <strong><em>num_gpus</em></strong> in the <strong><em>map_batches</em></strong> function, we inactivate the use of GPUs. When we examine the cluster tab of Ray Dasboard by giving 4 cpu capacity to 6 workers on cpu, we will see that CPU utilization is almost 100% as below. We can also view the status and logs of the running workers on the Actor tab as above.</p><p>Since this job does not run on the GPU, we used the <strong><em>ps -ef | grep ray</em></strong> script to display workers as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*2ZJcaMBO9tLcl-35x4XybA.png" /></figure><p>The estimation time of our 6 workers with 4 cpu capacity, working with 250 batches on 6480 data for text generation with the GPT2-Large model, takes approximately 1 hour as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*ogdXjKimuIIstbLiRHasWg.png" /></figure><p>Don’t forget to shutdown ray.</p><pre>ray.shutdown()</pre><p><strong>Conclusion</strong></p><p>Batch inference is the process of applying a trained model to a large dataset offline. In this post, we use the Ray Data library, part of the Ray AI Runtime, to perform batch inference with a large language model (LLM). We compare the performance of two different batch inference methods: sequential and distributed. We also examine how different parameters, such as GPU and CPU usage, affect the inference speed. We find that Ray Data offers a flexible and scalable solution for offline batch inference tasks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac3bf1cf1384" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kocdigital/scalable-batch-inference-on-large-language-models-using-ray-ac3bf1cf1384">Scalable Batch Inference on Large Language Models Using Ray</a> was originally published in <a href="https://medium.com/kocdigital">KoçDigital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solving Network Puzzles: How Graph Theory Simplifies Analysis]]></title>
            <link>https://medium.com/kocdigital/solving-network-puzzles-how-graph-theory-simplifies-analysis-b6f6789869b0?source=rss----cac33c9f0c6c---4</link>
            <guid isPermaLink="false">https://medium.com/p/b6f6789869b0</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[graph]]></category>
            <category><![CDATA[graph-theory]]></category>
            <category><![CDATA[network]]></category>
            <dc:creator><![CDATA[Emine Yavuz]]></dc:creator>
            <pubDate>Wed, 25 Oct 2023 12:38:12 GMT</pubDate>
            <atom:updated>2023-10-25T12:38:12.623Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong></p><p>In an era where extracting insights from data is crucial but understanding relationships within datasets is challenging, the use of different tools become essential. While we can always try merging datasets, this method may fall short when we deal with vast volumes of data requiring quick analysis. In this post, we will illustrate the use of graph theory which proves to be quite convenient for similar cases.</p><p>Take, for instance, a bank’s need to detect fraud activities. It is a waste of time and effort for the bank to merge data from all its customers and monitor transactions in real-time. This is where graph theory steps in, transforming complex tabular data into a clear, understandable graph and thus allowing us to track suspicious activities in banking operations instantaneously.</p><p>Similarly, for online shopping platforms, the ability to deliver real-time advertisements is so important but it is not easy to analyze a user’s previous shopping history and their current preferences immediately. In such scenarios, graph theory becomes an invaluable tool.</p><p>Today, we will dive into the foundational aspects of graph theory and construct a graph using a sample tabular dataset.</p><p><strong>1. Graph Structure</strong></p><p>We will use the Covid-19 Vaccine Procurement Dataset which is collected by the Duke Global Health Innovation Center.</p><p>There are two main components to identify an abstract graph: <strong>nodes and edges</strong>. Nodes are the vertices on the graph which represent the entities forming the graph and edges represent the relationship between nodes. For example, we can see that there is a relation of Russia with Germany, but not with Belgium.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*fGgJ9Mq5nEZEkJ1I5oqC3Q.png" /></figure><p>So, we need to identify the <strong>nodes</strong> to create a graph from a tabular dataset and specify the relationship between them. Nodes which represent the entities, can be identified in 3-step:</p><p>1. <strong>Element:</strong> Elements are the smallest part of our graph, basically each column of the tables.</p><p>Example from this dataset: Company and Vaccine Name, License Holder, Company’s Country, Purchaser Entity / Country, Number of Doses Procured, COVID Burden (cases/million), Doses intended to be purchased, Limited Regulatory Approval.</p><p>2. <strong>Compounds:</strong> Compounds are the group of elements.</p><p>Example from this dataset: Compound can be created by merging Company Name and Company’s Country.</p><p>3. <strong>Entity:</strong> Entities are the group of multiple or single compounds that can be identifiable. They differ by their attributes. Entities signify one of the key parts of the graph, nodes.</p><p>Example from this dataset: Vaccine company’s country and the purchaser country are the entities of this graph where they are related from procurement activity.</p><p>Next, we define the <strong>edges</strong> of our graph, in other words we establish the relationship between entities.</p><p>Example from this dataset: Each procurement process shows that there is a relation between nodes. Oxford-AstraZeneca _AZD1222 vaccine company is in United Kingdom but also United Kingdom is purchaser country for vaccines.</p><p><strong>2. Exploratory Data Analysis</strong></p><p>The second step of creating a graph structure from tabular dataset is data preprocessing. We address some issues that we found in the data.</p><pre>def data_preprocess_1(data):<br><br>    data.columns = [x.replace(&quot; &quot;, &quot;_&quot;) for x in data.columns.values]<br>    data_short = data[[&quot;Company&#39;s_Country&quot;,&#39;Purchaser_Entity_/_Country&#39;]].drop_duplicates()<br>    data_short = data_short.apply(lambda x: x.str.rstrip())<br>    data_short.dropna(inplace=True)<br><br>    return(data_short)<br><br>df_entity = data_preprocess_1(data)</pre><p>We notice that there are excessive spaces in column names, so we replace these spaces with ‘_’ in the first line of the function.</p><p>In the second line of the function, we select our nodes. Since the relationship we want to capture is the relationship between countries, we filter two columns: the vaccine-producing country and the purchasing country.</p><p>Due to the empty spaces in the data, we notice that some values are duplicated (e.g., “UK” vs. “UK “). In the third line, we use the <em>rstrip</em> method to remove trailing spaces from all rows. In the last line before returning the data frame, we drop the null values.</p><p>Another issue is that some vaccines are produced by companies from two different countries, so to find the relationship between them, we will need to separate the country names and duplicate the data for each sale.</p><pre>def vaccine_country_division(dataframe,first_country,second_country):<br><br>    data_main = dataframe[dataframe[&quot;Company&#39;s_Country&quot;] != first_country + &#39;/&#39; + second_country]<br><br>    df_first = dataframe[dataframe[&quot;Company&#39;s_Country&quot;] == first_country + &#39;/&#39; + second_country]<br>    df_second = dataframe[dataframe[&quot;Company&#39;s_Country&quot;] == first_country + &#39;/&#39; + second_country]<br><br>    df_first[&quot;Company&#39;s_Country&quot;] = first_country<br>    df_second[&quot;Company&#39;s_Country&quot;] = second_country<br><br>    df_final_entity = pd.concat([data_main,df_first, df_second], ignore_index=True)<br><br>    return(df_final_entity)</pre><p>For example, Pfizer-BioNTech_BNT162 vaccine is produced by American company Pfizer and German biotechnology company BioNTech. So, we need to record the sale of a Pfizer-BioNTech_BNT162 vaccine to both the USA and Germany. We split the data labeled as USA/Germany into USA and Germany with this function and we multiply the sales for both countries. In addition to this example, we also do the same process for Sanofi-GSK_SARS-CoV-2 Vaccine of France and UK.</p><pre>def data_preprocess_2(data):<br><br>    df_divided_1 = vaccine_country_division(data,&#39;USA&#39;,&#39;Germany&#39;)<br>    df_divided_2 = vaccine_country_division(df_divided_1,&#39;France&#39;,&#39;UK&#39;)<br>    <br>    df_entity = df_divided_2.copy()<br><br>    for col in df_entity.select_dtypes([&#39;object&#39;]).columns:<br>        df_entity[col] = df_entity[col].astype(str)<br>    <br>    return(df_entity)</pre><p>After executing the <em>vaccine_country_division</em> function, we convert the columns with the data type object into strings and this <em>data_preprocess_2</em> function returns the new dataset.</p><p>After whole preprocessing, the data transformed from the format in the first image to the format in the second image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*qY2Q8iMYgdRmVNtilVl7Yg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*K674UaAwAycpSZx_Qb7_1A.png" /></figure><p><strong>3.</strong> <strong>Adjacency Matrix</strong></p><p>Adjacency matrix helps us to understand the relation between nodes. Basically, data points which have relation/have an edge are represented with 1, and others with 0. If we have multiple datasets, first, we gather all entities (all data points in dataset) together. Even if there is not a relation between entities, we show ‘non-relation’ with ‘0’. So, we need all pairs of nodes to show all relationships.</p><p>The NetworkX, a Python package, can be useful to create networks from dataset and then produce the adjacency matrix. But what if the dataset is too big to create a graph immediately?</p><p>One way to solve this problem is to create an adjacency matrix in the first place. This method can decrease the time needed to build graphs. Second, it enables to use memory more effectively since out-of-memory error is a common problem of network study. Finally, this method can facilitate the analysis of the relations at first glance. The relationship between the nodes can be analyzed without creating the graph.</p><p>The first step of creating the adjacency matrix is gathering all nodes together. As it is mentioned above, one country can be both buyer and seller of a vaccine. Let’s dive into the Python code:</p><pre>def create_adjacency_matrix(df, column_set):<br>        <br>    # First step<br>    nodes = pd.concat([df[col] for col in column_set]).unique()<br><br>    # Second step<br>    adj_matrix = pd.DataFrame(0, index=nodes, columns=nodes)<br>    print(adj_matrix.head())<br><br>    # Third step<br>    for _, row in df.iterrows():<br>        for i in range(len(column_set)):<br>            for j in range(len(column_set)):<br>                if i != j:<br>                    adj_matrix.at[row[column_set[i]], row[column_set[j]]] = 1<br><br>    # Fourth step<br>    #for node in nodes:<br>        #adj_matrix.at[node, node] = 1<br><br><br>    return adj_matrix</pre><p><strong>First step:</strong> We gather and singularize the values in all columns of the data into a single data frame: nodes.</p><p><strong>Second step:</strong> We create an empty adjacency matrix with 0 values. This matrix will be filled in the third step.</p><p><strong>Third step:</strong> In this step, we fill the adjacency matrix with value ‘1’ if there is a procurement process between the entity in the row and entity in the column. At the beginning of the function, we provide a data frame and the columns that will create the nodes of our network, as inputs. Here, we pass the final version of our data frame and the columns “Company’s_Country” and “Purchaser_Entity_/_Country” as input.</p><pre>columns_to_connect = [ &quot;Company&#39;s_Country&quot;,&quot;Purchaser_Entity_/_Country&quot;]<br>adj_matrix = create_adjacency_matrix(data_preprocess_2(df_entity), columns_to_connect)</pre><p>We replace the value 0 to value 1 in the adjacency matrix where the row-column pair is equal to row-column pair in the data frame. The row-column pair in the actual data indicates a purchase transaction between them. Therefore, we place a value of 1 in their respective positions in the adjacency matrix.</p><p><strong><em>Fourth step:</em></strong> Since every node is related to itself, rows and columns with same specific node name are filled with ‘1’. However, if you only want to see its relationships with others, you can comment out this part.</p><p><strong>4.</strong> <strong>Result</strong></p><p>Graph theory helps us see the trade patterns of vaccines more clearly. The United Kingdom and the United States are the top two countries that engage in the most vaccine transactions among all countries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*TJdL5r0URX9Rm-ntu8PdvQ.png" /></figure><p><strong>Conclusion</strong></p><p>Throughout this post, we review the basics of graph theory and explore how to create a graph from tabular data. Eventually, we construct a structure that allows us to extract real-time insights from what may initially seem like complex data by transforming this complex tabular data into a clear, understandable graph.</p><p>Emine Yavuz, Data Scientist</p><p>Şeymanur Ergezgin, Data Scientist</p><p><strong>References</strong></p><p>Ahmed, I. (2021). <em>Kaggle.</em> Retrieved from Kaggle Web site: <a href="https://www.kaggle.com/datasets/ibtesama/covid19-vaccine-procurement-dataset">https://www.kaggle.com/datasets/ibtesama/covid19-vaccine-procurement-dataset</a></p><p>West, D. B. (2001). <em>Introduction to Graph Theory.</em> Prentice Hall.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6f6789869b0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kocdigital/solving-network-puzzles-how-graph-theory-simplifies-analysis-b6f6789869b0">Solving Network Puzzles: How Graph Theory Simplifies Analysis</a> was originally published in <a href="https://medium.com/kocdigital">KoçDigital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generative AI in Finance]]></title>
            <link>https://medium.com/kocdigital/generative-ai-in-finance-f2babf9e5667?source=rss----cac33c9f0c6c---4</link>
            <guid isPermaLink="false">https://medium.com/p/f2babf9e5667</guid>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[generative-ai-in-finance]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[generative-ai]]></category>
            <dc:creator><![CDATA[Ilker Katkat]]></dc:creator>
            <pubDate>Tue, 26 Sep 2023 13:33:20 GMT</pubDate>
            <atom:updated>2023-09-26T13:33:20.652Z</atom:updated>
            <content:encoded><![CDATA[<h4>What does this mean for the industry?</h4><p>In the dynamic and continually evolving landscape of the financial sector, Generative AI emerges as a pivotal and transformative catalyst. As data continues to proliferate at an unprecedented pace, Generative AI assumes the role of a masterful conductor, orchestrating a symphony that seamlessly blends data, innovation, and profound insights.</p><p>Throughout this examination, we will endeavor to elucidate how this groundbreaking technology is affecting a fundamental reconfiguration of the financial ecosystem. Its impact is readily discernible in the realm of heightened operational efficiencies and the elevation of customer experiences to unprecedented levels of excellence.</p><p>Generative AI is already impacting the industry and will continue to do so. According to McKinsey’s latest report on the economic potential of Generative AI; it could have a significant impact on the banking industry, generating value from increased productivity of 2.8 to 4.7 percent of the industry’s annual revenues, or an additional $200 billion to $340 billion.</p><h4>The Use Cases of Generative AI in Finance Industry</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*x4W5v5NpFVzYv7mdQ5NQUw.png" /></figure><h4>Sentiment Analysis</h4><p>Generative AI possesses the remarkable ability to comprehend and interpret sentiments expressed in financial news, social media posts and various textual data sources. This advanced technology captures contextual nuances and intricate word dependencies to provide deep insights into market sentiment, thereby supporting crucial investment decisions.</p><p>Here are some notable use cases:</p><p><strong>Early Warning Systems: </strong>By conducting sentiment analyses on online news related to individual customers, financial institutions can develop an early warning system. This real-time, cost-effective intelligence operates independently of conventional monthly inquiries, such as those involving credit reports or trade registries like <strong>Kredi Kayıt Bürosu </strong>(KKB) and <strong>Ticaret Sicil Gazetesi</strong>. For instance, when a customer applies for credit, Generative AI can swiftly produce a real-time intelligence analysis (via APIs), which can be integrated into the credit assessment process.</p><p><strong>News Reports: </strong>Continuous monitoring of news websites (via APIs) related to a company enables the classification of positive and negative news, facilitating the creation of concise <strong>summary </strong>reports.</p><h4>Financial Text Generation</h4><p>Generative AI’s prowess extends to the generation of synthetic financial reports, market commentaries, and other relevant textual content. These models learn to generate text based on discerned patterns and structures within financial data, thereby offering opportunities for automated report generation and content creation.</p><p>Here are some notable use cases:</p><p><strong>C-Level Reports: </strong>Generating customized reports for top executives on various topics.</p><p><strong>Economic Research: </strong>Automating the creation of periodic economic research notes.</p><p><strong>Investor Presentations:</strong> Automatically updating investor presentations with the latest financial data.</p><p><strong>Credit Reports: </strong>Creating automated credit allocation reports for existing or new credit applicants.</p><p><strong>Financial Analysis:</strong> Preparing financial analysis reports by analyzing customer-uploaded balance sheets.</p><p><strong>Product Insights: </strong>Crafting reports with strategic insights on specific banking products.</p><p><strong>Audit Reports: </strong>Automating audit reports (incidents) for bank branches or headquarters, streamlining compliance processes.</p><h4>Fraud Detection and Prevention</h4><p>Conventional rule-based systems and static fraud detection models often struggle to match the sophistication of fraudulent techniques employed by malicious actors. Moreover, the sheer volume of financial transactions and data generated hampers manual detection efforts. Generative AI offers an innovative approach by creating <strong>synthetic data </strong>closely mirroring fraudulent patterns.</p><p>Generative AI-generated transaction data is instrumental in training dedicated machine learning models for fraud prediction. Integration of synthetic data into the training process allows these models to learn from a <strong>wider spectrum of fraudulent patterns</strong>, resulting in more precise detection capabilities. This not only reduces false positives and negatives but also enhances the overall efficiency of fraud detection systems, safeguarding legitimate customer transactions while identifying and preventing fraudulent activities more effectively.</p><p>Here are some notable use cases: Strategies for tracking user behavior, incorporating additional verification layers, and continuously analyzing patterns play a pivotal role in securing financial transactions.</p><h4>Personalized Customer Experience</h4><p>The personalization of financial services is a significant differentiator within retail, private, and corporate banking, capable of fostering new forms of competitive advantage. Generative AI plays a pivotal role in tailoring financial offerings to individual needs and interests, enabling both reactive and proactive client interactions. Through chatbots and digital assistants, Generative AI technology provides <strong>timely recommendations </strong>when clients seek advice.</p><p>Leveraging individual customer data and preferences, Generative AI enables financial institutions to offer <strong>personalized financial advice. </strong>This technology, through the analysis of transaction history, spending habits, and financial goals, generates customized recommendations, enhancing customers’ financial well-being.</p><p>Here are some notable use cases:</p><p><strong>Next Product to Buy Models: </strong>Enhancing predictive models for personalized product recommendations.</p><p><strong>Propensity Models:</strong> Improving models that predict when a customer is likely to use a product.</p><p><strong>Customized Product Options: </strong>Providing customers with personalized product offerings based on their credit history and interactions.</p><h4>Risk Assessment and Loan Underwriting</h4><p>Traditional risk assessment methodologies often rely on historical data and predefined rules, which may fail to capture the complexity and dynamic nature of credit risks. Generative AI excels at generating synthetic data <strong>simulating various risk scenarios</strong>, which is instrumental in training effective risk assessment models.</p><p>By generating <strong>synthetic datasets </strong>encompassing diverse risk factors and patterns, Generative AI offers a comprehensive representation of potential risks, enabling models to learn from diverse scenarios and improve predictive capabilities. This enhances risk assessment accuracy and enables more informed loan approval decisions.</p><p>Generative AI also automates document verification and risk assessment processes in <strong>loan underwriting</strong>. This automation, powered by advanced algorithms and natural language processing, eliminates manual effort, reduces processing time and enhances accuracy.</p><h4>Chatbots and Virtual Assistants</h4><p>Generative AI plays a pivotal role in augmenting the conversational capabilities of virtual agents. Virtual assistants generate contextually <strong>relevant and human-like responses</strong> to customer queries by leveraging Generative AI models, thereby offering a seamless and personalized customer experience.</p><p>Virtual agents deliver personalized and tailored responses based on individual customer preferences, ensuring consistent, <strong>standardized interactions </strong>across various touchpoints.</p><h4>Trading and Investment Strategies</h4><p>Generative AI models excel in generating trading signals and identifying investment opportunities. By analyzing extensive historical market data, these models identify patterns, trends, and correlations that may <strong>elude human traders or investors</strong>. Generative AI empowers data-driven decisions, helping traders and investors align with their objectives effectively.</p><p>Generative AI facilitates the development of more efficient trading parameters and assists in creating <strong>customized investment portfolios </strong>tailored to customer-specific parameters.</p><h4>Compliance and Regulatory Reporting</h4><p>Generative AI automates complex <strong>regulatory analyses</strong>, streamlining compliance processes by analyzing vast data, interpreting regulations, and identifying potential compliance issues. It offers <strong>real-time monitoring</strong>, ensuring prompt actions for regulation adherence.</p><p>The technology may provide insights into <strong>Know Your Customer (KYC)</strong> compliance before approving an account, ensuring adherence to regulatory requirements.</p><h4>Cybersecurity and Risk Management</h4><p>Generative AI simulates cyberattacks, testing the effectiveness of security systems. It can <strong>replicate various attack scenarios</strong>, enabling financial institutions to assess vulnerabilities, identify security gaps, and enhance defenses. Generative AI-driven simulations offer valuable insights into existing security measures’ effectiveness.</p><p>Monitoring network traffic, user behavior, and system logs allows Generative AI to <strong>detect suspicious activities </strong>or breaches. Immediate response mechanisms, such as isolating affected systems or alerting security teams, are initiated when threats are detected.</p><h4>Risks and Challenges of Generative AI in Finance Industry</h4><p><strong>Compliance: </strong>Generative AI may struggle to simulate rapidly changing regulatory environments.</p><p><strong>Model Hallucinations: </strong>Models can provide authoritative-sounding answers even when unsure. LLM models currently tend to produce authoritative-sounding answers to questions, even when it doesn’t know the answer.</p><p><strong>Black Box Thinking:</strong> The inner workings of models can be challenging to interpret. It can be difficult to interpret the output of the models or understand how they produced it.</p><p><strong>Biased Training Data:</strong> Bias from source data can be propagated in AI outputs. It is a phenomenon that happens when the model lacks sufficient data to train on.</p><p><strong>Numerical Accuracy: </strong>Generative AI isn’t designed for arithmetic calculations. Generative AI tools are primarily used to process and generate text and images. Their ability to generate numerical analyses with the accuracy required in finance is still evolving.</p><p><strong>Ethical Considerations: </strong>Generative AI outputs may contain biases or discrimination.</p><p><strong>Data Privacy and Security:</strong> Handling sensitive data carries risks of disclosure or misuse.</p><p><strong>Scalability and Integration: </strong>Integrating Generative AI across institutions must be seamless.</p><p><strong>Data Quality: </strong>High-quality training data is crucial for Generative AI effectiveness.</p><h4>Examples From the Banking Sector</h4><p>Prominent financial institutions, including Morgan Stanley, JPMorgan Chase &amp; Co., Brex, and ATP Bot, have embraced Generative AI to enhance their offerings, streamline operations, and empower data-driven decision-making processes.</p><p><strong>Morgan Stanley’s Next Best Action (NBA) Engine: </strong>Provides personalized investment recommendations and real-time operational alerts to clients, ensuring that clients are promptly informed about critical events such as margin calls, portfolio changes, and significant market fluctuations.</p><p><strong>JPMorgan Chase &amp; Co.’s ChatGPT-like Software: </strong>Analyzes Federal Reserve statements with a deep understanding of financial language.</p><p><strong>Brex’s AI-Enabled Insights: </strong>Offers real-time answers and insights to CFOs and finance teams with AI-powered insights to analyze spending patterns, optimize budget allocation, and visualize spending evolution through custom graphs and visualizations.</p><p><strong>ATP Bot’s AI-Quantitative Trading Bot Platform: </strong>Minimizes human error in trade execution and enhances investment efficiency. The platform analyzes real-time market data and utilizes natural language processing to extract valuable insights from news articles and other text-based data.</p><p><strong>JPMorgan Chase’s AI Investment Assistant IndexGPT: </strong>Utilizes AI to assist customers in investment decisions, enhancing the banking experience. It’s like having a personal advisor who’s really good with money.</p><p><strong>Example: Brex’s AI-Enabled Insights</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*b-JmVfJpk24StgRWYWOxqg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2babf9e5667" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kocdigital/generative-ai-in-finance-f2babf9e5667">Generative AI in Finance</a> was originally published in <a href="https://medium.com/kocdigital">KoçDigital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Ways That Data-as-a-Service (DaaS) Will Accelerate Your AI Journey]]></title>
            <link>https://medium.com/kocdigital/5-ways-that-data-as-a-service-daas-will-accelerate-your-ai-journey-d7c42bc5ceaf?source=rss----cac33c9f0c6c---4</link>
            <guid isPermaLink="false">https://medium.com/p/d7c42bc5ceaf</guid>
            <category><![CDATA[data-as-a-service]]></category>
            <category><![CDATA[data-preparation]]></category>
            <category><![CDATA[daas-providers]]></category>
            <category><![CDATA[data-preprocessing]]></category>
            <category><![CDATA[monitoring]]></category>
            <dc:creator><![CDATA[Yagmur Devir Taskin]]></dc:creator>
            <pubDate>Wed, 14 Jun 2023 09:39:55 GMT</pubDate>
            <atom:updated>2023-06-14T09:39:55.796Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*chvg2YRZb5C43_9S9-epQA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/de/@maxvdo?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Max van den Oetelaar</a> on <a href="https://unsplash.com/photos/buymYm3RQ3U?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Every AI story starts with data. Just as parents carefully provide their children with accurate and reliable information to help them navigate the world, developers approach data preparation for modeling with meticulous care. They gather, cleanse, and transform the data repeatedly until they achieve a satisfying format and content, to proceed confidently to the modeling step. That said, as time passes, it is nearly inevitable to encounter data challenges arising from the world’s dynamic nature. Phenomena such as data drift and concept drift will always be part of the equation, along with the emergence of new-generation data. Suddenly, you find yourself back at the initial step of your journey. That is where Data-as-a-Service (DaaS) can step in, providing valuable support throughout your data journey. Sometimes, it can even assume the role of a deus-ex-machina, offering solutions to your most challenging problems.</p><p>Whether you are a seasoned developer or just started to dip your toes in the AI waters, there are numerous ways in which DaaS can assist you. I have curated five compelling ways that can demonstrate the benefits of DaaS:</p><p>1) Quick Start on AI Projects:</p><p>Data preparation is arguably the most time-consuming component of an AI project. You need to know where to look, how to gather, and which sources are trustworthy, along with how to crawl and scrape from various sources.</p><p>DaaS provides a head start for your AI projects by offering pre-collected, pre-processed, and refined ready-to-use datasets, saving you valuable time and effort in the data gathering and preparation stages.</p><p>2) Offload Operational Worries:</p><p>Like a living organism, data is born, grows, and dies; that is almost always the logical expectation. Sources will change, new additions will be made, and new discoveries will make them irrelevant. Therefore, you must constantly manage, maintain and monitor your data flows and keep them up-to-date. With the increasing amount of input, that operational load will increase exponentially.</p><p>If you are sourcing your data from a DaaS provider, you don’t need to bother with the operational load of managing data. They carry most of the burden for you, and you can access various data from various sources as simple as selecting and ordering furniture from a catalog; the best part is you won’t wait as much for delivery, and you won’t need to assemble anything. Just use the API ( Application Programming Interface) provided, and you are good to go.</p><p>3) Cost Efficiency:</p><p>Data needs a space to reside, but why pay for a mansion if a generic living unit can fulfill your needs? As much as we treat the data as a living organism, it doesn’t need a comfortable place like us humans. In fact, efficiency is the key while storing and managing the data so that you are not using more resources than required. I also want to point out that if you aim for high efficiency, you won’t be just tightening your purse strings; you will also contribute to a greener environment by reducing your carbon footprint.</p><p>DaaS eliminates the need for substantial hardware investments. Instead of setting up and maintaining your data infrastructure, you can access data through the cloud-based DaaS platform. That reduces upfront costs and allows you to scale resources as needed, optimizing your cost structure while maintaining flexibility and scalability.</p><p>4) Data Recovery and Continuity:</p><p>When investing in something, it is preferable to seek reassurance, a safety net. Considering that data requires one of the most valuable and irreplaceable investments, which is time, companies are expected to employ ways to safeguard their data, such as backups and recovery systems, to prevent loss.</p><p>Data loss can be a significant setback in any AI project. However, with DaaS, you can have peace of mind knowing that your data is backed up and can be recovered at any time. DaaS providers implement robust data backup and recovery mechanisms, ensuring data continuity and minimizing the risk of irreversible data loss.</p><p>5) Focus on Innovation:</p><p>With data preparation, operations, and recovery is taken care of by your DaaS provider, you can allocate your time and resources to innovation and developing advanced AI models. Focus on exploring new ideas, experimenting with different algorithms, and becoming a pioneer in your field. Your DaaS platform will provide effortless access to the necessary data for your endeavors.</p><h3>DaaS will put data at your fingertips. Just breathe in the technological revolution and breathe out the innovation.</h3><p><a href="https://www.kocdigital.com/en-us/solutions/external-data-service-daas">https://www.kocdigital.com/en-us/solutions/external-data-service-daas</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7c42bc5ceaf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kocdigital/5-ways-that-data-as-a-service-daas-will-accelerate-your-ai-journey-d7c42bc5ceaf">5 Ways That Data-as-a-Service (DaaS) Will Accelerate Your AI Journey</a> was originally published in <a href="https://medium.com/kocdigital">KoçDigital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pricing Analytics with AI — Part 2]]></title>
            <link>https://medium.com/kocdigital/pricing-analytics-with-ai-part-2-f77ba7e4cff0?source=rss----cac33c9f0c6c---4</link>
            <guid isPermaLink="false">https://medium.com/p/f77ba7e4cff0</guid>
            <category><![CDATA[intelligent-purchasing]]></category>
            <category><![CDATA[pricing-intelligence]]></category>
            <category><![CDATA[advanced-analytics]]></category>
            <category><![CDATA[supply-chain-analytics]]></category>
            <dc:creator><![CDATA[Ozan Çevik]]></dc:creator>
            <pubDate>Thu, 25 May 2023 13:07:55 GMT</pubDate>
            <atom:updated>2023-05-25T13:07:55.645Z</atom:updated>
            <content:encoded><![CDATA[<h3>Pricing Analytics with AI — Part 2</h3><p>In the first post of this series, I wrote about how recession and inflation affect businesses and how we as KoçDigital offer help with decision making via our analytics services in such turbulent times.</p><p>Our next topic of interest will be “Can we automate Procurement with Autonomous or Semi-Autonomous Negotiations?”, but first I would like to introduce this new project of mine, which needs combining lots of external data, and mainly focuses on insights driven price deals and negotiation process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*LUOjDv9Utud2DvwKK6zXJw.jpeg" /></figure><h3>Spare Parts Purchasing Price Prediction Case</h3><h3>Problem Statement:</h3><p>Recently, I started this interesting price prediction project in which the customer is a <strong><em>leading global automobile manufacturer </em></strong>working with various suppliers. To achieve a more organized supplier operations, a dedicated team is assigned to each combination or category of suppliers. These teams are responsible for making purchase orders and price negotiations with vendors on a chosen portal.</p><p>The project deals with quite an elaborate set of external data (both open source and paid) varying from some go-to financials to sector-specific raw material prices. While internal know-how of the employees for this data set is extremely deep, but data contains some inaccuracies/errors and extreme outliers which are hard to define and detect even for this team. As a part of the project, we strenghthen the customer’s external data set by adding some financial conversions on certain currencies and future currency predictions which is included in our <a href="https://www.kocdigital.com/en-us/solutions/external-data-service-daas">DaaS, Data as a Service</a> product.</p><p><strong>The company wants to convince vendors with lower and more realistic prices empowered by strong AI-based algorithms and mathematically strong heuristics. Also, another significant goal of the company is to lower the annual budget with targeting to record positive price deals per order. Finally, for the company, combining these results via dashboards and systems integration to explain price predictions both for vendors and purchasing responsibles easily is another critical component of the project. In summary with this project company aims; </strong>(i) decision support activities related to negotiations with vendors (min %75–80 accuracy for all products); (ii) support budgeting and procurement planning activities; (iii) improve the performance of the annual supply chain budget with AI contribution around %10 reductions.</p><p>Methodology:</p><p>Since we have worked with 10 years of data, we applied common data cleaning algorithms and outlier detection models. All outliers and wrong data entries are marked/seperated with the consent of subject matter experts of customer teams. Our initial parts’ clustering methodology failed due to SAP ERP based master data BOM (Bills of Materials) structure inefficiency.</p><p>We used four machine learning algorithms which are LightGBM, XGboost, Elastic Net Regression and Artificial Neural Networks. For the accuracy metric we have selected weighted MAPE(wMAPE).</p><p>While searching academics and literature, I realised that AI based price prediction research focuses onSupply Chain field is limited. While there are different and valuable studies on electricity or commodity prices, for a pure automotive supply chain pricing problem I could only find Alalawin et al’s article. Also, demand prediction approaches are highly sophisticated and crowded in literature, however price prediction for finished products are lacking.</p><p>In “<a href="https://www.researchgate.net/publication/347793614_Forecasting_vehicle%27s_spare_parts_price_and_demand"><em>Forecasting vehicle’s spare parts price and demand</em></a><em>” the </em>research team concentrates on using Artificial Neural Network algorithms in the price and demand predictions in electric cars.</p><p>In our project data quality and failure in clustering force us to find more advanced techniques since our customer was asking to prove the external data relationship we applied correlation coefficient for all materials and all external data sources. After getting %80 +/ and -%80 correlation coefficients with the external factors we asked our customer to label each factor for the legitimacy of the causality whether those results are logical or a coincidence.</p><p>After receiving confirmation we have applied 4 core algorithms mentioned previously. We applied price segmented clustering (0–1,1–5,5–20…) for materials that do not have strong correlation coefficient and automatic pattern finding for external data.</p><p>Explaining those might be a little bit confusing, but the figures below represent the models fit clearly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AyaJIgCg1iVEhTuYUnn5NA.png" /><figcaption>3 Models that were run with 4 algorithms; LGBM,Elastic Net,ANN and XGBoost.</figcaption></figure><p>Results:</p><p>· Our results cover February-March 2023 price predictions and 12 months of past data which are used to test the accuracy of the results with completed deals.</p><p>· We have converted all data set in US dollars to make valid predictions.</p><p>Scores on average 12 months can be seen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KspGCHgV6yrwqKiDFitbFQ.png" /><figcaption>Even in demand forecasting projects those results are extremely hard to achieve. Pricing prediction with a large data set of 30–40 k lines is much more harder to guess. %84 accuracy for 12 months rolling is a strong validation.</figcaption></figure><p>Since we have quite accurate guesses, the company decided to show these predictions on the purchasing screen. Purchasers will decide whether to use AI-based prices in case those are in favour of their side. AI-predicted prices might be higher/lower than last month/week as these predictions will depend on external data patterns and historical changes in material prices.</p><p>Summary:</p><p>I strongly believe we will soon reach to the autonomous negotiations stage. AI based pricing with accurate analytical predictions will help both the manufacturers and their vendors.</p><p>Notes:</p><p>I want to thank <a href="https://medium.com/u/21faa4ea5cfa">Ceren Ispir</a> and <a href="https://medium.com/u/3cd928123e2">Doruk Ekşi</a> for their strong valuable efforts as Data Science team.</p><p>References:</p><p>Alalawin, Abdallah &amp; Arabiyat, Laith &amp; Alalaween, Wafa &amp; Qamar, Ahmad &amp; Mukattash, Adnan. (2020). Forecasting vehicle’s spare parts price and demand. Journal of Quality in Maintenance Engineering. ahead-of-print. 10.1108/JQME-03–2020–0019.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f77ba7e4cff0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kocdigital/pricing-analytics-with-ai-part-2-f77ba7e4cff0">Pricing Analytics with AI — Part 2</a> was originally published in <a href="https://medium.com/kocdigital">KoçDigital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Yeni Nesil İş Zekası]]></title>
            <link>https://medium.com/kocdigital/yeni-nesil-i%CC%87%C5%9F-zekas%C4%B1-f38f00aadae2?source=rss----cac33c9f0c6c---4</link>
            <guid isPermaLink="false">https://medium.com/p/f38f00aadae2</guid>
            <category><![CDATA[yeni-nesil]]></category>
            <category><![CDATA[i̇ş-zekası]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[türkçe]]></category>
            <category><![CDATA[bi]]></category>
            <dc:creator><![CDATA[Bayram Özşenel]]></dc:creator>
            <pubDate>Fri, 12 May 2023 07:35:57 GMT</pubDate>
            <atom:updated>2023-05-12T07:35:56.975Z</atom:updated>
            <content:encoded><![CDATA[<p>Tüm kurumlarda saklanan verilerin boyutu gün geçtikçe artıyor ve iş gereksinimleri daha fazla analizi ve dolayısıyla da verilerin daha detaylı depolanmasını gerektiriyor. Bu da çok büyük depolama alanlarına ihtiyaç olduğunu gösteriyor.</p><ol><li>Bu kadar büyük verinin olduğu bir ortamda insan kabiliyetleri ile analizler yapmak nasıl mümkün olabilir?</li><li>Veri kalitesi ve temizliğini sağlamak zorlaşıyor. Tutarlı, tarafsız ve ön yargılardan uzak verilere olan ihtiyaç artıyor. Çözüm ne olmalı?</li><li>İş zekası araçları ile çalışmak teknik kabiliyetler gerektiriyor. Bu durum iş zekası ile veri analizinin yaygınlaşmasını engelliyor. Bu konuda ne yapılabilir?</li></ol><p>Yukarıdaki sorulara gelişen trendleri inceleyerek cevap bulmaya ve bunları bir kaç başlık altında açıklamaya çalışalım.</p><p>İş zekası araçları günümüzde makine öğrenimi, NLP gibi konularla yakın ilişki içerisinde, yapılan yatırımlarla geleceğe hazırlanıyor. İş zekası ile yapay zeka teknolojileri arasında güçlü bir entegrasyon kuruluyor.</p><p>Klasik iş zekası yaklaşımı, şirketlerin mevcut durumu ile ilgili fotoğrafı ortaya koyarak, kararı tamamen yönetime bırakıyor. Ancak, yeni nesil iş zekası yaklaşımı, mevcut veriyi inceleyip, gelecekle ilgili “iç görü” dediğimiz tahminler yaparak yönetimin daha sağlıklı karar vermesine destek olmayı hedefliyor. Aşağıdaki görselde klasik iş zekası yaklaşımları ile yeni nesil iş zekası yaklaşımlarının karşılaştırmasını görebilirsiniz:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*M9Z0Q59ZQd0Ls34SPm35fQ.png" /></figure><p><strong>Yeni nesil iş zekası yaklaşımlarının unsurlarını teker teker inceleyelim:</strong></p><p><strong>Bulut tabanlı iş zekası</strong></p><p>Büyük verinin hayatımıza girmesi ile artık yalnızca bu veriyi depolamak yeterli olmuyor aynı zamanda veriyi hızlı bir şekilde analiz etmek ve çıktılar üretmek de çok önemli. Büyük veri ile kişisel bilgisayarlarda işlem yapmak çok mümkün olmuyor. Bunun yerine yüksek güçlü sunuculardan oluşan bulut sistemler tercih ediliyor. Bulut ortamlarda genellikle SaaS modelleri giderek yaygınlaşıyor ve bir çok iş zekası ürünü artık SaaS modeliyle hizmet veriyor. Bu sayede veriye internetin olduğu her ortamdan erişme imkanı oluyor. Bulut sistemleri, hem büyük verinin depolanabilmesi ve hızlı işlenebilmesi hem de bilgiye erişimin kolaylaşması açısından çok önemli bir adım olarak değerlendirebiliriz. Burada verinin güvenliği ve dış tehditlere karşı korunması konusunda çok sıkı tedbirler de var.</p><p><strong>Veri kalitesi</strong></p><p>TDWI(The Data Warehousing Institute)’un araştırmasına göre veri kalitesindeki problemlerin maliyeti yılda 600 milyar dolar’ı buluyor. Bu etki doğrudan maddi sonuçları ifade ediyor. Bir de buna kalitesiz veri ile yapılan raporlamalara göre alınan kararların yol açtığı hataları ve bozuk verinin düzeltilmesi için katlanılması gereken maliyetleri kattığımızda bu rakam çok daha büyük boyutlara ulaşıyor.</p><p>Bozuk veri ile oluşan raporlar ile alınan yanlış kararlar, kurumların ve yönetimlerin analitik yöntemlere olan güvenini de sarsıyor. Dolayısı ile veri kalitesi, hem bugün hem de gelecekte raporlamayı ve alınan kararları doğrudan etkileyen çok önemli bir faktör oluyor.</p><p>Veri kalitesini arttırmak için mümkün olduğu kadar insan emeğini azaltmak gerekir. Verilerin otomasyon sistemleri yardımıyla toplanması konusundaki çalışmalara hız verilmelidir.</p><p>Otomasyon ile oluşan veri hem sağlıklı bir şekilde depolanır, hem de herhangi bir manipülasyona uğramadan amacına hizmet edebilir. Yeni nesil iş zekası sistemlerinin, yapay zeka ile entegrasyonu sayesinde otomasyonla toplanan veriler makine öğrenimi algoritmaları ile veriyi öğrenir ve öğrendiği veriyi işleyerek sağlıklı “iç görüler” dediğimiz sonuçlar verebilir.</p><p>İnsan eli ile girilmesi gereken veriler de mutlaka olacaktır. Burada yöntem kurum içinde bir veri kalitesi ekibi oluşturup sorumluluk vermek olabilir.</p><p><strong>Otomasyonla veri toplama</strong></p><p>Amaç, veriyi mümkün olduğu kadar otomasyon ile toplamak ve İnsan faktörünü minimumda tutmak olmalıdır. Veri temizliği ve güvenilirliği açısından bu çok önemlidir. IoT, RPA gibi teknolojiler artık veriyi otomasyon süreçleri ile almaya imkan tanıyor. Bu durum verinin toplanması ve analize hazır hale getirilmesi için gerekli olan insan eylemlerini azaltarak hem ciddi bir verimlilik sağlıyor hem de veriye duyulan güveni artırıyor.</p><p><strong>Self Servis iş zekası</strong></p><p>Klasik iş zekası yaklaşımı, şirketlerin içerisinde merkezi bir veri ambarı kurmayı ve bu veri ambarı üzerinden ihtiyaç duyulan raporları IT birimlerinin hazırlayıp ilgili iş birimleri ile paylaşmasını esas alıyordu. Self servis kavramı, artık verinin otomasyon desteği ile analize hazır hale gelmesini ve iş zekası bilgisi olmayan kullanıcıların bile kendi analizlerini yapabileceği bir ortamı sağlamasını öngörüyor. Kullanıcıların kendi ihtiyaçlarını karşılayacak seviyede basit veri ile çalışacakları bir ortam sunuyor.</p><p><strong>Arttırılmış Analitik</strong></p><p>İş zekası , yapay zeka bileşenleri olan Doğal dil işleme (NLP) ve makine öğrenimi desteğiyle veri modellemesi süreçlerini otomatikleştirecek. Verilerin analizi, veri temizliği, farklı kaynaklardan gelen verilerin birleştirilmesi gibi insan emeği gerektiren konular büyük oranda otomatize edilecek. Bu sayede analistlerin çıktıları fiilen analiz etmeleri için çok daha fazla zamanı olacak.</p><p>Bu yöntemlerle, büyük miktarda verinin birbiri ile ilişkisi, bu ilişkilerin performanslı şekilde sunulması, sorgu performansının iyileştirilmesi, büyük veriler arasındaki ilişkilerin kullanıcıların talebi olmaksızın ya da akıllarına gelmeyecek şekilde analiz edilerek kullanıcılara iç görüler olarak sunulabilmesi sağlanacaktır.</p><p><strong>Doğal Dil İşleme (NLP)</strong></p><p>Doğal dil işleme teknolojilerinin iş zekası alanında kullanılmasıyla artık verilerin hikayesini oluşturmak çok daha kolay olacak. Bu gelişme ile veriler alındıktan sonra sorgulanıp anlaşılacak ve gelecek tahminlerini yapacak bir ortam sağlanmış olacak. Bu çıktılar, kullanıcılara herhangi bir görselleştirme yapmaksızın sesli ya da sohbet ara yüzleri aracılığıyla farklı dillerde sorular sormasına imkan tanıyacaktır. Sistem size tahmin edemeyeceğiniz farklı sonuçlar çıkartabilecek ve almanız gereken kararlarda önceden sizi yönlendirebilecektir.</p><p><strong>Analitik senaryolara eğilim</strong></p><p>Kullanıcılar verinin kaynaktan alınıp işlenip, önlerine gelene kadar tüm süreçleri otomasyona devrettikleri için tartışma becerileri ve analitik çıktıları değerlendirme istekleri daha da artacaktır. Bu durum dijital dönüşümün önemli bir parçası olan veri analitiğine olan ilgiyi de artıracaktır. Buna ek olarak artık büyük veriden daha nitelikli, derinlemesine incelemeler yapılmasıyla karar süreçlerinin kalitesi artacaktır.</p><p><strong>‘Daha’ büyük veri</strong></p><p>Büyük veri uzun bir süredir hayatımızda. Artık veri boyutları terabayt hatta petabyte’lar ile ifade ediliyor. Bu verilerin saklanmasının ve işlenmesinin klasik veri tabanı yaklaşımları ile yönetilmesi imkansız hale geliyor. Bilişsel motorlar vasıtası ile bu verilerin çok küçük boyutlara sıkıştırılarak saklanması ve işlenmesi zorunluluk haline geliyor. Toplanan verilerin makine öğrenmesi ve benzeri yöntemler aracılığı ile yorumlanması, neredeyse her kurumda zorunluluk haline gelmiş durumda.</p><p><strong>Tutarlı ve ön yargısız bir yaklaşım</strong></p><p>Klasik iş zekası yaklaşımında, raporların analiz edilmesi, işlenmesi ve sonrasında iş zekası araçları ile görselleştirilmesi süreçlerinde insan emeği önemli bir yer tutuyor. Proaktif iş zekası dediğimiz yeni nesil yaklaşımlarda bu süreçlerin tamamı makine tarafından yapılacağı için yöneticilerin önüne, kendi içinde sorgulamaya gerek kalmayacak kadar tutarlı veriler sunulacak, ön yargısız bir şekilde sorunların tespiti sağlanmış olacak ve yöneticilere bu çıktılara bakarak şirketin geleceği hakkında tarafsız kararlar alma imkanı sağlanacaktır. Bu durum şirketlerin şeffaf olarak sonuçlarını değerlendirmesi açısından hayati öneme sahip bir tablo ortaya koyacaktır.</p><p><strong>Sonuç:</strong></p><p>Teknoloji çok hızlı bir dönüşüm geçiriyor. iş zekası teknolojileri de bu yönde dijital dönüşüme ayak uydurmak zorundalar. Rapor ekranları üzerinde filtreler seçerek analizler yapmak yerine sohbet robotları ile konuşarak milyarlarca veriyi saniyeler içerisinde analiz etmek ve başarılı sonuçlar almak artık mümkün hale geliyor.</p><p>Örneğin bir sohbet robotuna satışlarınızın sezon bazlı dağılımını sorduğunuzda, size sadece bu bilgiyi değil; bununla birlikte hangi sezonda hangi ürünün satılması gerektiği, önümüzdeki 3 yıl içinde tahmini olarak hangi ürünlerin satışının artacağı, hangi ürünlerin satılmayacağı gibi “iç görü” dediğimiz bilgileri de vermesi etkileyici olmaz mı?</p><p>Bayram Özşenel</p><p>İş Zekası Danışmanı</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f38f00aadae2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kocdigital/yeni-nesil-i%CC%87%C5%9F-zekas%C4%B1-f38f00aadae2">Yeni Nesil İş Zekası</a> was originally published in <a href="https://medium.com/kocdigital">KoçDigital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rock, Paper and Scissors: Which one to go with?]]></title>
            <link>https://medium.com/kocdigital/rock-paper-and-scissors-which-one-to-go-with-784139a49228?source=rss----cac33c9f0c6c---4</link>
            <guid isPermaLink="false">https://medium.com/p/784139a49228</guid>
            <category><![CDATA[winning-strategies]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[games]]></category>
            <category><![CDATA[decision-making]]></category>
            <dc:creator><![CDATA[İhsancan Özpoyraz]]></dc:creator>
            <pubDate>Mon, 02 Jan 2023 08:54:31 GMT</pubDate>
            <atom:updated>2023-01-02T08:54:30.984Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*llYVOSkgH2w91rUhwKS5mQ.jpeg" /><figcaption>Rock, paper and scissors | Pavel Danilyuk — Pexels</figcaption></figure><p>Decision-making can be a daunting task. With so many variables at play, knowing which option is best can be tricky. Choosing between a steak, fish or vegetarian dish at a restaurant can be difficult, deciding which movie to watch on Netflix can be equally tedious, and picking the colour of the t-shirt you would buy for a friend can present you with a similarly hard task! What’s more, these examples do not even contain a high degree of uncertainty or risk. Most real-life decisions are much more complex than this and require us to weigh up countless factors and uncertainties to make a decision that is right for us. Business decision-making is no exception to this rule; however, it can pose even greater challenges due to the large number of people involved and the myriad of factors to be considered. Besides, risks such as financial losses or reputational damage need to be considered carefully when making decisions for businesses as the stakes are usually higher.</p><p>Artificial intelligence (AI) is becoming increasingly prevalent in business and has the potential to radically change the way we make decisions. AI gives us access to vast amounts of data that it analyzes and uses to make predictions about different outcomes. In business, the ability to accurately predict the outcomes of decisions is critical to success as managers need to balance risk and opportunity when making important operational or strategic decisions. For example, AI can help manufacturing companies identify potential machine failures before they become an issue and reduce operational downtime as a result. Failure estimations are then used to decide whether to replace machines or repair them to avoid costly delays. This technology, predictive maintenance, allows businesses to proactively manage their resources more efficiently and makes the decision-making process far more effective compared to traditional reactive approaches (e.g., run to failure). Today there is an increasing number of manufacturers adopting predictive maintenance and similar predictive analytics solutions to streamline their day-to-day operational decision-making process and make better informed data-driven decisions. However, it is important to bear in mind that AI will only be helpful to the extent of its accuracy. AI cannot be expected to solve all our problems and make accurate predictions all the time. Like all technologies, it has limitations and needs to be used in conjunction with human judgement and expertise to ensure that it is providing value.</p><p>In this blog post, we’ll explore the nature of decision-making under uncertainty and the impact of imperfect forecasts produced by AI. Moreover, the blog incorporates a mini-game — Rock, Paper and Scissors *— which aims to illustrate the concept of decision-making under uncertainty and how helpful the estimations (possibly provided by an AI) would be to overcome this inherent challenge. Even better, you can experience the mini-game yourself!</p><p>It’s almost impossible to develop a consistently winning strategy in this game because the outcome is dependent on chance and cannot be predicted in advance. However, let’s imagine for a second that we could develop a way to predict the opponent’s move, using some imaginary AI, before we started playing the game. Then, every time we played a round of RPS, we could work out which of the three shapes we should play to win that particular round. Nevertheless, it’s still possible that our opponent might choose to play a different shape than AI have predicted, in which case we might lose that particular round. After all, AI is never 100% accurate.</p><p>As part of this blog post, I programmed a mini-game of RPS to help illustrate this concept (using <a href="https://streamlit.io/">Streamlit</a> — an open-source framework that lets you turn Python scripts into shareable web apps in minutes). You can find links to the game as well as the source code at the end.</p><p>In the single-play mode, the game allows you (Player 1) to get estimates about the possible move of your opponent (Player 2) in the next round before the round starts. In this way, you can pick the winning move and hope to come out on top. The estimates are generated randomly however, an estimation accuracy that should be set by you at the beginning of the game is taken into account (the aim is to mimic an imperfect AI-powered predictive model). You can vary this percentage between 0% and 100% (the default setting is 70%). Eventually, the estimate could or not be correct on a single instance (unless you set the estimation accuracy to 100%) and relying on the estimate provided could let you either win or lose on the round (see below example which demonstrates a loss due to false estimation).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_w-Kn79kBQP5NyPX" /><figcaption>Image by the author</figcaption></figure><p>You can try it yourself. Go to the game, select ‘Single Play’ on the menu left-hand side, and follow the instructions to play.</p><p>Losing a game based on a false estimation does not mean estimations are useless. In the long run, the rate of your wins is expected to converge to the estimation accuracy that has been set at the beginning and you may anticipate dominating the opponent as the rounds continue (unless you set the estimation accuracy below 50%). For example, after the initial 10 rounds you may still not be dominating the game despite 70% estimate accuracy (e.g., 4 wins, 4 losses, 2 draws — see below example).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ay6Jm03fZVsX90vk" /><figcaption>Image by the author</figcaption></figure><p>However, as the game progresses and the number of rounds increases, you’re bound to get more wins and your rate of wins should eventually become closer to the estimation accuracy that has been set at the beginning (see below example with 1000 rounds).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uzXH9PqEE76tKLFP" /><figcaption>Image by the author</figcaption></figure><p>Go ahead and try this yourself; select ‘Simulation’ on the game menu and run a simulation. You can set the number of rounds (up to 1000). You will notice that the more rounds you play, the closer your winning rate will get to the estimation accuracy (unless you pick a strategy other than “rely on the estimation”). If you want to experiment with different outcomes, you can pick different strategies: Always rock, always paper, always scissors or random.</p><p>Essentially, if the estimations you get are proven to be reasonably reliable and you are consistent with a reasonable decision strategy (i.e., rely on the estimate and play accordingly), you can expect the strategy to pay off in the long run.</p><p>The nature of decision-making under uncertainty implies that we are never completely certain about the results of our decisions (even if there are forecasts available) and there is a certain amount of risk involved in making choices. Although AI would be helpful in most cases, we should not blame AI if the outcome of our decision that takes AI’s forecasts into account turns out to be negative on a single occasion.</p><p>For instance, a predictive maintenance solution may mislead maintenance engineers with a false positive failure alarm (i.e., an inaccurate alarm when there is actually no failure risk) or a false negative inaction (i.e., no alarm despite an actual failure risk). Engineers have to make consistent decisions about their maintenance plans based on a determined decision strategy. This strategy should also incorporate a policy about how to utilize AI’s inputs in any individual case. Occasionally, they may end up halting the production mistakenly to inspect a machine that AI pointed out with an alarm about a potential breakdown (or vice versa — miss a failure due to no alarm and deal with a production stoppage); similar to making a false “rock” move due to the expectation of a “scissors” move from the opponent while the actual move of the opponent is “paper”. However, single instances do not indicate that AI is less valuable. As the number of cases goes up, people who invest in AI should expect their consistency in a decision strategy to pay off with the help of reliable AI.</p><p>*Rock, paper and scissors (RPS) is a simple hand game that is played by two people. The game is often used as a way to make decisions or settle disputes. In the game, each player simultaneously forms one of three shapes with an outstretched hand. These shapes are “rock” (a closed fist), “paper” (a flat hand), and “scissors” (a fist with the index and middle fingers extended, forming a V). The winner of the game is determined by the rules of the game, which state that rock beats scissors, scissors beats paper, and paper beats rock. The game is often played as a series of rounds, with the winner of each round being the player who has played the shape that beats their opponent’s shape.</p><p><em>Link to the game:</em> <a href="https://iozpoyraz-rockpapersciss-game.streamlit.app/">https://iozpoyraz-rockpapersciss-game.streamlit.app/</a></p><p><em>Link to the game source code:</em> <a href="https://github.com/icanpoyraz/rockpaperscissors">https://github.com/icanpoyraz/rockpaperscissors</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=784139a49228" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kocdigital/rock-paper-and-scissors-which-one-to-go-with-784139a49228">Rock, Paper and Scissors: Which one to go with?</a> was originally published in <a href="https://medium.com/kocdigital">KoçDigital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>