Variable kernel density estimation

Variable kernel density estimation

In statistics, adaptive or "variable-bandwidth" kernel density estimation is a form of kernel density estimation in which the size of the kernels used in the estimate are varied depending upon either the location of the samples or the location of the test point. It is a particularly effective technique when the sample space is multi-dimensional. == Rationale == Given a set of samples, { x → i } {\displaystyle \lbrace {\vec {x}}_{i}\rbrace } , we wish to estimate the density, P ( x → ) {\displaystyle P({\vec {x}})} , at a test point, x → {\displaystyle {\vec {x}}} : P ( x → ) ≈ W n h D {\displaystyle P({\vec {x}})\approx {\frac {W}{nh^{D}}}} W = ∑ i = 1 n w i {\displaystyle W=\sum _{i=1}^{n}w_{i}} w i = K ( x → − x → i h ) {\displaystyle w_{i}=K\left({\frac {{\vec {x}}-{\vec {x}}_{i}}{h}}\right)} where n is the number of samples, K is the "kernel", h is its width and D is the number of dimensions in x → {\displaystyle {\vec {x}}} . The kernel can be thought of as a simple, linear filter. Using a fixed filter width may mean that in regions of low density, all samples will fall in the tails of the filter with very low weighting, while regions of high density will find an excessive number of samples in the central region with weighting close to unity. To fix this problem, we vary the width of the kernel in different regions of the sample space. There are two methods of doing this: balloon and pointwise estimation. In a balloon estimator, the kernel width is varied depending on the location of the test point. In a pointwise estimator, the kernel width is varied depending on the location of the sample. For multivariate estimators, the parameter, h, can be generalized to vary not just the size, but also the shape of the kernel. This more complicated approach will not be covered here. == Balloon estimators == A common method of varying the kernel width is to make it inversely proportional to the density at the test point: h = k [ n P ( x → ) ] 1 / D {\displaystyle h={\frac {k}{\left[nP({\vec {x}})\right]^{1/D}}}} where k is a constant. If we back-substitute the estimated PDF, and assuming a Gaussian kernel function, we can show that W is a constant: W = k D ( 2 π ) D / 2 {\displaystyle W=k^{D}(2\pi )^{D/2}} A similar derivation holds for any kernel whose normalising function is of the order hD, although with a different constant factor in place of the (2 π)D/2 term. This produces a generalization of the k-nearest neighbour algorithm. That is, a uniform kernel function will return the KNN technique. There are two components to the error: a variance term and a bias term. The variance term is given as: e 1 = P ∫ K 2 n h D {\displaystyle e_{1}={\frac {P\int K^{2}}{nh^{D}}}} . The bias term is found by evaluating the approximated function in the limit as the kernel width becomes much larger than the sample spacing. By using a Taylor expansion for the real function, the bias term drops out: e 2 = h 2 n ∇ 2 P {\displaystyle e_{2}={\frac {h^{2}}{n}}\nabla ^{2}P} An optimal kernel width that minimizes the error of each estimate can thus be derived. == Use for statistical classification == The method is particularly effective when applied to statistical classification. There are two ways we can proceed: the first is to compute the PDFs of each class separately, using different bandwidth parameters, and then compare them as in Taylor. Alternatively, we can divide up the sum based on the class of each sample: P ( j , x → ) ≈ 1 n ∑ i = 1 , c i = j n w i {\displaystyle P(j,{\vec {x}})\approx {\frac {1}{n}}\sum _{i=1,c_{i}=j}^{n}w_{i}} where ci is the class of the ith sample. The class of the test point may be estimated through maximum likelihood.

NumPy

