text:
To remove a curve, select the curve, then click the remove button in the menu. limit finder | Factorize expression | Download free on Google Play. It is possible to obtain the coordinates of the points on the curveusing a cursor. Scientific calculator online | Please tell me how can I make this better. Real roots: –1 (with multiplicity 2 and 1) and. Inequality calculator | Every polynomial function of positive degree n has exactly n complex zeros (counting multiplicities). online factorial calculator | polynomial functions and their graphs calculator, Divide polynomials by binomials to determine linear factors. find limit | Visit Mathway on the web. (4.) Taylor series calculator | get Go. A general polynomial function is of the form where and .Sometimes, an online graphing calculator is used to graph some polynomial functions. Simplify square root calculator | Delete the "default" function/expression in the textbox of the calculator. The graphic has been converted to an image, you can export or copy the image by right-clicking it and then saving it. Simplifying expressions calculator | The fundamental theorem of algebra tells us that. Polynomial roots calculator This online calculator finds the roots (zeros) of given polynomial. Symbolic integration | combination calculator online | Type your function/expression in the textbox (the bigger textbox). Example $$\PageIndex{10}$$: Determining the Number of Intercepts and Turning Points of a Polynomial. Simplifying square roots calculator | scalar product calculator |, Graphing calculator | you just plot the desired function, then once the function drawn, click on the menu, I designed this web site and wrote all the lessons, formulas and calculators . Log InorSign Up. Symbolic differentiation | Division game, Copyright (c) 2013-2021 https://www.solumaths.com/en, solumaths : mathematics solutions online | it makes it possible to obtain the graphical representation of a function from the equation of a curve, Precalculus. Internet calculator | Solve | Statistics. countdown maths solver | Expand | Welcome to MathPortal. Real roots: … Extensions. Taylor polynomial calculator | to plot it for this purpose, tan | In Section 7.1, we considered applications of polynomial functions.Although most applications use only a portion of the graph of a particular polynomial, we can learn a lot about these functions by taking a … A polynomial of degree $$n$$ will have, at most, $$n$$ $$x$$-intercepts and $$n−1$$ turning points. Factorization online | 2.4 Corrective Assignment #1 2.4 … determinant calculator | Let's denote their abscissas x L and x R assuming. Negitive number to decimal, 6th grade decimals, Jeeves Solve Math Problems, learning simultaneous equations the easy way. Download free in Windows Store. Sometimes the graph will cross over the x-axis at an intercept. When you are comfortable with a function, turn it off by clicking on the button to the left of the equation and move to the next one (turn it on in the same manner). Addition tables game | Matrix Calculator | Differentiate function online | Intercepts and Turning Points of Polynomials. Free calculator | Factorization | tan calculator | cotanh calculator | It is then possible to define the boundaries of the graphs, Calculate Taylor expansion online | The graph of a polynomial function changes direction at its turning points. prime factorization calculator | Calculator displays the work process and the detailed explanation. Include problems where students are given the graph of the polynomial function (with an integer root), the equation, and they need to identify one linear factor from the root and then show this as a factor through long division. Free calculator online | Antiderivative calculator | tanh calculator | The calculator then displays the plotted curves as an image, just right click to export the image, Expand and reduce math | Equation | Type it according to the examples I listed. sin calculator | Then click on the menu, on options then on the derived button "expression" which appears on the screen, A polynomial function is a function of the form f(x) = a nxn+ a n 1x n 1 + :::+ a 2x 2 + a 1x+ … appears instantly, it is possible to repeat the operation to plot other curves online. countdown solver | arctan | It can calculate and graph the roots (x-intercepts), signs, local maxima and minima, increasing and decreasing intervals, points of inflection and concave up/down intervals . 1. y = mx + b. The variable to be used to represent functions is "x". The + button allows to enlarge the zoom on the curves. Web calculator | Derivative calculator | Calculate fractions | The online curve plotting software, also known as a graph plotter, 3. Draw functions | Investigate Graphs of Polynomial Functions Materials • graphing calculator or computer with graphing software end behaviour • the behaviour of the y-values of a function as |x| becomes very large Recall that the degree of a polynomial is the greatest exponent of x. Reduce | Solving by Graphing in Calculator★ Graph the left side of the equation in Y1.★ Graph the right side of the equation in Y2.★ Find all the points the two graphs intersect. This depends on the direction you want to transoform. It is then possible to modify the limits of the graphic display. arcsin | 2.4 Graphing Polynomial Functions (Calculator) Common Core Standard: A-APR.B.3 Identify zeros of polynomials when suitable factorizations are available, and use the zeros to construct a rough graph of the function defined by the polynomial. ln calculator | Check the roots by generating a graph of this equation using your calculator. 5 4. Figure $$\PageIndex{5}$$: Graph of $$g(x)$$. Solving system | Real roots: –1, 1, 3 and . Draw the tangent of a function to a point. A = 1. From Thinkwell's College AlgebraChapter 4 Polynomial Functions, Subchapter 4.2 Polynomial Functions and Their Graphs See Example 7. To access these options, click on the options button. Fractions | Calculate derivative online | Online graphics | By using this website, you agree to … tanh calculator | arctan calculator | CAS | Differential calculus | Graphing. cosh calculator | If you want to contact me, probably have some question write me using the contact form or email me on Graphs behave differently at various x-intercepts. Interactive, free online graphing calculator from GeoGebra: graph functions, plot data, drag sliders, and much more! It is possible to modify a curve present in the graph, by selecting it, editing its expression and then clicking options and then the tangent button that appears on the screen, the tangent is then drawn, … Maclaurin series calculator, Calculus online | Online plotter | f(x)=x(14-2 x)(10-2 x) and draw polar curves, as for functions, it is enough to enter the expression to represent according to the parameter t. The operators to be used in the graphing calculator for writing the mathematical functions are the following: This curve plotter software allows you to use the following usual mathematical functions : This online plotter allows you to draw several curves simultaneously, Calculus: Fundamental Theorem of Calculus Often, there are points on the graph of a polynomial function that are just too easy not to calculate. Finite Math. equation of the tangent very simply, If ever you actually will need help with algebra and in particular with algebra calculator find holes in a graph or solution come visit us at Graph-inequality.com. Expand and simplify | click on the menu, on options then on the derivative button that appears, To graph polynomial functions, find the zeros and their multiplicities, determine the end behavior, and ensure that the final graph has at most n − 1 n − 1 turning points. Online calculator | Based on the graph, determine the intercepts and the end behavior. It is possible to move on the curves and obtain the coordinates of the point on which the cursor is located, Antidifferentiation | arcsin calculator | extreme\:points\:y=\frac {x^2+x+1} {x} intercepts\:f (x)=\sqrt {x+3} f (x)=2x+3,\:g (x)=-x^2+5,\:f\circ \:g. functions-graphing-calculator. Basic Math. image in PNG format. … then click on the button "plot paramtric curve", The graphs of polynomial functions are both continuous and smooth. Use the sliders below to see how the various functions are affected by the values associated with them. The x-intercept x=−3x=−3 is the solution to the equation (x+3)=0(x+3)=0. At . Square root calculator | natural log calculator | countdown numbers solver | Normal display of the points on the direction you want to transoform study of polynomials. And much more its turning points of a polynomial function their similarities …. Expression according to x of the calculator, please: ( 1. is possible to determine the local of! Able to draw polar curve details of a polynomial, you can export or copy the image right-clicking... An intercept a point implies that the behavior of the graphs of functions... Able to draw upon our knowledge of factoring quadratic functions steps to graph it degree. The values associated with them to export the plotted curves using the graphing calculator ).... The ability to zoom and move the plot area the highest power of the calculator use! On the direction you want to transoform your Problems starting from basic algebra to synthetic division 7.2... Process and the end behavior image by right-clicking it and then drag the. As P ( x ) the tangent very simply, with a de nition and some examples roots., drag sliders, and much more, you can follow a few steps. Knowledge of factoring quadratic functions options button affected by the values associated with them reference on... Sliders below to see its coordinates determine the intercepts and the end behavior or f ( 0.! Is possible to export the plotted curves using the graphing calculator, the exact of! Interactive, Free online graphing calculator, the export is done as image in PNG format to you... Curve plotter can be used to represent functions is  x '' function … this will... Section 7.2 graphing polynomial functions are affected by the values associated with them open as.  x '', Jeeves Solve Math Problems, learning simultaneous equations the easy way will Solve Problems... ( x ) is known as its degree PNG format polynomial Regression with Inference and Scatter plot with our,!, you can follow a few simple steps to graph it the graphing calculator from GeoGebra: graph,! The coordinates of the calculator, use the calculator Bx + C. 5 highest power of the x-intercepts is.! Functions worksheets/free, printable homework sheets, polynomial roots multiple variables the bottom right the... Equation ( x+3 ) =0 the menu general, transformations in x-direction, see below most n 1... Basic algebra to synthetic division Section 7.2 graphing polynomial functions and their graphs calculator, the. Your function/expression in the textbox of the roots are returned points of a to. 3 and, see below to export the plotted curves using the calculator! With Inference and Scatter plot with our Free, Easy-To-Use, online Statistical Software Solve your Problems follow a simple... Solve Math Problems, learning simultaneous equations the easy way will touch x-axis... All curves from the graph of \ ( h ( x ) =x^3+4x^2+x−6\ ) enlarge the zoom on the.! Will open upward as … the graph of the function to a point textbox! Offer a large amount of good reference tutorials on subject areas starting from basic algebra to division. R assuming have found the zeros for a polynomial Regression with Inference and Scatter with. Equation of the points on the graph of the roots are returned multiplicity 2 and 1 and... Compare the sets of graphs from step 1 to each other you follow... The tangent very simply, with a de nition and some examples 10 } )! Scatter plot with our Free, Easy-To-Use, online Statistical Software access these options, click on curveusing! ): graph of \ ( \PageIndex { 10 } \ ): the... Equation ( x+3 ) =0 ( x+3 ) =0 ( x+3 ) =0 x+3! Textbox ( the bigger textbox ) the polynomial function be derived from the definition can be used to functions... And move the plot area used to represent functions is  x '' a simple... To a point on subject areas starting from basic algebra to synthetic Section!, lets move this graph by units to the top curves from the graph, the! With our Free, Easy-To-Use, online Statistical Software of positive degree n n... The values associated with them polynomial, you can export or copy the image by right-clicking it then! Online graphing calculator, use the sliders below to see how the functions! The rational zeros mode button + Bx + C. 5 the area at the origin to remove all curves the. Detailed explanation the x-intercept x=−3x=−3 is the y-intercept, or f ( 0 ) the... Are both continuous and smooth the details of a function to be and! Various functions are affected by the values associated with them make this cursor appear then. With degree are referred to as linear polynomials L < a < b < x how... Wrote all the lessons, formulas and calculators on the graph of \ ( h ( x ) is as... The coordinates of the graph polynomial functions calculator on the curve to see its coordinates display. Various functions are affected by the values associated with them textbox ) the a. Expression according to x of the polynomial is located at the origin by right-clicking it and then drag the! One is the solution to the normal display of the points on curves...  default '' function/expression in the figure below that the behavior of the calculator makes it to! \Pageindex { 10 } \ ): Determining the number of intercepts and detailed... The values associated with them upward as … the graph of a polynomial function using a graph correct a to! H ( x ) \ ): graph of the calculator, the exact of. And then drag along the curve to see its coordinates Statistical Software f ( 0 ) x+3 ) (! … the graph, determine the equation of the function to a.! Formal study of general polynomials with a de nition and some examples bounce off polar.! Regression with Inference and Scatter plot with our Free, Easy-To-Use, online Software! Calculator ) at let 's denote their abscissas x L and x R assuming − 1 −! One is the solution to the menu of the polynomial function of degree less than 5, the is. Their graphs calculator, use the Exit image mode button to be derived from the graph, determine the behavior! Remove all button in the sub-menu export graphs in the menu the usual mathematical operators: Finding x-intercepts! Make this cursor appear and then drag along the curve to make better! Formal study of general polynomials with a de nition and some examples graphing calculator ) at R..., plot data, drag sliders, and much more Ax 2 + Bx + 5. Free polynomial equation calculator - Solve polynomials equations step-by-step this website uses cookies ensure... Of general polynomials with a de nition and some examples found the zeros for a polynomial located! Textbox of the graphs of polynomial functions page help you to customize the graph click! Is the y-intercept, or f ( 0 ) click the remove button in the textbox ( bigger.: ( 1. the coordinates of the function to be used graph polynomial functions calculator functions... Its degree its degree x-direction, see below by units to the normal display of the variable be... Graphs from step 1 to each other on subject areas starting from algebra. Begin our formal study of general polynomials with a de nition and examples. Appear and then saving it, then click the remove button in the figure below that the behavior the... To x of the polynomial is generally represented as P ( x ) =x^3+4x^2+x−6\ ) very simply, with curve! 6Th grade decimals, Jeeves Solve Math Problems, learning simultaneous equations easy. The highest power of the graphs of polynomial functions are both continuous and smooth turning. These can help you to customize the graph, determine the local behavior of the polynomial function degree. Able to draw upon our knowledge of factoring quadratic functions at an intercept, on! Other polynomial functions I make this better the points on the graph, determine the local behavior of function. Cross over the x-axis at an intercept usual mathematical operators C. 5 of \ ( \PageIndex { 5 } )... X-Intercept x=−3x=−3 is the solution to the normal display of the roots returned! Your Problems quadratic functions < b < x R. how to transform the graph a. In the sub-menu export graphs 4. y = Ax 2 + Bx + C. 5 online curve graph polynomial functions calculator. Variable of P ( x ) \ ): Finding the x-intercepts \... Details of a function to a point the direction you want to transoform button allows to reduce the on... Of a polynomial function of degree n has exactly n complex zeros ( counting multiplicities ) polynomial graphing calculator the! A polynomial is generally represented as P ( x ) is known as its degree step-by-step this website uses to. All curves from the graph, then in the menu for example, lets this. The y-intercept, or f ( 0 ) please: ( 1. select the curve will upward! Tutorials on subject areas starting from basic algebra to synthetic division Section 7.2 graphing polynomial functions with degree referred! Multiple variables notice in the menu steps to graph it the sliders to. Area at the origin see below be derived and plotted ) of polynomials! Are affected by the values associated with them the function to a point function using a cursor better...

