Concepts starting with R
219 concepts, each with a plain-language explanation, examples and diagrams. Pick a letter or open a concept.
- Rademacher Complexity — The chaining technique uses covering numbers to bound Rademacher complexity.
- Rademacher Complexity and Generalization Bounds — Rademacher complexity is a measure of the complexity of a set of functions or vectors.
- Rademacher Complexity for Linear Predictors — Hard-SVM's output w_S is defined by Equation (26.19) and satisfies L_S(w_S) = 0 under the theorem's assumptions.
- Rademacher Complexity of Linear Classes — The H1 proof reduces a Rademacher-complexity calculation to a finite-set problem.
- Raising and catching custom exceptions — The else block in exception handling runs only when the try block succeeds without raising an exception.
- Raising and Handling Exceptions — Custom exceptions are user-defined classes that inherit from Exception, enabling you to represent errors specific to your…
- Raising Exceptions — The try..except statement separates normal code (try block) from error-handling code (except blocks).
- Random Color Generation with the HSB Model — A JPanel subclass such as RandomStringsPanel draws its content inside the paintComponent() method, which the source describes as…
- Random Number Generation in Java — The main program fills the 16 by 20 grid with random colors first, then runs a while loop that repaints the current square and…
- Random Projection — The lemma gives a probabilistic guarantee that distances between vectors can be preserved after projection into a…
- Random Variables — D is the distribution; z ∼ D describes sampling from it.
- Random-Sample Q-Planning — Incremental planning breaks planning into small steps instead of requiring one uninterrupted calculation.
- random.choices() for Multiple Random Selections — random.choice() selects one element at random from a sequence by generating a random index and returning the element at that…
- random.randint() for Random Integers — random.choice() selects one element at random from a sequence by generating a random index and returning the element at that…
- Randomization in Algorithms — A shuffling algorithm aims to put the elements of an array into a random order, with the typical case being shuffling a deck of…
- Randomness in Programs — SimpleGraphicsStarter.java is the text's first example of a GUI program, meaning a program whose result is a graphical interface…
- Range and Null Space — Eigenvectors are non-zero vectors that a matrix transforms only by scaling.
- Ranking — Bipartite ranking is a two-label ranking problem involving relevant and non-relevant elements.
- Ranking Algorithms and Search Engine Fundamentals — PageRank is computed by running sprank.py, which iteratively calculates importance scores based on the link structure in your…
- Ranking and Complex Prediction Problems — Multiclass classification is classification into one of several possible target classes.
- Ranking Functions — A linear ranking function applies the same vector w to instances through f(x) = w · x.
- Ranking Performance Measures — Multiclass prediction can be reduced to binary classification, but the reduction must include a rule for combining binary outputs.
- Ranking Problems — A multiclass predictor must combine evidence for several possible classes into one output.
- Rate Limiting and Throttling Strategies — API keys are the mechanism vendors use to identify users and monitor their service consumption.
- Reading and Interpreting Error Messages — User-supplied comments in backup filenames provide context and improve file organization when managing multiple backups.
- Reading and Processing Files — A histogram is a frequency count stored in a dictionary, where keys are unique values (like email addresses) and values are…
- Reading and Understanding Error Messages — but that is much uglier and error-prone. Second, the conversion to string would be done automatically by the format method…
- Reading and writing byte streams — A copy program must use the byte streams InputStream and OutputStream because it cannot assume the file holds human-readable data.
- Reading and Writing Files — Invisible characters like spaces, tabs, and newlines can cause silent errors in file operations.
- Reading and Writing Files in Binary Mode — Binary files must be accumulated in a bytes buffer and cannot be printed as they arrive like text files.
- Reading and Writing Files with Subclasses of InputStream and OutputStream — Byte streams (InputStream and OutputStream) move binary data without translation, while character streams (Reader and Writer)…
- Reading and Writing Text Files — The newline character (\n) is a single invisible character that represents the end of a line, despite appearing as two symbols…
- Reading and Writing Text Files in Python — Main memory (CPU and RAM) is where programs execute and store data while running, but it is volatile—everything is erased when…
- Reading Basic Data Types With Scanner Methods — The Scanner class, in package java.util, was introduced to make reading basic data types from a character input source easier in…
- Reading Chapter-Based Syllabi — The supplied material describes a 14-week graduate introduction course.
- Reading Characters from a Reader — BufferedReader is a Reader that buffers input from a character-input stream, and any Reader can be wrapped in one to read full…
- Reading Data Back from a File — A version number in a file's first line tells a program which layout rules were used, and a higher number signals a newer format.
- Reading Data from Files: The read() and readline() Methods — The write() method puts data into a file exactly as provided and returns the character count written.
- Reading Element Attributes — The reader starts from a default background and an empty list of curves, then changes them as it walks the DOM, and only assigns…
- Reading Element Content from a Document — A DOM representation of an XML document is created in Java with two statements: one builds a DocumentBuilder through…
- Reading Entire Files into Memory — The file handle does not contain file data; it is a connection to the file on disk that the for loop uses to read data…
- Reading Entity-Relationship Diagrams — Primary and foreign keys are omitted from simplified data model diagrams because their placement follows an absolute…
- Reading Error Messages Effectively — Random walk programming—making random code changes without a hypothesis—is inefficient and often masks the real problem instead…
- Reading File Contents — Attempting to open a non-existent file raises a FileNotFoundError and prevents the program from obtaining a file handle.
- Reading File Contents with File Methods — Opening a file asks the operating system to locate the file by name and verify it exists and is readable.
- Reading Files and Iterating Over Lines — Parsing is the process of finding interesting lines in a file and extracting specific pieces of information from them.
- Reading Files in Python — A text file can be conceptualized as a sequence of lines, analogous to how a Python string is a sequence of characters.
- Reading Files Line by Line — The continue statement skips the rest of the current loop iteration and jumps back to the loop start, enabling efficient…
- Reading Files Line-by-Line with a for Loop — read() loads an entire file into a single string, including all newline characters, and exhausts the file handle resource after…
- Reading Files with UTF-8 Encoding — Use io.open with mode='wt' and encoding='utf-8' to write Unicode text to files.
- Reading JSON from Files with json.load() — json.loads() transforms a JSON string into a Python data structure by parsing the text and building corresponding lists…
- Reading Measurements with Single Units — Combined measurements such as '3 feet 7 inches' require one subroutine to read several number and unit pairs from a single line…
- Reading Numbers From the User With TextIO — TextIO reads from a file have no sensible recovery path, so when a read fails it throws an exception rather than fixing the…
- Reading Objects with ObjectInputStream — ObjectOutputStream is optimized to avoid writing the same object more than once; on a second encounter it writes only a…
- Reading Per-Class Evaluation Results — An eval set measures a model's performance, so its composition and labels shape the score you see.
- Reading Python Official Documentation — Square brackets in documentation indicate optional arguments; they are not part of the actual code.
- Reading Python Tracebacks — An AssertionError is raised when an assert statement's condition is False, and it appears in the traceback with the file name…
- Reading Research Papers Effectively — arXiv is a platform where recent research papers are listed, and the cs.LG recent listing is a practical way to see new machine…
- Reading Source References Critically — The source pack names the phrase Trading Margin for Moat and attributes it to an industry analyst of a16z, dated June 2025, with…
- Reading Text Data with Readers in Java — Buffering improves I/O efficiency by moving data in large chunks, which suits some devices better than reading individual bytes…
- Reading Text Files with urllib — Binary files require byte-for-byte copying from a remote URL to your local disk.
- Reading Text from Input Streams — A URL object identifies a resource; calling openConnection() on it returns a URLConnection.
- Reading Traces for AI Debugging — The per-trace loop starts by reading individual sampled traces with their actual input and actual output, rather than the…
- Reading Training Data Tables Critically — A token is a unit of text that a model reads, and dataset sizes are commonly reported as token counts, which roughly track the…
- Reading User Input — raw_input() captures text from the keyboard and returns it as a string to your program.
- Real-Time Optimization — An adaptive controller changes refinery operating parameters in real time.
- Real-Valued Prediction — Linear regression is used to model relationships between explanatory variables and a real-valued outcome.
- Realizability Assumption — Realizability demands perfect agreement between some hypothesis in H and a target labeling function.
- Realizable and Nonrealizable Learning — Finite classes contain a limited number of hypotheses, often because their representations are bounded.
- Realizable Assumption — PAC learnability is a definition involving a hypothesis class H, a function m_H, and a learning algorithm.
- Realizable Binary Classification — Realizable ERM for homogeneous halfspaces can be expressed as a feasibility problem.
- Realizable Compression Schemes — Compression in the unrealizable setting seeks minimum error within H, not necessarily zero error.
- Realizable Learning — Axis-aligned rectangles are rectangles in R^n whose sides are parallel to the axes.
- Realizable PAC Learnability — An ϵ-net turns a sample into a coverage guarantee for all sufficiently probable sets in a hypothesis class.
- Reasoning About Assignment Statements — A program is correct when it produces the correct result as specified, so correctness is always measured against a specification.
- Receptive Fields in Convolutional Networks — Subsampling replaces local groups of feature-map values with averaged summaries.
- Recognizing and Handling Infinite Loops — The break statement exits a loop immediately, skipping any remaining code in the loop body.
- Recurrent Artificial Neural Networks — Feedforward describes the absence of loops in an ANN's connections.
- Recurrent Networks with Keras — The supplied section places bidirectional recurrent layers within advanced techniques for recurrent neural networks.
- Recurrent Neural Networks — A language model learns the statistical structure of language by modeling possible next tokens.
- Recurrent Neural Networks for Sequence Modeling — Character-level generation learns the relationship between a fixed-length character context and the character that follows it.
- Recursion — A separate thread is useful for animation when the thread runs a recursive algorithm and the display must be redrawn many times…
- Recursion Basics: Base Case and Recursive Case — The Towers of Hanoi problem is easy to solve recursively because the problem contains smaller copies of itself: move N minus 1…
- Recursion in Threads — A Finish button cannot directly stop a recursive algorithm, because the click can arrive many levels deep in the recursion and…
- Recursion: Functions Calling Themselves — Nested function calls occur when one function invokes another during its execution, causing the first function to pause while…
- Recursive Definitions in Practice — A recursive definition uses the thing being defined as part of its own definition, and the source says this can be a very…
- Recursive Relationships of Value Functions — The action-value function qπ(s, a) evaluates a specific action in a specific state under a policy.
- References and Variables in Java — An object is garbage when no variable refers to it, and the system reclaims its memory
- References, Pointers, and Null in Java — Some languages do not require variables to be declared, so a misspelled name can silently create a new variable; Java requires…
- Regression — Supervised learning connects inputs with known targets through a collection of examples.
- Regression Testing for Prompt Changes — An eval set is a living artifact that must change as the team learns more about the customer's domain.
- Regret Analysis — An online convex optimization problem is defined by a convex hypothesis class, a domain, and a loss function convex in its first…
- Regret Bound — Online Gradient Descent applies a repeated prediction-and-update process to online convex learning problems.
- Regret in Online Learning — A hypothesis class with only two constant predictors is still vulnerable to an adversary that reacts to the learner's current…
- Regular Expression Basics: Character Classes and Anchors — grep stands for Generalized Regular Expression Parser. It is a command-line program built into Unix, Linux, and macOS systems…
- Regular Expression Flags and Options — Regular expressions are search strings with special characters that communicate matching criteria and extraction rules to a…
- Regular Expression Fundamentals — Parentheses in regex patterns create capturing groups that extract specific substrings from a match.
- Regular Expression Quantifiers and Repetition — grep stands for Generalized Regular Expression Parser. It is a command-line program built into Unix, Linux, and macOS systems…
- Regular Expression Syntax and Anchors — A grep simulator reads a file line by line, tests each line against a user-supplied regular expression, and counts how many…
- Regular Expressions — Always use raw strings when dealing with regular expressions. Otherwise, a lot of backwhacking may be required. For…
- Regular Expressions for Text Splitting — A tokenizer class implements encode and decode, and it holds a vocabulary that maps text tokens to integer IDs along with an…
- Regularization — Convexity of a learning problem has two requirements.
- Regularization and Overfitting — Tikhonov regularization augments the loss with λ ‖w‖2.
- Regularization in Deep Learning — Hyperparameters are architecture-level choices, such as layer count, units or filters, activation functions, and dropout rates…
- Regularization in Machine Learning — Soft-SVM preserves the margin constraint while allowing controlled violations.
- Regularized Learning Rules — Stability is about keeping output changes small when input changes are small.
- REINFORCE Algorithm — This practice section applies REINFORCE to gridworlds.
- REINFORCE Algorithm and Properties — The convergence argument for REINFORCE is based on the expected update, not on every individual episode.
- REINFORCE eligibility vector — A Bernoulli-logistic unit is a stochastic neuron-like unit for binary actions.
- REINFORCE Policy Gradient Algorithm — Exploration is necessary because a team needs varied collective actions in order to learn.
- REINFORCE: A Monte Carlo Policy Gradient Method — The convergence argument for REINFORCE is based on the expected update, not on every individual episode.
- Reinforcement Learning Agents and Environments — Do not identify the agent by tracing the outside of a robot's or animal's body.
- Reinforcement Learning and Accumulated Reward — Expected reward describes an average, but it does not by itself describe variance or risk.
- Reinforcement Learning and Animal Decision Processes — Model-free and model-based learning differ according to whether a model of the environment is used in decision-making.
- Reinforcement Learning and Animal Learning — The defining question is whether reinforcement depends on the animal's behavior.
- Reinforcement Learning and Artificial Intelligence — Reinforcement learning is connected to both mathematical disciplines and the sciences of biological learning.
- Reinforcement Learning and Behavioral Control — Habitual behavior is primarily triggered by antecedent stimuli.
- Reinforcement Learning and Neuroscience — Reinforcement learning concerns learning through interactions between an agent and its environment.
- Reinforcement Learning and Policy Improvement — Instrumental conditioning is learning in which consequences modify behavior.
- Reinforcement Learning and Prediction — A TD error expresses a prediction mismatch in a form used to update predictions.
- Reinforcement Learning and Reward Signals — Values forecast total reward over the future, while prediction errors describe mismatches between expectations and observations.
- Reinforcement Learning and Synaptic Weights — Synaptic efficacy describes how strongly neurotransmitter released at a synapse influences the postsynaptic neuron.
- Reinforcement Learning Applications — The section broadens reinforcement learning beyond its standard ideas by examining relationships with psychology and neuroscience.
- Reinforcement learning episodes — Episodic Semi-gradient Sarsa learns a value function by updating value-function weights θ during episodes.
- Reinforcement Learning for Acrobot Control — Sarsa controls the acrobot through repeated online interaction rather than through access to a simulator model.
- Reinforcement Learning for Recommendation Policies — Greedy optimization asks which recommendation is most likely to produce the next click.
- Reinforcement Learning Fundamentals — The survey extends reinforcement learning beyond its standard foundations.
- Reinforcement Learning Methods — A policy gradient method searches over parameter-defined policies rather than treating a value estimate as the primary search…
- Reinforcement Learning Optimality — Value functions evaluate expected returns under a specified policy.
- Reinforcement Learning Problem Overview — The Getting Started module contains the Getting Started chapter.
- Reinforcement Learning Problems — The central question is what model of the environment is available to the agent.
- Reinforcement Learning Updates — Reinforcement learning systems need generalization for broad AI and engineering applicability.
- Reinforcement Learning vs Supervised Learning — Unsupervised learning is concerned with finding hidden structure in unlabeled data.
- Relational Operators in Java — Boolean operators form complicated conditions from boolean values.
- Relaxing the Realizability Assumption — True error evaluates a prediction rule h with respect to labeled points drawn according to the probability distribution D.
- Relevance-Based Search — Ranking problems arrange instances by relevance rather than assigning an isolated label to one instance.
- ReLU Operations — An element-wise operation applies a rule independently to each tensor entry.
- Remote-First Engagements — The Scoping Phase is the first phase of a project and lasts a few days.
- Removing Elements by Value with remove — pop removes an element by index and returns it; del removes an element by index without returning it.
- Removing Nodes from a Linked List — Traversal moves through a linked list by following next pointers from the head until null is reached.
- Removing Punctuation from Text — The Python split() function preserves punctuation attached to words, treating 'soft!' and 'soft' as different tokens and…
- Replacing the Output Layer for Classification — The output tensor from the model has three dimensions: batch, one row per input token, and embedding values per token.
- Representation Learning — Deep learning extends machine learning by emphasizing successive learned representations.
- Representation Learning with Multiple Layers — The hypothesis space is the set of possible transformations or solutions available to a learning algorithm.
- Representational Power in Neural Networks — Recurrent dropout applies dropout in recurrent layers to fight overfitting.
- Representing Policies for Continuous Actions — A normal density describes how probability is distributed across possible real-valued actions.
- Requesting Exceptions — A framed exception request asks for a one-time, time-bounded exception, not a permanent change to the standard process.
- Requirements for AI System Deployment — The first filter for an AI project is whether the problem is one of the customer's top five priorities; the source says that if…
- Research Directions in Reinforcement Learning — Part III is the book's final move beyond standard reinforcement learning ideas.
- Researching a Company Before an Interview — The recruiter screen is the first filter, so it deserves real preparation rather than a casual approach.
- Reserved Keywords — Identifiers are names given to variables and other entities; they must follow strict syntax rules.
- Reserved Words and Keywords in Python — Exit the Python interpreter by typing quit() at the >>> prompt—the parentheses are essential.
- Residual Connections — A layer graph can branch and merge, but it must remain acyclic except for processing internal to recurrent layers.
- Responding to Menu Selections — A JMenuBar is a container for menus with no name and a no-parameter constructor; menus are placed in it with add(JMenu).
- Responding to Mouse Events in a GUI Program — A MouseEvent provides the cursor position through evt.getX() and evt.getY(), returned as integers measured from the top left…
- Responsibility Division in Object-Oriented Design — MVC divides a graphical component into Model, View, and Controller so that each object has one clearly defined role.
- Responsible Deployment of Reinforcement Learning — Optimization unpredictability is one part of the wider challenge of responsible reinforcement learning deployment.
- RESTful APIs and Data Exchange — XML (eXtensible Markup Language) is a text-based format for encoding structured, hierarchical data using custom tags that…
- Retrieving Data with SELECT — INSERT adds new rows to a table; specify the table, columns, and values.
- Retrieving Results from Futures — A Runnable is handed to an ExecutorService with execute, which returns as soon as the task is placed in a queue.
- Return Statements and Return Values — The return statement is used to return from a function i.e. break out of the function. We can optionally return a value from the…
- Return Values — The return statement is used to return from a function i.e. break out of the function. We can optionally return a value from the…
- Return Values and Function Output — Flow of execution is the order in which statements are executed, always proceeding from top to bottom.
- Return Values and How Functions Communicate Results — A function call redirects execution from the caller to the function body, then returns to the caller after the function completes.
- Return Values and Passing Data Between Functions — Nested function calls occur when one function invokes another during its execution, causing the first function to pause while…
- Return Values and the Return Statement — The return statement exits a function and optionally sends a value back to the code that called it.
- Returning Values from Functions — The return statement is used to return from a function i.e. break out of the function. We can optionally return a value from the…
- Returning Values from Methods — A linear search checks each item of an array in turn. It finishes as soon as it finds the item, and it can conclude the item is…
- Returns and Episodes in Reinforcement Learning — The methods differ only in how they select returns from episodes with repeated visits.
- Returns and Expected Discounted Rewards — Monte Carlo state-value estimation learns from complete observed returns rather than from a single outcome.
- Returns and Monte Carlo Prediction — TD(0) and Monte Carlo can disagree because they use different evidence from the same episodes.
- Returns and State Values — Episode data records what happened after states were observed.
- Returns and Value-Function Updates — λ identifies important endpoint cases of the λ-return.
- Returns in Reinforcement Learning — Continuing tasks describe agent-environment interactions that do not naturally divide into identifiable episodes.
- Reusable Parts and Clean Templates — A slice library is a moat for solo operators and small shops and a highway for larger teams, and it is valuable in both settings…
- Reusable Software Components — Bottom-up design begins with known problems rather than the overall problem as a single starting point.
- Revenue Recognition — A stage change alters what a company is allowed to do, including which early work can be booked as license revenue.
- Reviewing and Testing Code — Writing code is often only about 20 percent of the problem; the other 80 percent is testing, reviewing, deploying, and…
- Revisiting Neural Network Parameters — The total number of parameters in a neural network is the sum of the parameters in each layer.
- Revocation Procedures for AI Agents — In regulated environments the security team examines the identity layer most closely, so an FDE needs a working answer for how…
- Reward Baselines in Gradient Bandit Algorithms — Gradient bandit algorithms converge because their expected update is the gradient of expected reward.
- Reward Baselines in Reinforcement Learning — Stochastic gradient ascent updates preferences only after reward feedback arrives.
- Reward Prediction and Animal Learning — Classical conditioning is defined by the independence of the reinforcing stimulus from the animal's behavior.
- Reward Prediction Error — The TD error and phasic dopamine activity can show matching patterns under a defined set of assumptions.
- Reward Prediction Error Hypothesis — Dopamine neuron activity can shift from a reward to an earlier stimulus that predicts the reward.
- Reward Prediction Error Hypothesis Explained — Dopamine neuron activity is related to reward prediction error, not simply to reward delivery.
- Reward Signal — The reinforcement signal is the number that most directly guides changes in a policy or value function.
- Reward-Modulated Spike-Timing-Dependent Plasticity — REINFORCE and error backpropagation can support comparable learning in multilayer networks, but they use different processes.
- Reward-Modulated STDP — STDP makes synaptic change sensitive to the order and timing of neural spikes.
- Reward-Modulated Synaptic Plasticity — Eligibility traces connect earlier neural activity with a later learning consequence.
- Rewards and Penalties — A reward is an object or event that an animal will approach and work for.
- Rewards and Penalties in Reinforcement Learning — Exploration tests unfamiliar actions so the agent can improve future decisions.
- Rewards and Situations — Reinforcement learning asks how to map situations to actions to maximize a numerical reward signal.
- Rewards in Reinforcement Learning — Return turns a sequence of rewards into one quantity using a specified function.
- Ridge Regression — Feature manipulation transforms each original feature to create a resulting feature vector.
- Risk and Prediction Error — Approximation error is a limitation in what the model can capture.
- Risk Classification of AI Systems — The EU AI Act is Regulation 2024/1689, in force since August 1, 2024, with staged obligations through 2026 and 2027.
- Risk Functions — The learning objective is to minimize the risk function L_D.
- Risk of the Learned Hypothesis — Compare notions of learnability by asking what each definition is useful for.
- Risk-Sensitive Optimization — Optimization-based artificial intelligence can behave unpredictably because a system may discover paths to its objective that…
- RLM for convex-Lipschitz learning problems — Multiclass SVM handles several labels by scoring input-label pairs and selecting the largest score.
- Role of Echo in a Startup — An Echo is a domain rebel: someone who came from the domain, understands it deeply, and has concluded that the current way of…
- Role of Wrappers in AI Models — Anterograde amnesia in AI is a failure mode in which models do not learn from one session to the next and do not retain previous…
- Root Mean-Squared Error — Batch updating keeps all episodes seen so far and repeatedly presents that growing batch until convergence.
- Runnable Interface — A functional interface is a Java interface with a single abstract method, and Runnable is a standard example with one method, run.
- Running a Java Program — The JVM is a virtual computer, not a physical machine.
- Running a Java Program in Eclipse — A Java project in Eclipse is created from File, then New, then Java Project, where you choose a Project Name that can be anything.
- Running Analysis Programs on Processed Data — The three-database pipeline consists of content.sqlite (raw, uncompressed), gmodel.py (transformation program), and index.sqlite…
- Running Customer Discovery Interviews — A lead's role expands gradually, supported by a senior shadow who observes and gives specific feedback.
- Running Deep-Learning Code in a Cloud Environment — A recent NVIDIA GPU is recommended for faster execution, not required for running the examples.
- Running Java Programs From the Command Line — A jar file packs Java classes and resource files into one archive, and an executable jar names the class with the main() routine…
- Running Python in Interactive Mode — The standard procedure for writing Python programs consists of four steps: open an editor, type code, save as a .py file, and…
- Running Python Programs from the Command Line — A program written in a compiled language like C or C++ is converted from the source language i.e. C or C++ into a language that…
- Running Python prompt on Windows — Using the Windows command line to run the Python interpreter.
- Running Python Scripts — The interactive interpreter automatically prints expression results; scripts do not.
- Running Your First Program — A program written in a compiled language like C or C++ is converted from the source language i.e. C or C++ into a language that…
- Running Your First Python Program — Portability is Python's ability to run on many different operating systems without code changes, made possible by its…
- Running Your First Web Spider — spdump.py reads spider.sqlite and displays pages in a five-element tuple format: (incoming_links, old_rank, new_rank, page_id…
- Runtime and Optimization of Neural Networks — NP-hardness can arise in ERM implementation even for a network with one hidden layer and only four hidden neurons.