NumPy (pronounced NUM-py) is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays. The predecessor of NumPy, Numeric, was originally created by Jim Hugunin with contributions from several other developers. In 2005, Travis Oliphant created NumPy by incorporating features of the competing Numarray into Numeric, with extensive modifications. NumPy is open-source software and has many contributors. NumPy is fiscally sponsored by NumFOCUS. == History == === matrix-sig === The Python programming language was not originally designed for numerical computing, but attracted the attention of the scientific and engineering community early on. In 1995 the special interest group (SIG) matrix-sig was founded with the aim of defining an array computing package; among its members was Python designer and maintainer Guido van Rossum, who extended Python's syntax (in particular the indexing syntax) to make array computing easier. === Numeric === An implementation of a matrix package was completed by Jim Fulton, then expanded to support multi-dimensional arrays by Jim Hugunin and called Numeric (also variously known as the "Numerical Python extensions" or "NumPy"), with influences from the APL family of languages, Basis, MATLAB, FORTRAN, S and S+, and others. Hugunin, a graduate student at the Massachusetts Institute of Technology (MIT), joined the Corporation for National Research Initiatives (CNRI) in 1997 to work on JPython, leaving Paul Dubois of Lawrence Livermore National Laboratory (LLNL) to take over as maintainer. Other early contributors include David Ascher, Konrad Hinsen and Travis Oliphant. === Numarray === A new package called Numarray was written as a more flexible replacement for Numeric. Like Numeric, it too is now deprecated. Numarray had faster operations for large arrays, but was slower than Numeric on small ones, so for a time both packages were used in parallel for different use cases. The last version of Numeric (v24.2) was released on 11 November 2005, while the last version of numarray (v1.5.2) was released on 24 August 2006. There was a desire to get Numeric into the Python standard library, but Guido van Rossum decided that the code was not maintainable in its state then. === NumPy === In early 2005, NumPy developer Travis Oliphant wanted to unify the community around a single array package and ported Numarray's features to Numeric, releasing the result as NumPy 1.0 in 2006. This new project was part of SciPy. To avoid installing the large SciPy package just to get an array object, this new package was separated and called NumPy. Support for Python 3 was added in 2011 with NumPy version 1.5.0. In 2011, PyPy started development on an implementation of the NumPy API for PyPy. As of 2023, it is not yet fully compatible with NumPy. == Features == NumPy targets the CPython reference implementation of Python, which is a non-optimizing bytecode interpreter. Mathematical algorithms written for this version of Python often run much slower than compiled equivalents due to the absence of compiler optimization. NumPy addresses the slowness problem partly by providing multidimensional arrays and functions and operators that operate efficiently on arrays; using these requires rewriting some code, mostly inner loops, using NumPy. Using NumPy in Python gives functionality comparable to MATLAB since they are both interpreted, and they both allow the user to write fast programs as long as most operations work on arrays or matrices instead of scalars. In comparison, MATLAB boasts a large number of additional toolboxes, notably Simulink, whereas NumPy is intrinsically integrated with Python, a more modern and complete programming language. Moreover, complementary Python packages are available; SciPy is a library that adds more MATLAB-like functionality and Matplotlib is a plotting package that provides MATLAB-like plotting functionality. Although MATLAB can perform sparse matrix operations, NumPy alone cannot perform such operations and requires the use of the scipy.sparse library. Internally, both MATLAB and NumPy rely on BLAS and LAPACK for efficient linear algebra computations. Python bindings of the widely used computer vision library OpenCV utilize NumPy arrays to store and operate on data. Since images with multiple channels are simply represented as three-dimensional arrays, indexing, slicing or masking with other arrays are very efficient ways to access specific pixels of an image. The NumPy array as universal data structure in OpenCV for images, extracted feature points, filter kernels and many more vastly simplifies the programming workflow and debugging. Importantly, many NumPy operations release the global interpreter lock, which allows for multithreaded processing. NumPy also provides a C API, which allows Python code to interoperate with external libraries written in low-level languages. === The ndarray data structure === The core functionality of NumPy is its "ndarray", for n-dimensional array, data structure. These arrays are strided views on memory. In contrast to Python's built-in list data structure, these arrays are homogeneously typed: all elements of a single array must be of the same type. Such arrays can also be views into memory buffers allocated by C/C++, Python, and Fortran extensions to the CPython interpreter without the need to copy data around, giving a degree of compatibility with existing numerical libraries. This functionality is exploited by the SciPy package, which wraps a number of such libraries (notably BLAS and LAPACK). NumPy has built-in support for memory-mapped ndarrays. === Limitations === Inserting or appending entries to an array is not as trivially possible as it is with Python's lists. The np.pad(...) routine to extend arrays actually creates new arrays of the desired shape and padding values, copies the given array into the new one and returns it. NumPy's np.concatenate([a1,a2]) operation does not actually link the two arrays but returns a new one, filled with the entries from both given arrays in sequence. Reshaping the dimensionality of an array with np.reshape(...) is only possible as long as the number of elements in the array does not change. These circumstances originate from the fact that NumPy's arrays must be views on contiguous memory buffers. Algorithms that are not expressible as a vectorized operation will typically run slowly because they must be implemented in "pure Python", while vectorization may increase memory complexity of some operations from constant to linear, because temporary arrays must be created that are as large as the inputs. Runtime compilation of numerical code has been implemented by several groups to avoid these problems; open source solutions that interoperate with NumPy include numexpr and Numba. Cython and Pythran are static-compiling alternatives to these. Many modern large-scale scientific computing applications have requirements that exceed the capabilities of the NumPy arrays. For example, NumPy arrays are usually loaded into a computer's memory, which might have insufficient capacity for the analysis of large datasets. Further, NumPy operations are executed on a single CPU. However, many linear algebra operations can be accelerated by executing them on clusters of CPUs or of specialized hardware, such as GPUs and TPUs, which many deep learning applications rely on. As a result, several alternative array implementations have arisen in the scientific python ecosystem over the recent years, such as Dask for distributed arrays and TensorFlow or JAX for computations on GPUs. Because of its popularity, these often implement a subset of NumPy's API or mimic it, so that users can change their array implementation with minimal changes to their code required. A library named CuPy, accelerated by Nvidia's CUDA framework, has also shown potential for faster computing, being a 'drop-in replacement' of NumPy. == Examples == NumPy is conventionally imported as np. === Basic operations === === Universal functions === === Linear algebra === === Multidimensional arrays === === Incorporation with OpenCV === === Nearest-neighbor search === Functional Python and vectorized NumPy version. === F2PY === Quickly wrap native code for faster scripts.