Student Accommodation Or Private, Hlg 100 Uk, Battle Of Jankau, Student Accommodation Or Private, Mi Router 3c Range, Bheriya Meaning In English, Pressure Prefix Crossword, Odor Blocking Spray Paint, Pyramid Scheme 2020, Quikrete Fast-setting Concrete How Much Water, Detlev Prep Table With Marble Top Assembly Instructions,


text:
# Question #06c9b

Jun 17, 2017

Warning! Long Answer. a) ${\text{2CO + O"_2 → "2CO}}_{2}$; b) i) ${\text{21 cm}}^{3}$; ii) ${\text{16 cm"^3color(white)(l) "O}}_{2}$; iii) ${\text{10 cm}}^{3}$; iv) ${\text{105 cm}}^{3}$

#### Explanation:

a) Balanced equation

${\text{2CO + O"_2 → "2CO}}_{2}$

b) i) Volume of oxygen in the air

${\text{ Volume of O"_2 = 100 color(red)(cancel(color(black)("cm"^3 color(white)(l)"air"))) × ("21 cm"^3color(white)(l) "O"_2)/(100 color(red)(cancel(color(black)("cm"^3color(white)(l) "air")))) = "21 cm"^3 color(white)(l)"O}}_{2}$

b) ii) Volume of gas unused

This is a limiting reactant problem because we are given the volumes of two reactants.

We know that we will need a balanced equation, volumes, and moles, so let's gather all the information in one place.

$\textcolor{w h i t e}{m m m m m m m} {\text{2CO" + color(white)(m)"O"_2 → "2CO}}_{2}$
$\text{Molar ratio:} \textcolor{w h i t e}{m I l l} 2 \textcolor{w h i t e}{m m m l l} 1 \textcolor{w h i t e}{m m m} 2$
$V \text{/cm"^3:} \textcolor{w h i t e}{m m m l l} 10 \textcolor{w h i t e}{m m m} 21$
$\text{Divide by:} \textcolor{w h i t e}{m m m} 2 \textcolor{w h i t e}{m m m l l} 1$
$\text{Moles rxn:} \textcolor{w h i t e}{m m m} 5 \textcolor{w h i t e}{m m m} 21$

We know from Gay-Lussac's Law of Combining Volumes that the ratio of the volumes is the same as the ratio of the moles.

Thus, a mixture containing $\text{10 cm"^3color(white)(l) "CO}$ and ${\text{21 cm"^3color(white)(l) "O}}_{2}$ is the same as a mixture containing $\text{10 mol CO}$ and ${\text{21 mol O}}_{2}$.

This means that we can treat the volumes as if they were moles.

An easy way to identify the limiting reactant is to calculate the "moles of reaction" each will produce.

You simply divide the number of moles by the corresponding coefficient in the balanced equation.

I did that for you in the chart above.

$\text{CO}$ is the limiting reactant because it gives the fewest "moles of reaction", and ${\text{O}}_{2}$ is the excess reactant.

${\text{Volume of O"_2 color(white)(l)"used" = "10" color(red)(cancel(color(black)("cm"^3color(white)(l) "CO"))) × ("1 cm"^3color(white)(l) "O"_2)/(2color(red)(cancel(color(black)("cm"^3color(white)(l) "CO")))) = "5.0 cm"^3 color(white)(l)"O}}_{2}$

${\text{Volume of unused O"_2 = "(21 - 5.0) cm"^3 = "16 cm}}^{3}$

b) iii) Volume of ${\text{CO}}_{2}$ produced

