Questions tagged [function]

A mapping between a set of inputs and a set of outputs.

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

R prints column, but does not save it to global environment [closed]

I am a bit confused here and not able to find a good answer. I have a dataframe that I am trying to aggregate: ...
0
votes
0answers
5 views

In need of help finding/creating a function that resamples from 2 different groups and gives r values for commonalities between the groups [closed]

New to R and first time posting on here, so please let me know if I am missing any important info within my description of the problem. Some background: My study asks participants from 2 different ...
0
votes
1answer
23 views

Problem with user-written function: “Error in shapiro.test(a) : is.numeric(x) is not TRUE” [closed]

Dear StackExchange community, I am trying to write a function to automate some normality-checks. Here is my try (automates Shapiro-Wilk test, histogram and Q-Q plot creation ): ...
2
votes
0answers
7 views

How to make the best final prediction of the optimum value in a Bayesian optimization process?

I'm trying to understand the process of Bayesian optimization of a black box function and the bit I'm confused about is how to make the very last prediction of the true maximum after you have made all ...
0
votes
0answers
21 views

more comprehensive list of kernels than crsouza’s blog of 25 kernels?

What’s the most comprehensive list of positive semidefinite or kernels with feature maps that work well in practice that’s not covered in http://crsouza.com/2010/03/17/kernel-functions-for-machine-...
0
votes
1answer
32 views

Fitting model to Wood's lactation curve

I'm trying to determine how I can estimate the following model: $y = at^bexp(ct)$, where $a$, $b$ and $c$ are estimate from a set of data. But I can't figure out how to derive the formula into ...
0
votes
0answers
11 views

Why the definition of a discrepancy or objective fit function does not require monotonicty?

In the context of covariance structure models (as used in SEM), we have $\Sigma$ a population covariance structure, and $\Sigma(\cdot)$, a function of a parameter vector that returns a model-implied ...
0
votes
0answers
16 views

How is an 'ogival function' defined?

Reading on a paper on factor analysis and measurement invariance I find the description of some functions as 'ogival' functions. In Google I find it referenced mostly in papers from the '70s and '80s....
-1
votes
1answer
27 views

Calclulating and creating x matrix using set.seed function [closed]

I have been asked to evaluate the sum of xi's? what could be wrong with the following code? How to correct it to work? set . seet (1) #set random seed x = rnorm (50) for ( j in 1:50){ s = s + x [ i ] ...
0
votes
1answer
15 views

Viterbi Algorithm [closed]

Can someone explain why Is it because for the left argument, we would find the most likely sequence of states given observations and for the right argument, we would eventually find the most likely ...
1
vote
0answers
21 views

A space of functions and their Fourier Transforms?

Conjugate variables and the Fourier transform are often used to analyze different states of a single object. For example in Quantum Mechanics it can be used to describe changing information about ...
0
votes
0answers
10 views

Attempting to build a basic weighted prediction model/function

I am trying to build a basic prediction/recommendation model. Its for loan data, although the data is all more qualitative than quantitative. I also have a very small amount of data, and so am not ...
2
votes
1answer
45 views

A function of random variables $X_1, …, X_k$ that goes from $\mathcal{R}^k$ to the reals is measurable with respect to $\sigma(X_1, …, X_k)$

I'm reading Resnick's "A probability Path" and doing exercise 3 on page 85. The statement is: Suppose $f : \mathcal{R}^k \rightarrow \mathcal{R}$ and $f \in \mathcal{B}(\mathcal{R}^k) / \...
0
votes
0answers
17 views

Do two dependent variables have a functional relationship?