Fuzzy mathematics

Fuzzy mathematics is a branch of mathematics that extends classical set theory and logic to model reasoning under uncertainty. Initiated by Lotfi Asker Zadeh in 1965 with the introduction of fuzzy sets, the field has since evolved to include fuzzy set theory, fuzzy logic, and various fuzzy analogues of traditional mathematic structures. Unlike classical mathematics, which usually relies on binary membership (an element either belongs to a set or it does not), fuzzy mathematics allows elements to partially belong to a set, with degrees of membership represented by values in the interval [0, 1]. This framework enables more flexible modeling of imprecise or vague concepts. Fuzzy mathematics has found applications in numerous domains, including control theory, artificial intelligence, decision theory, pattern recognition, and linguistics, where the modeling of gradations and uncertainty is essential. == Definition == A fuzzy subset A of a set X is defined by a function A: X → L, where L is typically the interval [0, 1]. This function is called the membership function of the fuzzy subset and assigns to each element x in X a degree of membership A(x) in the fuzzy set A. In classical set theory, a subset of X can be represented by an indicator function (also known as a characteristic function), which maps elements to either 0 or 1, indicating non-membership or full membership, respectively. Fuzzy subsets generalize this concept by allowing any real value between 0 and 1, thereby enabling partial membership. More generally, the codomain L of the membership function can be replaced with any complete lattice, resulting in the broader framework of L-fuzzy sets. == Fuzzification == The development of fuzzification in mathematics can be broadly divided into three historical stages: Initial, straightforward fuzzifications (1960s–1970s), Expansion of generalization techniques (1980s), Standardization, axiomatization, and L-fuzzification (1990s). Fuzzification generally involves extending classical mathematical concepts from binary (crisp) logic, where membership is determined by characteristic functions, to fuzzy logic, where membership is expressed by values in the interval [0, 1] via membership functions. Let A and B be fuzzy subsets of a set X. The fuzzy versions of set-theoretic operations are commonly defined as: ( A ∩ B ) ( x ) = min ( A ( x ) , B ( x ) ) {\displaystyle (A\cap B)(x)=\min(A(x),B(x))} ( A ∪ B ) ( x ) = max ( A ( x ) , B ( x ) ) {\displaystyle (A\cup B)(x)=\max(A(x),B(x))} for all x ∈ X {\displaystyle x\in X} . These operations can be generalized using t-norms and t-conorms, respectively. For example, the minimum operation can be replaced by multiplication: ( A ∩ B ) ( x ) = A ( x ) ⋅ B ( x ) {\displaystyle (A\cap B)(x)=A(x)\cdot B(x)} Fuzzification of algebraic structures often relies on generalizing the closure property. Let ∗ {\displaystyle } be a binary operation on X, and let A be a fuzzy subset of X. Then A is said to satisfy fuzzy closure if: A ( x ∗ y ) ≥ min ( A ( x ) , A ( y ) ) {\displaystyle A(xy)\geq \min(A(x),A(y))} for all x , y ∈ X {\displaystyle x,y\in X} . If ( G , ∗ ) {\displaystyle (G,)} is a group, then a fuzzy subset A of G is a fuzzy subgroup if: A ( x ∗ y − 1 ) ≥ min ( A ( x ) , A ( y − 1 ) ) {\displaystyle A(xy^{-1})\geq \min(A(x),A(y^{-1}))} for all x , y ∈ G {\displaystyle x,y\in G} . Similar generalizations apply to relational properties. For example, for example, for fuzzification of the transitivity property, a fuzzy relation R {\displaystyle R} on X {\displaystyle X} (i.e., a fuzzy subset of X × X {\displaystyle X\times X} ) is said to be fuzzy transitive if: R ( x , z ) ≥ min ( R ( x , y ) , R ( y , z ) ) {\displaystyle R(x,z)\geq \min(R(x,y),R(y,z))} for all x , y , z ∈ X {\displaystyle x,y,z\in X} . == Fuzzy analogues == Fuzzy subgroupoids and fuzzy subgroups were introduced in 1971 by A. Rosenfeld. Analogues of other mathematical subjects have been translated to fuzzy mathematics, such as fuzzy field theory and fuzzy Galois theory, fuzzy topology, fuzzy geometry, fuzzy orderings, and fuzzy graphs.