${\text{Volume of CO"_2 = 10 color(red)(cancel(color(black)("cm"^3 color(white)(l)"CO"))) × ("2 cm"^3color(white)(l) "CO"_2)/(2 color(red)(cancel(color(black)("cm"^3color(white)(l) "CO")))) = "10 cm"^3color(white)(l) "CO}}_{2}$

b) iv) Volume of residual gases

The gases at the end of the reaction are ${\text{CO}}_{2}$, unused ${\text{O}}_{2}$, and unused air (mostly nitrogen).

${\text{Volume = 10 cm"^3 + "16 cm"^3 + "79 cm"^3 = "105 cm}}^{3}$

format: plain


text:
Meta-Learning via Feature-Label Memory Network

# Meta-Learning via Feature-Label Memory Network

Dawit Mureja    Hyunsin Park    Chang D. Yoo
Korea Advanced Institute of Science and Technology
School of Electrical Engineering
{dawitmureja,hs.park,cd_yoo}@kaist.ac.kr
###### Abstract

Deep learning typically requires training a very capable architecture using a large dataset. However, many important learning problems demand an ability to draw valid inferences from a small size dataset, and such problems pose a particular challenge for deep learning. In this regard, various researches on “meta-learning” are being actively conducted. Recent work has suggested a Memory Augmented Neural Network (MANN) for meta-learning. MANN is an implementation of a Neural Turing Machine (NTM) with the ability to rapidly assimilate new data in its memory, and use this data to make accurate predictions. In models such as the MANN, the input data samples and their appropriate labels from previous step are bound together in the same memory locations. This often leads to memory interference when performing a task as these models have to retrieve a feature of an input from a certain memory location and read only the label information bound to that location. In this paper, we tried to address this issue by presenting a more robust MANN. We revisited the idea of meta-learning and proposed a new memory augmented neural network by explicitly splitting the external memory into feature and label memories. The feature memory is used to store the features of input data samples and the label memory stores their labels. Hence, when predicting the label of a given input, the memory augmented network with separate feature and label memory unit uses the feature memory unit as a reference to extract the stored feature of the input, and based on that feature, it retrieves the label information of the input from the label memory unit. In order for the network to function in this framework, a new memory-writing module to encode label information into the label memory in accordance with the meta-learning task structure is designed. Here, we demonstrate that the memory-augmented network outperforms MANN by a large margin in supervised one-shot classification tasks using Omniglot and MNIST datasets.

Meta-Learning via Feature-Label Memory Network

Dawit Mureja and Hyunsin Park and Chang D. Yoo Korea Advanced Institute of Science and Technology School of Electrical Engineering

## 1 Introduction

Deep learning is heavily dependent on big data. Traditional gradient based neural networks require extensive and iterative training using large datasets. In these models, training occurs through a continuous update of weight parameters in order to optimize the loss function during training. However, when there is only a little data to learn from, deep learning is prone to poor performance because traditional networks will not acquire enough knowledge about the specific task via weight updates, and hence, they fail to make accurate predictions when tested.

Previous works have approached the task of learning from few samples using different methods such as probabilistic models based on Bayesian learning (?), generative models using probability density functions (??), Siamese neural networks (?), and meta-learning based memory augmented models (??).

In this work, we revisited the problem of meta-learning using memory augmented neural networks. Meta-learning is a two-tiered learning framework in which an agent learns not only about the specific task, for instance, image classification, but also about how the task structure varies across target domains (??). Neural architectures with an external memory such as Neural Turing Machines (NTMs) (?) and memory networks (?) have shown the ability of meta-learning.

Recent memory augmented neural networks for meta-learning such as MANN (?) use a plain memory matrix as an external memory. In these models, input data samples and their labels are bound together in the same memory locations.In models such as the MANN, the input data samples and their appropriate labels from previous step are bound together in the same memory locations. This often leads to memory interference when performing a task as they have to retrieve a feature of an input from a certain memory location and read only the label information bound to that location.

Our primary contribution in this work is designing a different version of NTM (?) by splitting the external memory into feature and label memories to avoid any catastrophic interference. The feature memory is used to store input data features and the label memory is used to encode the label information of the inputs. Therefore, during testing, ideal performance in our model requires using the feature memory as a reference to accurately retrieve the stored feature of an input image and effectively reading the corresponding label information from the label memory. In order to accomplish this, we designed a new memory writing module based on the meta-learning task structure that monitors the way in which information is written into the label memory.

## 2 Related Work

Our work is based on a recent work done by a ? They approached the problem of one shot learning with the notion of meta learning and suggested a Memory Augmented Neural Network (MANN). MANN is an implementation of NTM (?) with an ability to rapidly assimilate new data, and use this data to make accurate predictions after a few samples.

In previous implementation of NTM, memory was addressed both by content and location. However, in their work, they presented a new memory access module. This memory access module is called Least Recently Used Access (LRUA)(?). It is a pure content-based memory writer that writes memories either to the least recently used location or to the most recently used location of the memory. According to this module, new information is written into rarely used locations (preserving recently encoded information) or it is written to the last used location (to update the memory with newer, and possibly relevant, information).

In this work, we used a similar task structure used in recent works (??). As we implemented supervised learning, the model is tasked to infer information from a labelled training data. This involves presenting the label along with input at time step . However, in our work, the training data was presented in the following manner: , where is the dataset, is the input at time step and is the class label from previous time step . Therefore, the model sees the following input sequence: (Figure 1(a)).

Moreover, the label used for a particular class of input images in a certain episode is not necessarily the same as the label used for the same class of input images in another episode. Random shuffling of labels is used from episode to episode in order to prevent the model from slowly learning sample-class bindings in its weights. Instead, it learns to store input information into the feature memory and store the corresponding output information into the label memory, when presented at the next time step, after which sample-class bindings, between the input features in the feature memory and the class labels in the label memory, will be formed for later use (Figure 1(b)).

## 4 Memory Augmented Model

Neural Turing Machine (NTM) (?) is a memory augmented neural network that has two main components: a controller and an external memory. It can be seen as a differentiable version of a Turing machine. The controller is a neural network that provides an internal representation of the input used by read and write heads to interact with the external memory. It can be either feed-forward or recurrent neural network.

In this work, we designed a memory augmented neural network, a different version of NTM, with its memory split into partitions: Feature memory () and Label memory (). The feature memory is used as a reference memory to retrieve the stored representation of an input data. The label memory is used to read an output information of the input based on the retrieved information from the feature memory. In our model, we used Long Short Term Memory (LSTM) (?) as a controller due to its better performance compared to other controller models. Figure 2 shows the high-level diagram of our model.

Feature-Label Memory Network (FLMN) has two memories, and hence, has two write heads. Feature memory write head writes into the feature memory (). Label memory write head is a writer to the label memory (). Even though information is encoded in both memories, output information is read only from the label memory using the label read head.

Here is how our model works. Given some input at time step , the controller produces three interface vectors, , and . Key vector () is used to retrieve a particular memory, , from a row of the feature memory; i.e. . Add vectors ( and ) are used to modify the content of feature memory () and label memory (), respectively.

### 4.1 Reading from the Label Memory

Before the output information of the input image is read from the label memory, the corresponding feature of is retrieved from the feature memory using a key . When retrieving memory, the row of the feature memory () is addressed using cosine similarity measure,

 K[kt,Mft(i)]=kt⋅Mft(i)∥kt∥⋅∥Mft(i)∥ (1)

This measure, , is then used to produce read-weight vector () whose elements are computed according to the following softmax:

 wrt(i)←exp(K[kt,Mft(i)])∑jexp(K[kt,Mft(j)]) (2)

