Questions tagged [function]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
28 views

replacement error when feeding data from function into matrix in R [closed]

I am trying to write a function that creates simulated datasets. The function takes the argument size, being the size of a group, and it is meant to produce a matrix with 100 columns with values 0 or ...
0
votes
0answers
25 views

Other functions with sigmoid shape [duplicate]

Apart from the classic logistic or sigmoid function, are there other interesting functions that map real x into a positive space? Maybe they also have an S shape. Maybe inspired by some nature ...
1
vote
1answer
21 views

How to find parameters of sigmoid function given two thresholds?

Let's say I start with a sigmoid function $$f(x) = \frac{1}{1+\exp{\frac{-(x-c)}{d}}}$$ where the upper limit is 1 and lower limit 0, how can I for example find the appropriate values of the ...
0
votes
1answer
27 views

Which type of sums of squares does lm-function in R use?

I ran a two-way ANCOVA in R: ancova = lm(DV ~ IV1*IV2 + CV1 + CV2 + CV3, data = Data) summary.aov(ancova) Anybody know if this uses type III sums of squares? I ...
0
votes
1answer
40 views

What is the 'feature function'? [duplicate]

The term 'feature function' is very frequently used in the context of machine learning, but I'm still not sure what it really is. Could anyone give the precise definition? Can it be understood as a ...
0
votes
0answers
8 views

A function depends on a timing

I am writing to ask a question. Recently, I am finding a way to express an outcome as a function of (i) observable factors (ii) unobservable factors (iii) treatment timing. Pretty formally, suppose ...
1
vote
0answers
20 views

Get Continuous Distribution from Discrete Variable: Problem 6.77 of Wackerly, Mendenhall, Schaeffer, 5th Ed

Problem Statement: $\newcommand{\szdp}[1]{\!\left(#1\right)}$ Let $v$ denote the volume of a three-dimensional figure. Let $Y$ denote the number of particles observed in volume $v,$ and assume that $Y$...
0
votes
0answers
28 views

Calculate probability density by function application

let's assume we have a probability density function which is $$f(X) = \frac{a}{x^a+1}$$ how can we calculate something like this: $$Y = ln(X)$$
1
vote
0answers
32 views

ML approach to learn function as output

I have a question on how to use ML (machine learning) methods for the following task. I have a m-dimensional (field is always over real numbers $R$) input vector $\vec{x}$, and I want to learn the ...
0
votes
0answers
10 views

Increase weight of a certain outcome in a poisson distribution

I have no background in math, so excuse me if the answer to this is straightforward. I'm trying to build a model that predicts the outcome probabilities of a football game. According to the model, the ...
2
votes
1answer
48 views

Is there a name for $\sum P(x) \frac{P(x)}{Q(x)}$ ? (P and Q are pmf)

I know that $\sum P(x) log \left( \frac{P(x)}{Q(x)} \right)$ is the kl-divergence. I'd like to know if there is a name for $\sum P(x) \left( \frac{P(x)}{Q(x)} \right)$ (no log), but couldn't find one. ...
2
votes
2answers
25 views

Relationship between deterministc function of random variables

Given a discrete $P(X,Y,Z)$ let's call $\Omega$ the set of all deterministic functions $f: XYZ \rightarrow W$ and $\Omega'$ the set of all deterministic functions $f': XY \rightarrow V$. Is it correct ...
0
votes
1answer
309 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
2answers
66 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
1answer
54 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
13 views

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

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
18 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
30 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
20 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
22 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
52 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
18 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
48 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
59 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
98 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
11 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 ...
2
votes
0answers
20 views

Relationship between a linear difference equation and the hyperbolic functions [closed]

Considering a linear difference equation \begin{equation} \underbrace{\begin{bmatrix} -p & 1 & 0 & 0 & 0 & \cdots & 0\\ 1 &-p & 1 & 0 & 0 & \cdots & 0\\...
1
vote
0answers
32 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
40 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
92 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
113 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
126 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
76 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
41 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
41 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
57 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
175 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 ...
6
votes
1answer
1k 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 ...
6
votes
3answers
117 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
50 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
31 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
50 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
56 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
142 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
169 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
290 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
62 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 ...