The Fractal Prince

The Fractal Prince is the second science fiction novel by Hannu Rajaniemi and the second novel to feature the post-human gentleman thief Jean le Flambeur. It was published in Britain by Gollancz in September 2012, and by Tor in the same year in the US. The novel is the second in the trilogy, following The Quantum Thief (2010) and preceding The Causal Angel (2014). == Plot summary == After the events of The Quantum Thief, Jean le Flambeur and Mieli are on their way to Earth. Jean is trying to open the Schrödinger's Box he retrieved from the memory palace on the Oubliette. After making little progress, he is prodded by the ship Perhonen to talk to Mieli, who turns out to be possessed by the pellegrini again. This time, Jean identifies Mieli's employer as a Sobornost Founder, Joséphine Pellegrini, and gets her to reveal how he got captured, thereby picking up the clues to make plans for his next heist. No sooner is that done than an attack comes from the Hunter. The ship and crew barely survived that, and Jean realizes that he has to find a better way to open the Box - fast. Mieli has been very quiet after they left Mars. She has given up almost everything to the pellegrini, even her identity, as she has promised to let the pellegrini make gogols of her in exchange for rescuing the thief. Yet, having to work with the thief is testing her, especially when the thief eventually does something even more unforgivable than stealing Sydän's jewel from her. In the city of Sirr, on an Earth ravaged by wildcode, Tawaddud and Dunyazad are sisters and members of the powerful Gomelez family. Tawaddud is the black sheep of the family, having run away from her husband and consorted with a notorious jinn, a disembodied intelligence from the wildcode desert. Now Cassar Gomelez, her father, hopes to get her to curry favor with a gogol merchant, Abu Nuwas, so that he has enough votes in the Council for the upcoming decision to renegotiate the Cry of Wrath Accords with the Sobornost. Soon, Tawaddud is embroiled in an investigation with a Sobornost envoy into the murder that triggered the need for her father to forge a new alliance in the first place, and forced to confront old secrets that will change Sirr forever. Somewhere else, in a bookshop and on a beach, a young boy is at play. His mother has told him not to talk to strangers, but there has never been anyone here before. Until now. Should he talk to them? == Influences == In the acknowledgments, Rajaniemi cites the influence of "Andy Clark, Douglas Hofstadter, Maurice Leblanc, Jan Potocki and [...] The Arabian Nights." === Self-loops === In the novel, the idea that the mind is a self-loop may have been influenced by the theories of the Professor of Philosophy, Andy Clark, and the book I Am a Strange Loop by Douglas Hofstadter. === Frame stories === The novel uses frame stories rather extensively, a feature also of The Arabian Nights and Jan Potocki's The Manuscript Found in Saragossa. Several characters in Sirr are the namesakes of characters in these two earlier works as well. The events in The Quantum Thief are also retold at least once by Jean le Flambeur in the course of the events in this novel. == Reception == The novel has received generally positive reviews. However, criticisms of the novel still revolve around Rajaniemi's uncompromising "show, don't tell" style. For example, Amy Goldschlager, writing for the Los Angeles Review of Books, suggested that "[a] bit more explication of the physics involved (“surfing the deficit angle”?) would really be helpful, more helpful than the description of the Schrödinger’s Cat problem given earlier in the book".