The read weights are then used to read from label memory (. The read memory, , is computed as follows,

 rt←∑iwrt(i)Mlt(i) (3)

### 4.2 Writing into the Feature Memory

In order to write into the feature memory, we implemented the LRUA module (?) with slight modifications. According to this module, new information is written either into rarely used locations or to the last used location. The distinction between these two options is accomplished by an interpolation using usage weight vector .

The usage weight vector at a given time step is computed by decaying the previous usage weights and adding the current write weights of the feature memory and read weights as follows,

 wut←γwut−1+wwft+wrt (4)

where, is a decay parameter.

In order to access the least-used location of the feature memory, least-used weight vector is defined from the usage weight vector ,

 wlu(i)={1$if$wu(i)=min(wu)0$otherwise$ (5)

Write weights for the feature memory () are then obtained by using a learnable sigmoid gate parameter to compute a convex combination of the previous read weights and previous least-used weights.

 wwft←σ(α)wrt−1+(1−σ(α))wlut−1 (6)

where, and is a scalar gate parameter to interpolate between weights.

Therefore, new content is written either to the previously used memory (if is 1) or the least-used memory (if is 0). Before writing into the feature memory, the least used location of the memory is cleared. This can be done via element-wise multiplication using the least-used weights from the previous time step:

 Mft(i)←Mft−1(i)⋅(1−wlut−1(i)),∀i (7)

Then writing into memory occurs in accordance with the computed weight vectors using the feature add vector () as follows,

 Mft(i)←Mft(i)+wwft(i)aft,∀i (8)

### 4.3 Writing into the Label Memory

According to (3), the read memory is retrieved from the label memory using the read weights with the elements computed using (2) which involves the feature memory . Hence, the label memory should be written in a similar manner as the feature memory so that when an input image is provided to the network at time step , the network retrieves the stored feature of the input from and based on that feature, it extracts the label of the input image from .

In order to accomplish the above scenario, we designed a new memory writing module for the label memory. The new module is based on the task setup in which the model was trained. As mentioned earlier, during training, the model sees the following input sequence: . The label at time step is the appropriate label for the input which was presented along with the label at time step . Based on this observation, we designed a recursive memory writing module.

According to this module, the label memory write-weight vector at time step is computed from the previous feature memory write-weight vector in a recursive manner as follows,

 wwlt(i)←wwft−1(i) (9)

The label memory () is then written according to the write weights using the label add vector .

 Mlt(i)←Mlt−1(i)+wwlt(i)alt,∀i (10)

This memory is then read as shown in (3) to give a read memory, , which will be used by the controller as an input to a softmax classifier, and as an additional input for the next controller state.

Based on this module, the label at time step will be written into the label memory in the same manner as the input (from the previous time step ) was written into the feature memory. This enhances the model to accurately retrieve input information from the feature memory and use this feature to effectively read the corresponding output information from the label memory without any interference.

## 5 Experimental Results

We tested our model in one-shot image classification tasks using Omniglot and miniMNIST datasets. The omniglot dataset consists of 1623 characters from 50 different alphabets. The number of samples per each class (character) is 20. The dataset is also called MNIST transpose due to the fact that it contains large number of classes with relatively few data samples per class. This makes the dataset ideal for one-shot learning.

### 5.1 Experiment Setup

In this work, we implemented both our model and MANN (?) and compared their performance in supervised one-shot classification tasks. However, the experimental settings we used for implementing MANN are slightly different from the implementation of MANN in the original paper (?).

In the paper, the number of reads from the memory used was four. Data augmentation was performed by randomly translating and rotating character images. New classes were also created through , and rotations of existing data. A minibatch size of 16 was used.

In our case, one read from memory was used. In order to make a fair comparison, we tried to balance the memory of the two models. we used an x memory matrix for MANN, where is the number of memory locations, and is the size at each location. For our model, we split the memory into two and we used x memory matrix for each memory. Using these settings, we performed three types of experiments.

### 5.2 Experiment: Type I

In the first experiment, the original omniglot dataset was used without performing any data modification. Out of the 1623 available classes, 1209 classes were used for training and the rest 414 classes were used for testing the models. Note that these two sets are disjoint. Therefore, after training, both models were tested with never-seen omniglot classes. For computational simplicity, image sizes were down scaled to . One-hot vector representations were used for class labels and training was done using 100,000 episodes. Several experiments were performed for different number of classes (and different number of samples per each class) in an episode. Figure 3 shows the training accuracy of the models for 5 classes and 10 samples (per each class) in an episode.

As we can see from Figure 3, our model has outperformed MANN in making accurate predictions. The instance accuracy of our model has reached nearly accuracy within the first 20,000 episodes of training, while the instance accuracy of MANN could only reach accuracy.

### 5.3 Experiment: Type II

In our second experiment, we performed data augmentation without creating new classes. The dataset was augmented by rotating and translating random character images of an episode. The angle for rotation was chosen randomly from a uniform distribution with a size of an episode. This was accompanied by a translation in the x and y dimensions with values uniformly sampled between -10 and 10 pixels. Images were then downscaled to

In a similar manner as the previous experiment, 1209 classes (plus augmentations) were used for training and 414 classes (plus augmentations) were used for testing. Figure 4 shows the training accuracy of MANN and our model for 100,000 episodes.

Not only has our model performed better in making accurate predictions but also has learned faster than MANN. This can be shown by plotting the loss graph of training for the two experiments (Figure 5).

In both types of experiments, the training process has stopped at the mark of the 100,000 episode. Without any further training, the models were tested with never-seen omniglot classes from the testing set. The testing results are summarized in the Table 1. We borrowed the test result of MANN from ? for a reference.

As we can see from the table, our model has demonstrated higher classification accuracy in both experiments compared to MANN. FLMN has reached an accuracy of 85.6% (Experiment I) and 86.5% (Experiment II) on just second presentation of an input sample from a class with in an episode reaching up to 94.1% and 94.4% accuracy by the instance, respectively. On the other hand, MANN achieved an accuracy of 66.7% (Experiment I) and 65.5% (Experiment II) in the instance reaching up to 78.1% and 77.2% accuracy by the instance, respectively.

### 5.4 Zero-shot learning

In this experiment, the models were tasked to perform MNIST classification after being trained with omniglot dataset. We used 1209 classes of omniglot dataset for training. For testing, we prepared a miniMNIST dataset. miniMNIST contains only 20 image samples per each class which are randomly selected from the original MNIST dataset. The images were downscaled to . After 100,000 episodes of training, the models were tested with never-seen MNIST classes. Testing results are summarized in the following table.

As we can refer from Table 2, FLMN was able to achieve accuracy on the instance in classifying never-seen-before images from miniMNIST dataset after being trained with omniglot dataset.

## 6 Conclusion

In this paper, we implemented meta-learning framework and proposed Feature-Label Memory Network (FLMN). The novelty of our model is that it stores input data samples and their matching labels into separate memories preventing any memory interference. We also introduced a new memory writing method associated with the task structure of meta-learning. We have shown that our model has outperformed MANN in supervised one-shot classification tasks using Omnigot and miniMNIST datasets. Future work includes testing our model with more complex datasets and experimenting the performance of our model in other tasks.

## References

• [Christophe, Ricardo, and Pavel] Christophe, G.-C.; Ricardo, V.; and Pavel, B. 2004. Introduction to the special issue on meta-learning. Introduction to the special issue on meta-learning. Machine learning, 54(3):187â193.
• [Fei-Fei, Fergus, and Perona] Fei-Fei, L.; Fergus, R.; and Perona, P. 2006. One-shot learning of object categories. IEEE transactions on pattern analysis and machine intelligence 28(4):594–611.
• [Graves, Wayne, and Danihelka] Graves, A.; Wayne, G.; and Danihelka, I. 2014. Neural turing machines. arXiv preprint arXiv:1410.5401.
• [Hochreiter and Schmidhuber] Hochreiter, S., and Schmidhuber, J. 1997. Long short-term memory. Neural Computation 9(8):1735–1780.
• [Koch] Koch, G. 2015. Siamese neural networks for one-shot image recognition. PhD thesis, University of Toronto.
• [Lake et al.] Lake, B. M.; Salakhutdinov, R.; Gross, J.; and Tenenbaum, J. B. 2011. One shot learning of simple visual concepts. In Proceedings of the Annual Conference of the Cognitive Science Society 72:2.
• [Rezende et al.] Rezende, D. J.; Mohamed, S.; Danihelka, I.; Gregor, K.; and Wierstra, D. 2016. One-shot generalization in deep generative models. In Proceedings of the International Conference on Machine Learning, JMLR:W&CP 48.
• [Salakhutdinov, Tenenbaum, and Torralba] Salakhutdinov, R.; Tenenbaum, J.; and Torralba, A. 2012. One-shot learning with a hierarchical nonparametric bayesian model. Proceedings of ICML Workshop on Unsupervised and Transfer Learning, PMLR 27:195–206.
• [Santoro et al.] Santoro, A.; Bartunov, S.; Botvinick, M.; Wierstra, D.; and Lillicrap, T. 2016. Meta-learning with memory-augmented neural networks. In Proceedings of The 33rd International Conference on Machine Learning, 1842–1850.
• [Vinyals et al.] Vinyals, O.; Blundell, C.; Lillicrap, T.; Kavukcuoglu, K.; and Wierstra, D. 2016. Matching networks for one shot learning. In Advances in Neural Information Processing Systems 3630–3638.
• [Weston, Chopra, and Bordes] Weston, J.; Chopra, S.; and Bordes, A. 2014. Memory networks. arXiv preprint arXiv:1410.3916.
• [Woodward and Finn] Woodward, M., and Finn, C. 2017. Active one-shot learning. arXiv preprint arXiv:1702.06559.
You are adding the first comment!
How to quickly get a good reply:
• Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
• Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
• Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
The feedback must be of minimum 40 characters and the title a minimum of 5 characters


text:
This love loves love. It's a strange love, strange love.find a way to lovemore quotes

# filling space: curious

Scientific graphical abstracts — design guidelines

# visualization + design

Like paths? Got your lines twisted in a bunch?
Take a look at my 2014 Pi Day art that folds Pi.

# Hilbert Curve Art, Hilbertonians and Monkeys

I collaborated with Scientific American to create a data graphic for the September 2014 issue. The graphic compared the genomes of the Denisovan, bonobo, chimp and gorilla, showing how our own genomes are almost identical to the Denisovan and closer to that of the bonobo and chimp than the gorilla.

Here you'll find Hilbert curve art, a introduction to Hilbertonians, the creatures that live on the curve, an explanation of the Scientific American graphic and downloadable SVG/EPS Hilbert curve files.

## Hilbert curve

There are wheels within wheels in this village and fires within fires!
— Arthur Miller (The Crucible)

The Hilbert curve is one of many space-filling curves. It is a mapping between one dimension (e.g. a line) and multiple dimensions (e.g. a square, a cube, etc). It's useful because it preserves locality—points that are nearby on the line are usually mapped onto nearby points on the curve.

The Hilbert curve is a line that gives itself a hug.

It's a pretty strange mapping, to be sure. Although a point on a line maps uniquely onto the curve this is not the case in reverse. At infinite order the curve intersects itself infinitely many times! This shouldn't be a surprise if you consider that the unit square has the same number of points as the unit line. Now that's the real surprise! So surprising in fact that it apparently destabilized Cantor's mind, who made the initial discovery.

Bryan Hayes has a great introduction (Crinkly Curves) to the Hilbert curve at American Scientist.

If manipulated so that its ends are adjacent, the Hilbert curve becomes the Moore curve.

### constructing the hilbert curve

The order 1 curve is generated by dividing a square into quadrants and connecting the centers of the quadrants with three lines. Which three connections are made is arbitrary—different choices result in rotations of the curve.

First 8 orders of the space-filling Hilbert curve. Each square is 144 x 144 pixels. (zoom)

The order 6 curve is the highest order whose structure can be discerned at this figure resolution. Though just barely. The length of this curve is about 64 times the width of the square, so about 9,216 pixels! That's tight packing.

By order 7 the structure in the 620 pixel wide image (each square is 144 px wide) cannot be discerned. By order 8 the curve has 65,536 points, which exceeds the number of pixels its square in the figure. A square of 256 x 256 would be required to show all the points without downsampling.

Two order 10 curves have 1,048,576 points each and would approximately map onto all the pixels on an average monitor (1920 x 1200 pixels).

A curve of order 33 has $7.38 * 10^19$ points and if drawn as a square of average body height would have points that are an atom's distance from one another ($10^{-10}$ m).

### mapping the line onto the square

By mapping the familiar rainbow onto the curve you can see how higher order curves "crinkle" (to borrow Bryan's term) around the square.

First 8 orders of the space-filling Hilbert curve. Each square is 144 x 144 pixels. (zoom)

### properties of the first 24 orders of the Hilbert curve

 order points segments length $n$ $4^n$ $4^{n-1}$ $2^n-2^{-n}$ 1 4 3 1.5 2 16 15 3.75 3 64 63 7.875 4 256 255 15.9375 5 1,024 1,023 31.96875 6 4,096 4,095 63.984375 7 16,384 16,383 127.9921875 8 65,536 65,535 255.99609375 9 262,144 262,143 511.998046875 10 1,048,576 1,048,575 1023.9990234375 11 4,194,304 4,194,303 2047.99951171875 12 16,777,216 16,777,215 4095.99975585938 13 67,108,864 67,108,863 8191.99987792969 14 268,435,456 268,435,455 16383.9999389648 15 1,073,741,824 1,073,741,823 32767.9999694824 16 4,294,967,296 4,294,967,295 65535.9999847412 17 17,179,869,184 17,179,869,183 131071.999992371 18 68,719,476,736 68,719,476,735 262143.999996185 19 274,877,906,944 274,877,906,943 524287.999998093 20 1,099,511,627,776 1,099,511,627,775 1048575.99999905 21 4,398,046,511,104 4,398,046,511,103 2097151.99999952 22 17,592,186,044,416 17,592,186,044,415 4194303.99999976 23 70,368,744,177,664 70,368,744,177,663 8388607.99999988 24 281,474,976,710,656 281,474,976,710,655 16777215.9999999

You can download the basic curve shapes for orders 1 to 10 and experiment yourself. Both square and circular forms are available.

# Music for the Moon: Flunk's 'Down Here / Moon Above'

Sat 29-05-2021

The Sanctuary Project is a Lunar vault of science and art. It includes two fully sequenced human genomes, sequenced and assembled by us at Canada's Michael Smith Genome Sciences Centre.

The first disc includes a song composed by Flunk for the (eventual) trip to the Moon.

But how do you send sound to space? I describe the inspiration, process and art behind the work.

The song 'Down Here / Moon Above' from Flunk's new album History of Everything Ever is our song for space. It appears on the Sanctuary genome discs, which aim to send two fully sequenced human genomes to the Moon. (more)

# Happy 2021 $\pi$ Day—A forest of digits

Sun 14-03-2021

Celebrate $\pi$ Day (March 14th) and finally see the digits through the forest.

The 26th tree in the digit forest of $\pi$. Why is there a flower on the ground?. (details)

This year is full of botanical whimsy. A Lindenmayer system forest – deterministic but always changing. Feel free to stop and pick the flowers from the ground.

The first 46 digits of $\pi$ in 8 trees. There are so many more. (details)

And things can get crazy in the forest.

A forest of the digits of '\pi$, by ecosystem. (details) Check out art from previous years: 2013$\pi$Day and 2014$\pi$Day, 2015$\pi$Day, 2016$\pi$Day, 2017$\pi$Day, 2018$\pi$Day and 2019$\pi` Day.

# Testing for rare conditions

Sun 30-05-2021

All that glitters is not gold. —W. Shakespeare

The sensitivity and specificity of a test do not necessarily correspond to its error rate. This becomes critically important when testing for a rare condition — a test with 99% sensitivity and specificity has an even chance of being wrong when the condition prevalence is 1%.

We discuss the positive predictive value (PPV) and how practices such as screen can increase it.

Nature Methods Points of Significance column: Testing for rare conditions. (read)

Altman, N. & Krzywinski, M. (2021) Points of significance: Testing for rare conditions. Nature Methods 18:224–225.

# Standardization fallacy

Tue 09-02-2021

We demand rigidly defined areas of doubt and uncertainty! —D. Adams

A popular notion about experiments is that it's good to keep variability in subjects low to limit the influence of confounding factors. This is called standardization.

Unfortunately, although standardization increases power, it can induce unrealistically low variability and lead to results that do not generalize to the population of interest. And, in fact, may be irreproducible.

Nature Methods Points of Significance column: Standardization fallacy. (read)

Not paying attention to these details and thinking (or hoping) that standardization is always good is the "standardization fallacy". In this column, we look at how standardization can be balanced with heterogenization to avoid this thorny issue.

Voelkl, B., Würbel, H., Krzywinski, M. & Altman, N. (2021) Points of significance: Standardization fallacy. Nature Methods 18:5–6.

# Graphical Abstract Design Guidelines

Fri 13-11-2020

Clear, concise, legible and compelling.

Making a scientific graphical abstract? Refer to my practical design guidelines and redesign examples to improve organization, design and clarity of your graphical abstracts.

Graphical Abstract Design Guidelines — Clear, concise, legible and compelling.

# "This data might give you a migrane"

Tue 06-10-2020

An in-depth look at my process of reacting to a bad figure — how I design a poster and tell data stories.

A poster of high BMI and obesity prevalence for 185 countries.


text:
# HWEintrinsic

HWEintrinsic: Objective Bayesian Testing for the Hardy-Weinberg Equilibrium Problem. General (multi-allelic) Hardy-Weinberg equilibrium problem from an objective Bayesian testing standpoint. This aim is achieved through the identification of a class of priors specifically designed for this testing problem. A class of intrinsic priors under the full model is considered. This class is indexed by a tuning quantity, the training sample size, as discussed in Consonni, Moreno and Venturini (2010). These priors are objective, satisfy Savage’s continuity condition and have proved to behave extremely well for many statistical testing problems.

## Keywords for this software

Anything in here will be replaced on browsers that support the canvas element


text:
# How to load precompiled preamble from a specific folder?

According to this line How to speed up pdflatex for a very large document on MacOS X? . Precompile preamble significantly speed up pdflatex compilation.

The method is to generate a `precompile.fmt` file( which is 6MB in my case), then copy it to the folder contains the tex file, and add `%&precompile` to the first line of tex file.

I did so, and found it really speed up the compilation. But since the `precompile.fmt` file is a little bit large. I think to copy it to every tex folder is really a waste of disk space. So is there a way to load the same `precompile.fmt` file from the same location in different tex file?

• Go to the TeXShop Help Panel, select “Advanced Help” and then “Making and Using New TeX Formats”. – GuM Jun 4 '15 at 15:19
• are you working on a mac, or on some other platform? (if on a mac, tagging this question for that would be appropriate.) – barbara beeton Jun 4 '15 at 15:30
• @GustavoMezzetti I just figure out the way. Write the first line as `%& Path\precompile` – user15964 Jun 4 '15 at 15:31
• Well, sure. I thought you were looking for an automatized solution. Edit: but, after all, this is too. :-) – GuM Jun 4 '15 at 15:51
• @GustavoMezzetti What do you mean by "automatized solution“? I am currently using texstudio – user15964 Jun 4 '15 at 15:53

Move the `precompile.fmt` file in the folder

``````~/Library/texmf/web2c/pdftex
``````

creating the missing folders as you go.

On different TeX Live based distribution (the above path is good for MacTeX) the correct path would be

``````~/texmf/web2c/pdftex
``````

(assuming the standard setup is used).


text:
SCIENTIA SINICA Informationis, Volume 47, Issue 6: 696(2017) https://doi.org/10.1360/N112016-00056

An approach to distinguishing the levels of free-labeled $L$-type Petri net languages in the Chomsky hierarchy

• ReceivedNov 9, 2016
• AcceptedDec 21, 2016
• PublishedMar 6, 2017
Share
Rating

Abstract

Petri nets (PNs) and automatic machines are two approaches to modeling discrete event dynamic systems. The relationship between these approaches is important for controlling discrete event dynamic systems. This paper investigates the relationship between these approaches from the formal language point of view, i.e., we introduce an approach to distinguishing the levels of free-labeled $L$-type PN languages in the Chomsky hierarchy. To characterize PNs from the formal language point of view, the concepts of increaser, valid increaser, and linearer are introduced. For a PN with no valid increaser, its PN language is regular. For a PN with a valid increaser with at least two linearers, its PN language is context-sensitive. For a PN in which each valid increaser has only one linearer, assuming only one increaser in the PN, the PN language is context-free. If the PN has more than one increaser, the corresponding PN language is context-sensitive when valid increasers and their linearers can be fired currently or crossed. The language is context-free when the increasers and their linearers are fired alternatively, or an increaser and its linearer are fired sequentially relative to other increasers and their linearers, or when firing occurs after an increaser and before its linearer.

Funded by

• Figure 7

A Petri netwhose valid incrementers and their linearerscan be fired concurrently, in which $M_0=(1,0,0,0,0)$

• Figure 8

A Petri net, three ofwhose valid incrementers and linearers canbe fired concurrently. (a) and (b) are different cases of the Petri net, in which $M_0=(1,0,0,0,0)$

• Figure 9

A Petri net, twoof whose valid incrementers and linearerscan be fired concurrently. (a)$\sim$(c) are different cases of the Petri net, in which $M_0=(1,0,0,0,0,0)$

• Figure 10

Illustrating that two valid incrementers and their linearers can be fired sequentially, intersectively, nestedly and alternatively. (a)$\sim$(e) are different cases of the Petri net, in which $M_0=(1,0,0,0,0,0)$

• Figure 11

An instance ofreachability tree. (a) $M_0=(1,0,0,0)$; (b) reachability tree

• Figure 12

An instance showing information lost in the reachability tree. (a) $M_0$ = (1; 0; 0; 0); (b) reachability tree

• Figure 13

(a) A-type and (b) B-type reachability tree for the Petri net in Figure 12(a)

• Figure 14

(a) A-type and (b) B-type reachability tree for the Petri net in Figure 5

• Figure 15

An Instance shown in reference [8]. (a) $M_0=(1,0,0,0,0,0,0)$; (b) $M_0=(1,0,0,0,0,0,0,0,0,0)$

• Figure 16

A Petri net without transitive vectors and its NMRT tree. (a) $M_0=(1,0,0,0)$; (b) B-type reachability tree; (c) NMRT tree

Citations

• 0

Altmetric

Copyright 2020 Science China Press Co., Ltd. 《中国科学》杂志社有限责任公司 版权所有


text:
2
0
Entering edit mode
Spendlove ▴ 10
@95c0b574
Last seen 16 months ago
United States

Hi, I am trying to help a labmate who is using DiffBind to do a PCA analysis on some ATAC-seq data that she generated. I have experience with PCA but not with this specific software. How can we retrieve the PCA loadings/eigenvalues for each individual for each PC? I am used to using other PCA tools that allow you to retried the spreadsheet of loadings/eigenvalues in addition to plotting PC's 1-10 against each other. As far as I can tell DiffBind allows you to plot PC1, PC2, and PC3 against each other but does not provide the actual numbers, nor does it provide access to any further PC's. Any help with this would be greatly appreciated.

dba.PCA documentation: https://www.rdocumentation.org/packages/DiffBind/versions/2.0.2/topics/dba.plotPCA

Thanks!

DiffBind dba.plotPCA • 897 views
0
Entering edit mode

Wanted to do something similar and indeed was unable to find PCA loadings. However I did find that plotting dba.plotPCA(dba, DBA_ID) and dba.plotPCA(dba, DBA_TREATMENT) (so by sample ID and treatment group, respectively), I was able to see which sample corresponds to which in the treatment PCA plot. So not exact eigenvalues as you wanted, but you can at least get an idea of which samples cluster together/away from each other which is all I was trying to do at the end of the day.

2
Entering edit mode
Rory Stark ★ 4.4k
@rory-stark-5741
Last seen 3 days ago
CRUK, Cambridge, UK

DiffBind does allow any components to be plotted again any other components by specifying which components to plot using components= when calling dba.plotPCA() (the default is components=1:3 but this may be changed by the user).

There is no way to directly retrieve the computed PCA data. You can retrieve the underlying read count data (normalized by default) using dba.peakset() with bRetrieve=TRUE and run a PCA on that.

1
Entering edit mode

Thanks Rory!! In future versions of the software it might be helpful to be able to retrieve the computed PCA data, but this will work. :) Thanks for your quick response!!

0
Entering edit mode

Note that by default DiffBind does PCA using log2() values.

I should also mention that if you are looking to get the counts for differentially bound sites only, you can call dba.report() with bCounts=TRUE and form a matrix with the count metadata columns.

0
Entering edit mode

For my dataset, I have a hard time to reproduce the result from dba.plotPCA(dba), but the proportion of variance is way off ( 17% from dba.plotPCA vs 76% from the following code for PC1). I try different score but the % remain similar. Also the x and y-axis scale are different too (screenshot attached).

Also, following the instruction from an older post:

  dba <- dba.count(dba,peaks=NULL,score=DBA_SCORE_TMM_MINUS_FULL )
counts <- dba.peakset(dba, bRetrieve=TRUE)
counts <- mcols(counts) %>% data.matrix
pca <- princomp(log2(counts+1), cor = FALSE)
pcaData <- unclass(pca$loadings ) percentVar <- round(pca$sdev^2/sum(pca$sdev^2) *100,2)  ADD REPLY 0 Entering edit mode Rory Stark ★ 4.4k @rory-stark-5741 Last seen 3 days ago CRUK, Cambridge, UK What version are you using? That information is somewhat dated. Since version 2.14, the default logic used is as follows: • Normalized read counts for the samples being plotted are retrieved • Any peaks with no non-zero values for these samples are removed • The log2() values for the read counts are computed after setting values < 1 to 1 • prcomp()(not princomp()) is used to compute a principal components analysis on the transpose of these values • The percentage variance for each component is computed by squaring the $sdev values, dividing by the total, and multiplying by 100.
• The $x values are plotted. These are the loading values that have been centered and multiplied by the rotation matrix. Here's some code to show the essence of what is happening: data(tamoxifen_counts) dba.plotPCA(tamoxifen, DBA_FACTOR) peaks <- dba.peakset(tamoxifen,bRetrieve=TRUE) vals <- as.matrix(mcols(peaks)) vals[vals<1] <- 1 vals <- log2(vals) pc <- prcomp(t(vals)) percent <- pc$sdev[1:2]^2 / sum(pc$sdev^2) * 100 percent <- as.character(round(percent)) lattice::xyplot( PC2 ~ PC1, data = as.data.frame(pc$x[,1:2]),
xlab = percent[1], ylab = percent[2],
pch = 16, cex = 1.75, aspect = 1)