Suppose $X$ and $Y$ are two dependent random variables (e.g. they are the elements of a bivariate normal distribution with $\rho\ne0$). Is it true that there always exists a function $f$ such that $f(...
1
vote
0answers
28 views

Cross entropy and function approximation

My overall question is: the universal approximation theorems can provide a good heuristics on defining the loss function for supervised regression problems, i.e., because universal approximation ...
0
votes
0answers
22 views

how to solve a complex function

My aim is to solve $$-N (\beta \mu )^{\frac{1}{\beta +1}} s^{-\frac{1}{\beta +1}}-\frac{(\beta +2) N}{2 (\beta +1) s}+t=0$$ The above equation is related to $s$ and the other parameters are constants....
0
votes
1answer
22 views

What covariance structure is implemented on the lmer function of R?

I run a Linear Mixed-Effects Models (LMMs) with a repeated measures design with the lmer function on R. ...
5
votes
2answers
88 views

Generating uniform points inside an $m$-dimensional ball [duplicate]

The present question follows on from some other questions on this site asking how to generate uniform points inside a disc (see e.g., here, here and here). The natural extension of that problem is to ...
0
votes
0answers
7 views

Custom Tensorflow v2.x Optimizer with Sparse update support

I am trying to contribute to tensorflow v2. I am done with _resource_apply_dense but i am struggling with _resource_apply_sparse. There are multiple ways to handle but there is no proper discussion ...
1
vote
0answers
28 views

combining two second order growth functions

I have two second order growth functions of the form Y = (K1 * Yeq^2 * x) / (1 + K1 * Yeq * x) and Z = (K2 * Zeq1^2 * x) / (1 + K2 * Zeq * x), with both Y and Z having an inhibitory effect on each ...
1
vote
0answers
34 views

how to choose the best fitting function for a data set [closed]

I am trying to find the best fitting function for some data. I have tried with : ...
3
votes
1answer
44 views

How do you find the asymptotic distribution of a function of the sample mean?

There are a number of questions on this site that ask for the asymptotic distribution or moments of some function of the sample mean for IID data (see e.g., here, here, here, here and here). All ...
5
votes
1answer
106 views

Optimization: Convex function

Problem statement Use the definition of convexity of a function, i.e., that for any $\boldsymbol{x}$, $\boldsymbol{y} \in \mathbb{R}^{d}$ and $\lambda \in \left [0,1 \right ]$ we have \begin{align*} ...
1
vote
1answer
19 views

How do you find the minima of a function in python? [closed]

Say we have a quadratic function in x, where the domain of input x is Real Numbers. How can we find the minimum value of the function (output y) in a programming language like python? Immediately ...
0
votes
1answer
53 views

Expectation of any function of X, a nonnegative integer valued random variable [duplicate]

How to show that if X is a nonnegative integervalued random variable with distribution F,then $$E(X)=\displaystyle\int_0^\infty \overline{F}(X)dx$$ and $$E(X^n)=\displaystyle\int_0^\infty n*X^{n-1}\...
1
vote
0answers
16 views

Conceptually, what happens when you take (A - B) and divide it by (1 - B)? What is it used for?

I've come across this transformation a lot in my advanced stats course and I'm curious as to what it accomplishes. The basic structure is: A - B --------- 1 - B Here's an example of its use when ...
1
vote
0answers
36 views

Lapply does not work as expected [closed]

I want to use map or lapply to iterate over a list of dimension variables (dim_list below) using my custom function (transf_fun()). My overall goal is to generate a set of tables and later to pass ...
2
votes
1answer
36 views

Expected value of a sum of random variables raised by $e$?

There is a function $y$ defined $$y=\exp(-\boldsymbol{\alpha}'\mathbf{b})\:\:;\:\:\:\:y\in(0,\infty)$$ where $\boldsymbol{\alpha}$ is a vector of random variables and $\mathbf{b}$ is a vector of non-...
0
votes
1answer
36 views

Expected value of function with normally distributed input

How can we calculate the expected value of a function $f$ with a normally distributed input? The function can vary. Right now, I am sampling $n$ instances from the normal distribution, calculating $f(...
0
votes
1answer
90 views

CDF of Z = max ( 0, X-M )

I'm trying to understand how the cumulative distribution function of a Random Variable which is a maximum function can be obtained. If $Z = \max(0,X-m)$ where $X$ is another Random variable ( Claim ...
0
votes
0answers
22 views

Is heavisde function and hard-limit transfer function actually the same thing?

Is hard-limit transfer function just a subset of heavisde function with the non-differentiable part centered at zero?
6
votes
1answer
883 views

What is an induced probability function?

My textbook defined the probability function of a random variable as: the function $P_X$ is an induced probability function on $X(\Omega)$, defined in terms of the original function P. In other ...
5
votes
3answers
106 views

Are dependent variables necessarily functions of one another?

The problem Suppose you have two variables $X_1,X_2$ so that $X_1\not\perp\!\!\!\!\! \perp X_2$. Do we necessarily have that a functional relationship exists between them? I am assuming random ...
0
votes
1answer
32 views

Sampling posterior distribution of a function

I have the following problem: let's say I have a function $y=f(x)$. Let $f$ be defined for all $x$ but it it might not be invertible. Further assume $x \sim p(x)$ with some probability density $p(x)$. ...
1
vote
2answers
30 views

Modify fit or function to match certain values

I have following values: x = [0, 12.5, 25, 50, 75, 87.5, 100] y = [0.0, 0.2, 0.31, 0.5, 0.66, 0.76, 1.0] These values represent display values from a device that ...
0
votes
0answers
38 views

Continuous mapping theorem and random vectors

My question is on whether or not continuous mapping theorem can be applied to elements of a random vector. Consider $[X_n,Y_n] \rightarrow [\mu, \sigma]$ Would it also be true that for any ...
0
votes
0answers
31 views

Is it possible to approximate a function f(x), if I can observe the behavior of g(f(x))?

Say I have a hypothetical scenario with a 'cost function' f(x) over parameter space x. Typically, from an optimization point of view, minimizing this cost function is expected to result in an optimal ...
0
votes
1answer
46 views

Maximum likelihood estimator in Uniform distribution [closed]

For Random sample with uniform distribution in Tetha< x< Tetha +1 What's the maximum likelihood function how can we maximize it?
1
vote
0answers
131 views

How to make a custom activation function in keras with a learnable parameter?

The answer to this question is generally to implement it as a new layer and do layer = Dense(num_neurones)(previous_layer) out = TheActivationFunction()(layer) ...
0
votes
1answer
135 views

Matlab hardlim (step) function does not have exact step

Hardlim matlab function should look like a step: But the code provided at the documentation page ...
1
vote
1answer
166 views

What is the domain and range of the PMF of the Bernoulli distribution with p = 0.1?

In probability theory and statistics, the Bernoulli distribution is the discrete probability distribution of a random variable which takes the value 1 with probability p and the value 0 with ...
1
vote
1answer
59 views

Why use Regression in NN?

In a NN we first apply a Linear Function, ie. Multiplying the weights to the inputs/output of a layer and then apply a Non-Linear Activation function like ReLU to get the output of the layer. The ...
0
votes
1answer
86 views

Binary Logistic Regression with the LASSO objective function

I am working on my MSc. Statistic which is on the Penalized Logistic Regression with the LASSO penalty. I am trying to understand the difference in two objective functions: argmin {$\frac{1}{n}$ $\...
2
votes
1answer
51 views

Function to fit acid reaction curve

Data in the image below shows a variable DME reacting to the increase in acid concentration. It looks like it has a very fast increase from when the concentration is raised from 0 to 0.5 and then a ...
1
vote
0answers
61 views

Finding the distribution of a piecewise function of a Gamma random variable

Let random variable $X \sim \text{Gamma}(\alpha,\beta)$. I want to derive the distribution of $Y$, where: $$ Y = \left\{ \begin{array}{ll} a X - k & \quad X \geq \frac{k}{a} \...
0
votes
1answer
28 views

Which trigonometric function I should use to generate the temperature with two peaks (i.e.one strong and one moderate peak)?

I want to generate seasonal temperature of Bay of Bengal. I want to do this with a trigonometric function. Seasonal temperature of Bay of Bengal has two peaks. One major peak during April and another ...
0
votes
2answers
71 views

How to perform a regression for a multi-function?

How would one perform a regression analysis with a multi-function? That is, where a single X-value can correspond to a number of Y-values? Here is an example: Note that in this example, it is not ...
2
votes
1answer
424 views

How to write diff() mathematically?

I am using R/Python diff() operation. e.g., https://docs.scipy.org/doc/numpy-1.14.0/reference/generated/numpy.diff.html I would like to know if there is a ...
0
votes
1answer
36 views

Expressing as a probability density function [closed]

The measuring error x is a normal random variable. Variance of the error = 4. If distribution of x can be shown by a probability density function f(x), how would you find the analytical expression of ...
0
votes
1answer
32 views

How to find emprical PDF by using the normalized histogram?

first of all, thank you for your time, here is my question; Is it possible to find emprical PDF by using normalized histogram? I am trying to learn discrete event simulation and what I see is there ...