Plants vs. Zombies: Replanted

Plants vs. Zombies: Replanted is a 2025 tower defense video game developed by PopCap Seattle, The Lost Pixels, and published by Electronic Arts. It is a remaster of the 2009 game Plants vs. Zombies, introducing upscaled graphics and new additional content. Plants vs. Zombies: Replanted was released for video game consoles and personal computers on October 23, 2025. It received generally positive reviews from critics, but was criticized by the original game's development team for including fabricated concept art and for mishandling the soundtrack. == Gameplay == Plants vs. Zombies: Replanted follows the same gameplay of the original Plants vs. Zombies game with very minor changes. It is a lane-based tower defense game where the player has to defend their home from incoming zombies. The player can place various plants by spending "sun", the game's currency during levels. Sun icons can be collected from the sky during daytime and from sun-producing plants such as sunflowers. Some plants can attack zombies while some can act as defense. If all zombies are defeated in a level, the player wins. If a zombie reaches the left side of the line, a lawn mower—or other similar, relevant object—will activate and clear the row of any zombies, but if the lawn mower has already been used, and another zombie crosses, the game is over. === Replanted features === Plants vs. Zombies: Replanted contains up to 4K upscaled graphics and widescreen support, in comparison to the original game's static 800x600 resolution and 4:3 aspect ratio. Replanted now has full controller support and features local multiplayer modes ported from the original game's seventh generation console ports: co-op, where two players play together with assigned roles; and Versus, where one plays as the plants and the other as the zombies. No online multiplayer is planned, however support for Steam Remote Play was later added in a patch as an alternative for Windows users. Replanted also contains quality-of-life features. Gameplay can now be sped up by the player's will, with a max speed increase of 2.5x. Sun icons can now be mass collected using the "Sun Magnet." On Windows, players can quick-select plants from their seed bank using the number keys as hotkeys. Replanted also introduces two new additional game modes. "Cloudy Day" is a set of non-linear levels in the Adventure campaign. These levels only allow Sunflowers as sun-producing plants. During these levels, the amount of sun dropped from the sky and produced by plants are lowered. At certain times, rain clouds will move over the lawn. While these clouds are present, sun will stop appearing from the sky and from Sunflowers. However, all plants will cost around half their original price and have significantly faster recharge times. "R.I.P. Mode" is a harder difficulty of the Adventure campaign, but the player is forced back to the beginning if they lose a single level. Replanted additionally features "bonus levels" included as non-linear levels in the Adventure campaign. These include 10 new minigames that were previously unused in the original game. In a later update, Replanted added "Survival: Endless" levels to all five areas of the game instead of just the daytime pool. == Development == The existence of a Plants vs. Zombies remaster was revealed in an interview with Janet Robin from The String Revolution, who they did a vinyl collaboration with the franchise in 2025 with Iam8bit. Janet stated that EA commissioned them to record an acoustic composition of the track "Crazy Dave" to be used for an "anniversary edition" of the game. The song would be additionally be a tribute to the song "Bad Guy", which artist Billie Eilish has stated to be somewhat similar to the track. Plants vs. Zombies Replanted was officially announced in a Nintendo Direct presentation in late July 2025. As an incentive, people who pre-ordered the game are given an in-game retro-styled skin of the Peashooter. Replanted was showcased at PAX West on August 25, 2025. A dev diary for Plants vs. Zombies: Replanted was uploaded to YouTube on October 17, 2025. The video features Nick Reinhart, Jake Neri, and Matt Townsend. A developer panel for the game was available during TwitchCon 2025. == Release == Plants vs. Zombies: Replanted was released for Nintendo Switch, Nintendo Switch 2, PlayStation 4, PlayStation 5, Xbox One, Xbox Series X and Series S, and personal computers on October 23, 2025. It was leaked onto the internet on October 17, 2025. Players discovered multiple software bugs, and multiple assets alleged to be upscaled by generative artificial intelligence were found, leading to backlash. Numerous bugs were fixed in a day-one patch on October 23, 2025. == Reception == === Critical response === The versions of Plants vs. Zombies: Replanted for Windows, PlayStation 5, and Nintendo Switch 2 received "generally favorable" reviews from critics, according to review aggregator website Metacritic, while the Xbox Series X version received "mixed or average" reviews. According to OpenCritic, 57% of critics recommended it. IGN's Alessandro Fillari called it "a good way to get re-acquainted with one of the quirkiest puzzle-strategy games of the 2000s", while acknowledging its questionable decisions. Shacknews' David Craddock said it was his favorite version of Plants vs. Zombies, stating, "it packs everything fans loved about the original game, plus lots more" while justifying its US$20 price. The Verge described Replanted as "a time capsule from a simpler, happier time". Kyle Hilliard from Game Informer praised its faithfulness, complimenting the new animations and character designs that did not alter its memorability. Noah Hunter for Final Weapon described the remake as solid, though criticized the lack of certain features and containing bugs that gate it from being excellent. Ben Lyons from Gamereactor stated Replanted is the same as the original overall, despite believing the £18 price is not justified. === Original developers === Rich Werner, the original game's character designer, claims that some concept art contained in the game, speculated to be for Plants vs. Zombies: Garden Warfare (2014), did not originate from the original's development. Werner also stated that concept art for the Disco Zombie is fabricated; the design for the Disco Zombie was created after the estate of Michael Jackson requested the original Dancing Zombie, who resembles Michael Jackson from his Thriller music video, be removed from the game. On October 19, 2026, composer Laura Shigihara expressed her dissatisfaction with the lack of dynamic music in the game. Dynamic music would later be implemented in a later patch. In an interview featuring Rich Werner and user interface designer Matt Holmberg on April 29, 2026, Werner revealed that he and Shigihara were contacted by EA to make a music video to market Replanted. However, after the game was leaked, Werner's response on social media led EA to cancel the collaboration.