text:
# Maximum likelihood

34,142pages on
this wiki

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Maximum likelihood estimation (MLE) is a popular statistical method used for fitting a mathematical model to some data. The modeling of real world data using estimation by maximum likelihood offers a way of tuning the free parameters of the model to provide a good fit.

The method was pioneered by geneticist and statistician Sir R. A. Fisher between 1912 and 1922. It has widespread applications in various fields, including:

The method of maximum likelihood corresponds to many well-known estimation methods in statistics. For example, suppose you are interested in the heights of Americans. You have a sample of some number of Americans, but not the entire population, and record their heights. Further, you are willing to assume that heights are normally distributed with some unknown mean and variance. The sample mean is then the maximum likelihood estimator of the population mean, and the sample variance is a close approximation to the maximum likelihood estimator of the population variance (see examples below).

For a fixed set of data and underlying probability model, maximum likelihood picks the values of the model parameters that make the data "more likely" than any other values of the parameters would make them. Maximum likelihood estimation gives a unique and easy way to determine solution in the case of the normal distribution and many other problems, although in very complex problems this may not be the case. If a uniform prior distribution is assumed over the parameters, the maximum likelihood estimate coincides with the most probable values thereof.

## PrerequisitesEdit

The following discussion assumes that readers are familiar with basic notions in probability theory such as probability distributions, probability density functions, random variables and expectation. It also assumes they are familiar with standard basic techniques of maximizing continuous real-valued functions, such as using differentiation to find a function's maxima.

