<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged machine</title>
<link>https://coderlegion.com/tag/machine</link>
<description>Powered by Question2Answer</description>
<item>
<title>List Of Machine Learning (ML) Models</title>
<link>https://coderlegion.com/31328/list-of-machine-learning-ml-models</link>
<description>&lt;p&gt;Found this list while training it into my new personal LLM, its a list of machine learning (ML) models, with descriptions and settings. They are fairly easy to use if you are comfortable on the command line, but it's technical enough that it won't sound familiar to most people, so its good reading. If you want the full info, copy below this line into your favorite AI and say &quot;Take this list of ML models, research them and give me a description and use case for each.&quot; or tell it what you need to do and ask which one of these will do that. Learning just the 4 types and understanding that you chain multiple ones together with / without an LLM in the process. Warning too, frontier models will not write good training data for these just like all training data, will either flag you or just write generic bad data on purpose, so never ask it to make you training data unless its open source (deepseek, qwen etc).&lt;/p&gt;
&lt;p&gt;Ok so main purpose first, 4 categories:&lt;/p&gt;
&lt;p&gt;CLASSIFIERS - Take input, predict a category label (a string).&lt;br&gt;
Example: input = &quot;I want to cancel my account&quot;, output = &quot;cancellation&quot;&lt;/p&gt;
&lt;p&gt;Requires labeled training data: each training row has input + a string label.&lt;/p&gt;
&lt;p&gt;Specific Models: KNN (K-Nearest Neighbors), NAIVE BAYES (Gaussian Naive Bayes), DNN (Deep Neural Network / MultilayerPerceptron), RANDOM FOREST, TREE (Classification Tree), ADABOOST (Adaptive Boosting), LOGISTIC REGRESSION&lt;/p&gt;
&lt;p&gt;REGRESSORS - Take input, predict a number (a float).&lt;br&gt;
Example: input = [sqft, bedrooms, age], output = 350000.00&lt;/p&gt;
&lt;p&gt;Requires labeled training data: each training row has input + a numeric label.&lt;/p&gt;
&lt;p&gt;Specific Models: RIDGE (Ridge Regression), KNN REGRESSOR, SVR (Support Vector Regression), MLP REGRESSOR (Neural Network Regressor), GRADIENT BOOST&lt;/p&gt;
&lt;p&gt;CLUSTERERS - Take input, assign it to a group (integer cluster ID).&lt;br&gt;
Example: input = [age, income, spend], output = 2 (meaning cluster 2)&lt;/p&gt;
&lt;p&gt;No labels needed. The algorithm discovers groups on its own.&lt;/p&gt;
&lt;p&gt;Specific Models: KMEANS, DBSCAN, FUZZY C-MEANS&lt;/p&gt;
&lt;p&gt;ANOMALY DETECTORS - Take input, flag it as normal (0) or anomaly (1).&lt;br&gt;
Example: input = [transaction_amount, time, location], output = 1 (anomaly)&lt;/p&gt;
&lt;p&gt;Train on normal/clean data only. Anything that looks different gets flagged.&lt;/p&gt;
&lt;p&gt;Specific Models: ISOLATION FOREST, LOCAL OUTLIER FACTOR, ROBUST Z-SCORE&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/31328/list-of-machine-learning-ml-models</guid>
<pubDate>Fri, 16 Oct 2026 12:38:00 +0000</pubDate>
</item>
<item>
<title>Machine Vs Machine - The Future of Defence</title>
<link>https://coderlegion.com/11141/machine-vs-machine-the-future-of-defence</link>
<description>&lt;h3 id=&quot;this-is-no-longer-a-human-battlefield&quot;&gt;This Is No Longer a Human Battlefield&lt;/h3&gt;
&lt;p&gt;Critical infrastructure is no longer under threat from lone hackers, criminal groups, or even nation‑state teams operating at human speed. What we are witnessing now is something fundamentally different.&lt;/p&gt;
&lt;p&gt;Adversarial AI is actively targeting the systems that power civilization itself—electric grids, factories, water treatment plants, pipelines, rail networks, and transportation control systems. These attacks are not slow, manual, or linear. They are automated, adaptive, and relentless.&lt;/p&gt;
&lt;p&gt;The uncomfortable truth is this: &lt;strong&gt;humans are now the slowest component in the defense loop.&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;speed-decides-everything-in-ot&quot;&gt;Speed Decides Everything in OT&lt;/h3&gt;
&lt;p&gt;In IT security, seconds or minutes may be acceptable. In Operational Technology (OT) and Industrial Control Systems (ICS), milliseconds decide whether a process stabilizes or catastrophically fails.&lt;/p&gt;
&lt;p&gt;A voltage spike on a grid, a pressure anomaly in a pipeline, a timing deviation in a manufacturing line—these events evolve faster than any SOC analyst, incident commander, or on‑call engineer can meaningfully respond.&lt;/p&gt;
&lt;p&gt;Adversarial AI understands this.&lt;/p&gt;
&lt;p&gt;Modern attacks are increasingly designed to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Exploit control‑loop timing&lt;/li&gt;
&lt;li&gt;Manipulate sensor feedback&lt;/li&gt;
&lt;li&gt;Induce oscillations rather than outright failures&lt;/li&gt;
&lt;li&gt;Create cascading physical effects that appear “operational,” not cyber&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By the time a human notices, the damage is already unfolding.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;why-human-centric-defense-is-failing&quot;&gt;Why Human‑Centric Defense Is Failing&lt;/h3&gt;
&lt;p&gt;Most OT cybersecurity strategies still assume:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Alerts will be reviewed by humans&lt;/li&gt;
&lt;li&gt;Analysts will correlate logs&lt;/li&gt;
&lt;li&gt;Engineers will intervene manually&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This model is collapsing.&lt;/p&gt;
&lt;p&gt;Adversarial AI does not wait for change management windows. It does not respect shift rotations. It does not suffer fatigue, cognitive overload, or alert blindness.&lt;/p&gt;
&lt;p&gt;Meanwhile, OT environments suffer from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Sparse or delayed telemetry&lt;/li&gt;
&lt;li&gt;Legacy PLCs with no native security logging&lt;/li&gt;
&lt;li&gt;Safety systems that react too late to cyber‑induced anomalies&lt;/li&gt;
&lt;li&gt;Operators trained for mechanical failure, not algorithmic deception&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The result is a widening &lt;strong&gt;speed gap&lt;/strong&gt;—and adversarial AI is winning it.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-emergence-of-machine-vs-machine-warfare&quot;&gt;The Emergence of Machine vs. Machine Warfare&lt;/h3&gt;
&lt;p&gt;The future of OT and ICS cybersecurity is not human versus attacker.&lt;/p&gt;
&lt;p&gt;It is &lt;strong&gt;machine versus machine&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Defense systems must operate at the same temporal scale as the attack. That means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Autonomous detection of control‑logic manipulation&lt;/li&gt;
&lt;li&gt;Real‑time behavioral baselining of physical processes&lt;/li&gt;
&lt;li&gt;Automated response actions executed inside the control loop&lt;/li&gt;
&lt;li&gt;Continuous adaptation without human approval delays&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is not about replacing engineers. It is about allowing humans to set intent and boundaries—while machines fight the battle at machine speed.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-machine-intelligence-defense-looks-like&quot;&gt;What Machine Intelligence Defense Looks Like&lt;/h3&gt;
&lt;p&gt;A true machine‑driven OT defense system does not rely on logs or static signatures. It understands &lt;strong&gt;physics, process, and intent&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Key characteristics include:&lt;/p&gt;
&lt;h4 id=&quot;1-process-aware-intelligence&quot;&gt;1. Process‑Aware Intelligence&lt;/h4&gt;
&lt;p&gt;The system understands what &lt;em&gt;should&lt;/em&gt; be happening physically—not just what packets look like.&lt;/p&gt;
&lt;p&gt;A command may be valid syntactically, yet dangerous contextually. Machine intelligence must detect when actions violate safe operational envelopes.&lt;/p&gt;
&lt;h4 id=&quot;2-continuous-learning-without-drift&quot;&gt;2. Continuous Learning Without Drift&lt;/h4&gt;
&lt;p&gt;Defensive AI must learn normal behavior without normalizing slow‑burn attacks or attacker‑induced degradation. This requires constrained learning tied to engineering truth, not pure statistics.&lt;/p&gt;
&lt;h4 id=&quot;3-autonomous-response-authority&quot;&gt;3. Autonomous Response Authority&lt;/h4&gt;
&lt;p&gt;When milliseconds matter, the system must be allowed to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Block malicious commands&lt;/li&gt;
&lt;li&gt;Isolate compromised controllers&lt;/li&gt;
&lt;li&gt;Revert logic to known‑safe states&lt;/li&gt;
&lt;li&gt;Throttle or pause processes before safety systems trip&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Human approval comes &lt;strong&gt;after&lt;/strong&gt; stabilization, not before.&lt;/p&gt;
&lt;h4 id=&quot;4-conflict-resolution-between-machines&quot;&gt;4. Conflict Resolution Between Machines&lt;/h4&gt;
&lt;p&gt;As OT environments deploy optimization AI, safety AI, and security AI, defense systems must detect and resolve conflicts between autonomous agents before they escalate into physical risk.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;protecting-the-infrastructure-that-powers-civilization&quot;&gt;Protecting the Infrastructure That Powers Civilization&lt;/h3&gt;
&lt;p&gt;Power grids are no longer just energy systems—they are computational ecosystems.&lt;br&gt;
Factories are no longer mechanical—they are algorithmic.&lt;br&gt;
Water systems are no longer passive—they are automated decision engines.&lt;/p&gt;
&lt;p&gt;Every one of these systems is now a target.&lt;/p&gt;
&lt;p&gt;And every one of them must be capable of &lt;strong&gt;defending itself&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-new-role-of-humans&quot;&gt;The New Role of Humans&lt;/h3&gt;
&lt;p&gt;Humans are not obsolete—but their role must change.&lt;/p&gt;
&lt;p&gt;Humans should:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Define safety boundaries and response policies&lt;/li&gt;
&lt;li&gt;Train and validate machine defenders&lt;/li&gt;
&lt;li&gt;Investigate incidents after containment&lt;/li&gt;
&lt;li&gt;Govern autonomy and accountability&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Humans should &lt;strong&gt;not&lt;/strong&gt; be expected to out‑react adversarial AI in real time.&lt;/p&gt;
&lt;p&gt;That era is over.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;this-is-how-the-future-fights-back&quot;&gt;This Is How the Future Fights Back&lt;/h3&gt;
&lt;p&gt;The next phase of OT and ICS cybersecurity will not be won with more dashboards, more alerts, or more analysts.&lt;/p&gt;
&lt;p&gt;It will be won by:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Machine intelligence defending machine‑driven infrastructure—at machine speed.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is no longer a human battlefield.&lt;/p&gt;
&lt;p&gt;This is how the future fights back.&lt;/p&gt;
</description>
<category>Videos</category>
<guid isPermaLink="true">https://coderlegion.com/11141/machine-vs-machine-the-future-of-defence</guid>
<pubDate>Thu, 05 Feb 2026 19:13:34 +0000</pubDate>
</item>
<item>
<title>State Management Made Easy with Fluxor in Blazor</title>
<link>https://coderlegion.com/2807/state-management-made-easy-with-fluxor-in-blazor</link>
<description>&lt;p&gt;&lt;strong&gt;Exploring Actions, Effects, and the Benefits of Fluxor&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Modern web applications are becoming increasingly complex, and with complexity comes the need for structured state management. In the world of Blazor a popular .NET-based web UI framework .&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fluxor&lt;/strong&gt; offers a powerful yet easy-to-understand state container that brings predictable state flow to your applications.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fluxor&lt;/strong&gt; is a zero-boilerplate Flux/Redux library for Microsoft .NET.&lt;/p&gt;
&lt;p&gt;It brings the same clean architecture and unidirectional data flow popularized by Redux in the JavaScript ecosystem—adapted for C# developers building with Blazor.&lt;/p&gt;
&lt;p&gt;We’ll break down the core concepts of Fluxor and show how you can use Actions, Reducers, and Effects to create a clean, maintainable architecture.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/stevsharp/BlazorAndFluxorStateMachine&quot;&gt; Explore the GitHub project&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;️ What is Fluxor?&lt;/p&gt;
&lt;p&gt;Fluxor provides a structured and predictable way to manage state in your Blazor application. Inspired by Redux, it embraces:&lt;/p&gt;
&lt;p&gt; Unidirectional data flow — State changes follow a clear path: Action ➝ Reducer ➝ State ➝ UI.&lt;/p&gt;
&lt;p&gt; Single source of truth — All application state lives in a centralized, immutable store.&lt;/p&gt;
&lt;p&gt; Middleware &amp;amp; Effects — Separate side-effects like API calls from your UI and business logic.&lt;/p&gt;
&lt;p&gt;Unlike some Redux implementations, Fluxor handles a lot of the boilerplate for you with C#-friendly conventions and strong typing.&lt;/p&gt;
&lt;p&gt; Actions – Declaring Intent&lt;/p&gt;
&lt;p&gt;In both Redux and Fluxor, Actions are plain messages that describe what happened. They're just &lt;br&gt;
signals , they don’t contain logic.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public record FetchItemsAction;
public record FetchItemsSuccessAction(List&amp;lt;Item&amp;gt; Items);
public record FetchItemsFailedAction(string ErrorMessage);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;⚙️ Effects – Handling Side Effects&lt;/p&gt;
&lt;p&gt;Since Reducers must be pure, Effects in Fluxor allow you to perform async operations like API calls without cluttering your UI.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class ItemEffects
{
    [EffectMethod]
    public async Task HandleFetchItems(FetchItemsAction action, IDispatcher dispatcher)
    {
        try
        {
            var items = await itemService.GetItemsAsync();
            dispatcher.Dispatch(new FetchItemsSuccessAction(items));
        }
        catch (Exception ex)
        {
            dispatcher.Dispatch(new FetchItemsFailedAction(ex.Message));
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This Effect reacts to FetchItemsAction and handles fetching data from an external service.&lt;/p&gt;
&lt;p&gt; State and Reducers – Updating the Store&lt;/p&gt;
&lt;p&gt;Reducers are responsible for updating state in response to actions. They are pure functions and return a new state based on the action received.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public static class ItemReducers
{
    [ReducerMethod]
    public static ItemState OnFetchSuccess(ItemState state, FetchItemsSuccessAction action) =&amp;gt;
        state with { Items = action.Items, IsLoading = false };

    [ReducerMethod]
    public static ItemState OnFetchFailed(ItemState state, FetchItemsFailedAction action) =&amp;gt;
        state with { ErrorMessage = action.ErrorMessage, IsLoading = false };
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Reducers never mutate state—they return a new state object.&lt;/p&gt;
&lt;p&gt; Try It Yourself&lt;/p&gt;
&lt;p&gt;Check out the working example project to see all these concepts in action:&lt;br&gt;
 &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/stevsharp/BlazorAndFluxorStateMachine&quot;&gt;https://github.com/stevsharp/BlazorAndFluxorStateMachine&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It demonstrates:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Dispatching Actions from UI&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Handling async logic with Effects&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Clean Reducer logic&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Blazor component integration&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;✅ Why Use Fluxor?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;No boilerplate overload – clean C# syntax&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Clear, testable state transitions&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Great for scaling large Blazor apps&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Familiar to those who’ve used Redux in React or Angular&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Keeps business logic and UI concerns separate&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; References&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/mrpmorris/Fluxor&quot;&gt;Fluxor GitHub Repository&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://redux.js.org/&quot;&gt;Redux Official Site&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://angular-redux.js.org/&quot;&gt;Angular Redux&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/stevsharp/BlazorAndFluxorStateMachine&quot;&gt;Blazor Documentation – Microsoft&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;BlazorAndFluxorStateMachine – GitHub Sample&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;List item&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>C#</category>
<guid isPermaLink="true">https://coderlegion.com/2807/state-management-made-easy-with-fluxor-in-blazor</guid>
<pubDate>Fri, 25 Apr 2025 12:59:35 +0000</pubDate>
</item>
</channel>
</rss>