Cooliris (plugin)

Cooliris (for Desktop), formerly known as PicLens, was a web browser extension developed by Cooliris, Inc, and later acquired by Yahoo. The plugin provides an interactive 3D-like experience for viewing digital images and videos from the web and from desktop applications. The software places a small icon atop image thumbnails that appear on a webpage. Clicking on the icon loads the Cooliris 3D Wall, a browsing environment that gives the user the effect of flying through a three-dimensional space. Released to the public in January 2008, The New York Times described Cooliris as the "new immersive approach to Web navigation". Cooliris went out to win the 2008 Crunchies Award for Best Design. The plugin has received over 50 million downloads. As of May 2014 browser plugins are unavailable from the official website. There are only links to tablet apps - for iOS and Android.

Rumelhart Prize

The David E. Rumelhart Prize for Contributions to the Theoretical Foundations of Human Cognition was founded in 2001 in honor of the cognitive scientist David Rumelhart to introduce the equivalent of a Nobel Prize for cognitive science. It is awarded annually to "an individual or collaborative team making a significant contemporary contribution to the theoretical foundations of human cognition". The annual award is presented at the Cognitive Science Society meeting, where the recipient gives a lecture and receives a check for $100,000. At the conclusion of the ceremony, the next year's award winner is announced. The award is funded by the Robert J. Glushko and Pamela Samuelson Foundation. The Rumelhart Prize committee is independent of the Cognitive Science Society. However, the society provides a large and interested audience for the awards. == Selection Committee == As of 2022, the selection committee for the prize consisted of: Richard Cooper (chair) Dedre Gentner Robert J. Glushko Tania Lombrozo Steven T. Piantadosi Jesse Snedeker == Recipients ==