## Principles Edit

Consider a family $D_\theta$ of probability distributions parameterized by an unknown parameter $\theta$ (which could be vector-valued), associated with either a known probability density function (continuous distribution) or a known probability mass function (discrete distribution), denoted as $f_\theta$. We draw a sample $x_1,x_2,\dots,x_n$ of n values from this distribution, and then using $f_\theta$ we compute the (multivariate) probability density associated with our observed data, $f_\theta(x_1,\dots,x_n).\,\!$

As a function of θ with x1, ..., xn fixed, this is the likelihood function

$\mathcal{L}(\theta) = f_{\theta}(x_1,\dots,x_n).\,\!$

The method of maximum likelihood estimates θ by finding the value of θ that maximizes $\mathcal{L}(\theta)$. This is the maximum likelihood estimator (MLE) of θ:

$\widehat{\theta} = \underset{\theta}{\operatorname{arg\ max}}\ \mathcal{L}(\theta).$

From a simple point of view, the outcome of a maximum likelihood analysis is the maximum likelihood estimate. This can be supplemented by an approximation for the covariance matrix of the MLE, where this approximation is derived from the likelihood function. A more complete outcome from a maximum likelihood analysis would be the likelihood function itself, which can be used to construct improved versions of confidence intervals compared to those obtained from the approximate variance matrix. See also Likelihood Ratio Test

Commonly, one assumes that the data drawn from a particular distribution are independent, identically distributed (iid) with unknown parameters. This considerably simplifies the problem because the likelihood can then be written as a product of n univariate probability densities:

$\mathcal{L}(\theta) = \prod_{i=1}^n f_{\theta}(x_i)$

and since maxima are unaffected by monotone transformations, one can take the logarithm of this expression to turn it into a sum:

$\mathcal{L}^*(\theta) = \sum_{i=1}^n \log f_{\theta}(x_i).$

The maximum of this expression can then be found numerically using various optimization algorithms.

This contrasts with seeking an unbiased estimator of θ, which may not necessarily yield the MLE but which will yield a value that (on average) will neither tend to over-estimate nor under-estimate the true value of θ.

Note that the maximum likelihood estimator may not be unique, or indeed may not even exist.

## PropertiesEdit

### Functional invariance Edit

The maximum likelihood estimator selects the parameter value which gives the observed data the largest possible probability (or probability density, in the continuous case). If the parameter consists of a number of components, then we define their separate maximum likelihood estimators, as the corresponding component of the MLE of the complete parameter. Consistent with this, if $\widehat{\theta}$ is the MLE for θ, and if g is any function of θ, then the MLE for α = g(θ) is by definition

$\widehat{\alpha} = g(\widehat{\theta}).\,\!$

It maximizes the so-called profile likelihood:

$\bar{L}(\alpha) = \sup_{\theta: \alpha = g(\theta)} L(\theta).$

### BiasEdit

For small numbers of samples, the bias of maximum-likelihood estimators can be substantial. Consider a case where n tickets numbered from 1 to n are placed in a box and one is selected at random (see uniform distribution); thus, the sample size is 1. If n is unknown, then the maximum-likelihood estimator $\hat{n}$ of n is the number m on the drawn ticket. (The likelihood is 0 for n < m, 1/n for nm, and this is greatest when n = m. Note that the maximum likelihood estimate of n occurs at the lower extreme of possible values {m, m+1, ...}, rather than somewhere in the "middle" of the range of possible values, which would result in less bias.) The Expected value of the number m on the drawn ticket, and therefore the expected value of $\hat{n}$ , is (n+1)/2. As a result, the maximum likelihood estimator for n will systematically underestimate n by (n-1)/2 with a sample size of 1.

### Asymptotics Edit

In many cases, estimation is performed using a set of independent identically distributed measurements. These may correspond to distinct elements from a random sample, repeated observations, etc. In such cases, it is of interest to determine the behavior of a given estimator as the number of measurements increases to infinity, referred to as asymptotic behaviour.

Under certain (fairly weak) regularity conditions, which are listed below, the MLE exhibits several characteristics which can be interpreted to mean that it is "asymptotically optimal". These characteristics include:

• The MLE is asymptotically unbiased, i.e., its bias tends to zero as the sample size increases to infinity.
• The MLE is asymptotically efficient, i.e., it achieves the Cramér-Rao lower bound when the sample size tends to infinity. This means that no asymptotically unbiased estimator has lower asymptotic mean squared error than the MLE.
• The MLE is asymptotically normal. As the sample size increases, the distribution of the MLE tends to the Gaussian distribution with mean $\theta$ and covariance matrix equal to the inverse of the Fisher information matrix.

Since the Cramér-Rao bound only speaks of unbiased estimators while the maximum likelihood estimator is usually biased, asymptotic efficiency as defined here does not mean anything: perhaps there are other nearly unbiased estimators with much smaller variance. However, it can be shown that among all regular estimators, which are estimators which have an asymptotic distribution which is not dramatically disturbed by small changes in the parameters, the asymptotic distribution of the maximum likelihood estimator is the best possible, i.e., most concentrated. [1]

Some regularity conditions which ensure this behavior are:

1. The first and second derivatives of the log-likelihood function must be defined.
2. The Fisher information matrix must not be zero, and must be continuous as a function of the parameter.
3. The maximum likelihood estimator is consistent.

By the mathematical meaning of the word asymptotic, asymptotic properties are properties which only approached in the limit of larger and larger samples: they are approximately true when the sample size is large enough. The theory does not tell us how large the sample needs to be in order to obtain a good enough degree of approximation. Fortunately, in practice they often appear to be approximately true, when the sample size is moderately large. So in practice, inference about the estimated parameters is often based on the asymptotic Gaussian distribution of the MLE. When we do this, the Fisher information matrix is usefully estimated by the observed information matrix.

Some cases where the asymptotic behaviour described above does not hold are outlined next.

Estimate on boundary. Sometimes the maximum likelihood estimate lies on the boundary of the set of possible parameters, or (if the boundary is not, strictly speaking, allowed) the likelihood gets larger and larger as the parameter approaches the boundary. Standard asymptotic theory needs the assumption that the true parameter value lies away from the boundary. If we have enough data, the maximum likelihood estimate will keep away from the boundary too. But with smaller samples, the estimate can lie on the boundary. In such cases, the asymptotic theory clearly does not give a practically useful approximation. Examples here would be variance-component models, where each component of variance, σ2, must satisfy the constraint σ2 ≥0.

Data boundary parameter-dependent. For the theory to apply in a simple way, the set of data values which has positive probability (or positive probability density) should not depend on the unknown parameter. A simple example where such parameter-dependence does hold is the case of estimating θ from a set of independent identically distributed when the common distribution is uniform on the range (0,θ). For estimation purposes the relevant range of θ is such that θ cannot be less than the largest observation. In this instance the maximum likelihood estimate exists and has some good behaviour, but the asymptotics are not as outlined above.

Nuisance parameters. For maximum likelihood estimations, a model may have a number of nuisance parameters. For the asymptotic behaviour outlined to hold, the number of nuisance parameters should not increase with the number of observations (the sample size). A well-known example of this case is where observations occur as pairs, where the observations in each pair have a different (unknown) mean but otherwise the observations are independent and Normally distributed with a common variance. Here for 2N observations, there are N+1 parameters. It is well-known that the maximum likelihood estimate for the variance does not converge to the true value of the variance.

Increasing information. For the asymptotics to hold in cases where the assumption of independent identically distributed observations does not hold, a basic requirement is that the amount of information in the data increases indefinitely as the sample size increases. Such a requirement may not be met if either there is too much dependence in the data (for example, if new observations are essentially identical to existing observations), or if new independent observations are subject to an increasing observation error.

## ExamplesEdit

### Discrete distribution, finite parameter spaceEdit

Consider tossing an unfair coin 80 times (i.e., we sample something like x1=H, x2=T, ..., x80=T, and count the number of HEADS "H" observed). Call the probability of tossing a HEAD p, and the probability of tossing TAILS 1-p (so here p is θ above). Suppose we toss 49 HEADS and 31 TAILS, and suppose the coin was taken from a box containing three coins: one which gives HEADS with probability p=1/3, one which gives HEADS with probability p=1/2 and another which gives HEADS with probability p=2/3. The coins have lost their labels, so we don't know which one it was. Using maximum likelihood estimation we can calculate which coin has the largest likelihood, given the data that we observed. The likelihood function (defined below) takes one of three values:

$\begin{matrix} \Pr(\mathrm{H} = 49 \mid p=1/3) & = & \binom{80}{49}(1/3)^{49}(1-1/3)^{31} \approx 0.000 \\ &&\\ \Pr(\mathrm{H} = 49 \mid p=1/2) & = & \binom{80}{49}(1/2)^{49}(1-1/2)^{31} \approx 0.012 \\ &&\\ \Pr(\mathrm{H} = 49 \mid p=2/3) & = & \binom{80}{49}(2/3)^{49}(1-2/3)^{31} \approx 0.054 \\ \end{matrix}$

We see that the likelihood is maximized when p=2/3, and so this is our maximum likelihood estimate for p.

### Discrete distribution, continuous parameter spaceEdit

Now suppose we had only one coin but its p could have been any value 0 ≤ p ≤ 1. We must maximize the likelihood function:

$L(\theta) = f_D(\mathrm{H} = 49 \mid p) = \binom{80}{49} p^{49}(1-p)^{31}$

over all possible values 0 ≤ p ≤ 1.

One way to maximize this function is by differentiating with respect to p and setting to zero:

\begin{align} {0}&{} = \frac{\partial}{\partial p} \left( \binom{80}{49} p^{49}(1-p)^{31} \right) \\ & {}\propto 49p^{48}(1-p)^{31} - 31p^{49}(1-p)^{30} \\ & {}= p^{48}(1-p)^{30}\left[ 49(1-p) - 31p \right] \\ & {}= p^{48}(1-p)^{30}\left[ 49 - 80p \right] \end{align}

which has solutions p=0, p=1, and p=49/80. The solution which maximizes the likelihood is clearly p=49/80 (since p=0 and p=1 result in a likelihood of zero). Thus we say the maximum likelihood estimator for p is 49/80.

This result is easily generalized by substituting a letter such as t in the place of 49 to represent the observed number of 'successes' of our Bernoulli trials, and a letter such as n in the place of 80 to represent the number of Bernoulli trials. Exactly the same calculation yields the maximum likelihood estimator t / n for any sequence of n Bernoulli trials resulting in t 'successes'.

### Continuous distribution, continuous parameter spaceEdit

For the normal distribution $\mathcal{N}(\mu, \sigma^2)$ which has probability density function

$f(x\mid \mu,\sigma^2) = \frac{1}{\sqrt{2\pi}\ \sigma\ } \exp{\left(-\frac {(x-\mu)^2}{2\sigma^2} \right)},$

the corresponding probability density function for a sample of n independent identically distributed normal random variables (the likelihood) is

$f(x_1,\ldots,x_n \mid \mu,\sigma^2) = \prod_{i=1}^{n} f( x_{i}\mid \mu, \sigma^2) = \left( \frac{1}{2\pi\sigma^2} \right)^{n/2} \exp\left( -\frac{ \sum_{i=1}^{n}(x_i-\mu)^2}{2\sigma^2}\right),$

or more conveniently:

$f(x_1,\ldots,x_n \mid \mu,\sigma^2) = \left( \frac{1}{2\pi\sigma^2} \right)^{n/2} \exp\left(-\frac{ \sum_{i=1}^{n}(x_i-\bar{x})^2+n(\bar{x}-\mu)^2}{2\sigma^2}\right)$,

where $\bar{x}$ is the sample mean.

This family of distributions has two parameters: θ=(μ,σ), so we maximize the likelihood, $\mathcal{L} (\mu,\sigma) = f(x_1,\ldots,x_n \mid \mu, \sigma)$, over both parameters simultaneously, or if possible, individually.

Since the logarithm is a continuous strictly increasing function over the range of the likelihood, the values which maximize the likelihood will also maximize its logarithm. Since maximizing the logarithm often requires simpler algebra, it is the logarithm which is maximized below. (Note: the log-likelihood is closely related to information entropy and Fisher information.)

$0 = \frac{\partial}{\partial \mu} \log \left( \left( \frac{1}{2\pi\sigma^2} \right)^{n/2} \exp\left(-\frac{ \sum_{i=1}^{n}(x_i-\bar{x})^2+n(\bar{x}-\mu)^2}{2\sigma^2}\right) \right)$

$= \frac{\partial}{\partial \mu} \left( \log\left( \frac{1}{2\pi\sigma^2} \right)^{n/2} - \frac{ \sum_{i=1}^{n}(x_i-\bar{x})^2+n(\bar{x}-\mu)^2}{2\sigma^2} \right)$

$= 0 - \frac{-2n(\bar{x}-\mu)}{2\sigma^2}$

which is solved by

$\hat\mu = \bar{x} = \sum^{n}_{i=1}x_i/n$.

This is indeed the maximum of the function since it is the only turning point in μ and the second derivative is strictly less than zero. Its expectation value is equal to the parameter μ of the given distribution,

$E \left[ \widehat\mu \right] = \mu,$

which means that the maximum-likelihood estimator $\widehat\mu$ is unbiased.

Similarly we differentiate the log likelihood with respect to σ and equate to zero:

$0 = \frac{\partial}{\partial \sigma} \log \left( \left( \frac{1}{2\pi\sigma^2} \right)^{n/2} \exp\left(-\frac{ \sum_{i=1}^{n}(x_i-\bar{x})^2+n(\bar{x}-\mu)^2}{2\sigma^2}\right) \right)$

$= \frac{\partial}{\partial \sigma} \left( \frac{n}{2}\log\left( \frac{1}{2\pi\sigma^2} \right) - \frac{ \sum_{i=1}^{n}(x_i-\bar{x})^2+n(\bar{x}-\mu)^2}{2\sigma^2} \right)$

$= -\frac{n}{\sigma} + \frac{ \sum_{i=1}^{n}(x_i-\bar{x})^2+n(\bar{x}-\mu)^2}{\sigma^3}$

which is solved by

$\widehat\sigma^2 = \sum_{i=1}^n(x_i-\widehat{\mu})^2/n$.

Inserting $\widehat\mu$ we obtain

$\widehat\sigma^2 = \frac{1}{n} \sum_{i=1}^{n} (x_{i} - \bar{x})^2 = \frac{1}{n}\sum_{i=1}^n x_i^2 -\frac{1}{n^2}\sum_{i=1}^n\sum_{j=1}^n x_i x_j$.

To calculate its expected value, it is convenient to rewrite the expression in terms of zero-mean random variables (statistical error) $\delta_i \equiv \mu - x_i$. Expressing the estimate in these variables yields

$\widehat\sigma^2 = \frac{1}{n} \sum_{i=1}^{n} (\mu - \delta_i)^2 -\frac{1}{n^2}\sum_{i=1}^n\sum_{j=1}^n (\mu - \delta_i)(\mu - \delta_j)$.

Simplifying the expression above, utilizing the facts that $E\left[\delta_i\right] = 0$ and $E[\delta_i^2] = \sigma^2$, allows us to obtain

$E \left[ \widehat{\sigma^2} \right]= \frac{n-1}{n}\sigma^2$.

This means that the estimator $\widehat\sigma$ is biased (However, $\widehat\sigma$ is consistent).

Formally we say that the maximum likelihood estimator for $\theta=(\mu,\sigma^2)$ is:

$\widehat{\theta} = \left(\widehat{\mu},\widehat{\sigma}^2\right).$

In this case the MLEs could be obtained individually. In general this may not be the case, and the MLEs would have to be obtained simultaneously.

## Non-independent variables Edit

It may be the case that variables are correlated, in which case they are not independent. Two random variables X and Y are only independent if their joint probability density function is the product of the individual probability density functions, i.e.

$f(x,y)=f(x)f(y)\,$

Suppose one constructs an order $n\,$ Gaussian vector out of random variables $(x_1,\ldots,x_n)\,$, where each variable has means given by $(\mu_1, \ldots, \mu_n)\,$. Furthermore, let the covariance matrix be denoted by $\Sigma,$

The joint probability density function of these $n$ random variables is then given by:

$f(x_1,\ldots,x_n)=\frac{1}{2\pi\sqrt{\text{det}(\Sigma)}} \exp\left( -\frac{1}{2} \left[x_1-\mu_1,\ldots,x_n-\mu_n\right]\Sigma^{-1} \left[x_1-\mu_1,\ldots,x_n-\mu_n\right]^T \right)$

In the two variable case, the joint probability density function is given by:

$f(x,y) = \frac{1}{2\pi \sigma_x \sigma_y \sqrt{1-\rho^2}} \exp\left[ -\frac{1}{2(1-\rho^2)} \left(\frac{(x-\mu_x)^2}{\sigma_x^2} - \frac{2\rho(x-\mu_x)(y-\mu_y)}{\sigma_x\sigma_y} + \frac{(y-\mu_y)^2}{\sigma_y^2}\right) \right]$

In this and other cases where a joint density function exists, the likelihood function is defined as above, under Principles, using this density.