AI/ML News & Innovations Hub

AI/ML news, top picks, and generated innovation digests.

★ Visit ai-karthik.com
422Sources
40179News Items
8Top Picks
238Blogs
successLast Run

Latest AI/ML News

40179 matching items

Cross Validated 2023-04-04 12:52 UTC Score 18.0 AI-113-20230404-social-media-bb47d61c

How do I construct the likelihood function for a series of observed Bernoulli-distributed datapoints?

I have observed N (a_i, p_i) pairs each drawn from a different Bernoulli distribution. Here a_i are observed amplitudes and p_i are observed probabilities of success for the i^{th} draw. I would like to model the full likelihood distribution (and not just via the MLE) with a view to identifying which draws belong to the successful class (and hence the statistics of just these draws, especially any irregular uncertainty distributions etc.). For example, I have a_i p_i p_true 10 0.2 0 100 0.9 1 11 0.1 0 99 0.93 1 12 0.25 0 I know the PDFs of the model and of the data (both are obviously Bernoulli distributions), but how do I combine them to obtain residuals that I can use to explore the joint distribution? What distribution does the joint distribution follow and how? I have tried to unpack the cross-entropy and data and model but don't have a clear solution. Is the continuous Bernoulli distribution a complete red herring? Note that ordering doesn't matter in my example. Some other points in response to comments: The p_i values come from an oracle - these represent the probabilities that the datapoints belong to a common class. The amplitudes a_i are just weights for the corresponding Bernoulli distributions. The higher the amplitude, the higher the scaling of the Bernoulli distribution in its contribution to the overall process. See also: "Weighted" Poisson binomial distribution Weighted sum of Bernoulli distributions https://math.stackexchange.com/questions/3481907/sum-of-wei…

Cross Validated 2023-04-04 07:45 UTC Score 18.0 AI-113-20230404-social-media-f8e5f626 Full article

One of the mediation models I am running has confusing results. The indirect, direct and total effect are conflicting

I have a model with a one predictor, one mediator and one outcome. The following are the coefficients i got for my mediation analysis, but I can't understand how to make sense of them. Could someone please help explain what must be going on and how I can report these results. The indirect effect is significant (b = 0.041, CI [0.0103 and 0.0781]) The Total effect is non-significant ((b = 0.016, t = 0.323, p=0.747) The direct effect is non-significant with a flipped sign for the coefficient,( -0.03, p=0.619) is it valid to conduct a mediation in this scenario? how do I report my results. P.S; I ran my analysis with Hayes PROCESS macro P.P.s; I would really appreciate if someone could help soon because I'm on a bit of a time crunch.

Why does checking normality of residuals give a different result than checking bivariate normality of the two variables?
Cross Validated 2023-04-04 01:13 UTC Score 12.0 AI-113-20230404-social-media-bce1f4a8 Full article

Why does checking normality of residuals give a different result than checking bivariate normality of the two variables?

I am checking the conditions for hypothesis testing a Pearson correlation as significant or not, and also checking the residuals normality conditions for OLS. Why are the following methods giving different results (why are the variables not bivariate normal but the residuals of an OLS model are normal?)? Also, why does changing the regression from y~x to x~y alter the p value so much for normality of the residuals? I have included a reproducible example below. library(tidyverse) library(mvnormtest) x % mutate(resid = residuals(lm(x ~ y))) %>% ggplot(aes(x = resid)) + geom_histogram() # Univariate Shapiro Wilks of residuals data %>% mutate(resid = residuals(lm(x ~ y))) %>% select(resid) %>% t() %>% shapiro.test() # Univariate Shapiro Wilks of residuals (switch x and y order) data %>% mutate(resid = residuals(lm(y ~ x))) %>% select(resid) %>% t() %>% shapiro.test() # Bivariate Shapiro Wilks data %>% t() %>% mshapiro.test() I was also confused because I thought that hypothesis testing a Pearson correlation has similar assumptions to fitting OLS model, in that the variables should be bivariate normal, but is this mistaken? Do I need to check normality individually for the x and y variables? Sources: Bivariate normality is a necessary condition for testing Pearson correlation (but alternatively, the univariate normality of the two variables can be separately checked (?)): https://statistics.laerd.com/spss-tutorials/pearsons-product-moment-correlation-using-spss-statistics.php Bot…

AI Stack Exchange 2023-04-03 13:34 UTC Score 9.0 AI-110-20230403-social-media-ba964e1c Full article

Choosing and Designing Decay Types for Epsilon-Greedy Exploration in Reinforcement Learning

I am working on a reinforcement learning project that involves epsilon-greedy exploration. I have two questions regarding the choice between linear and exponential decay for epsilon, and the appropriate design of the decay constant in the exponential case. How do we determine whether to use linear decay or exponential decay for the epsilon-greedy exploration mechanism in reinforcement learning? When using exponential decay, how should we design the decay constant? Different decay constants determine the shape of the curve. In linear decay, we can use the epsilon_decay parameter to determine the shape, but in exponential decay, the relationship between epsilon_decay and the shape is harder to imagine. I understand that there may not be a single answer for these questions, and I welcome a wide range of discussions on this topic. Here is the code for the two types of decay: import math import matplotlib.pyplot as plt def exponential_epsilon_decay(step_idx, epsilon_start=1, epsilon_end=0.01, epsilon_decay=100_000): """ Calculates the value of epsilon for a given step index using exponential decay and the specified parameters. Parameters: step_idx (int): The index of the current step. epsilon_start (float): The starting value of epsilon. epsilon_end (float): The minimum value of epsilon. epsilon_decay (float): The rate at which epsilon decays. Returns: float: The value of epsilon for the given step index. """ return epsilon_end + (epsilon_start - epsilon_end) * math.exp(-1. * ste…

post-hoc analysis for logistic regression?
Cross Validated 2023-04-03 01:20 UTC Score 12.0 AI-113-20230403-social-media-ca59c33b Full article

post-hoc analysis for logistic regression?

Suppose our dependent variable Y is TRUE vs FALSE, and our independent variable X is GREEN, YELLOW, and RED. We performed a logistic regression of Y~X. I wonder if it is possible and how to use the trained logistic regression to answer the following question: What is the odds ratio (and p-value) of TRUE vs FALSE for subjects whose X equals to GREEN. What is the odds ratio (and p-value) of TRUE vs FALSE for subjects whose X equals to YELLOW. What is the odds ratio (and p-value) of TRUE vs FALSE for subjects whose X equals to RED.

AI Stack Exchange 2023-04-02 17:35 UTC Score 26.0 AI-110-20230402-social-media-96446d03

Transfer Learning for Solar Energy Production Forecasting with LSTM: Generalized vs. Specialized Models

I am working on a solar energy production forecasting problem using LSTM multi-step models to predict 1/4/8h ahead of solar energy production for different solar installations. Our goal is to help clients optimize their energy utilization by trading with their neighbours or respective Microgrids. I have clustered households into groups such as small generators, medium generators, and large generators. I am currently developing a multi-household model for each cluster using TensorFlow's LSTM multi-step model tutorial . To improve prediction accuracy and provide a more personalized approach, I would like to explore transfer learning to create specialized single-household models based on the generalized multi-household models. Multi-Household Model (Generalized Model) The dataset consists of 160 time series and includes weather features such as hour, day, month, temperature, DHI, DNI, GHI, precipitation, and solar zenith angle. The model learns from multiple similar households. To better visualize the dataset, here is an example: Hour Day Month TS_0 TS_1 TS_N Temperature DHI DNI GHI Cosine Periodicity Sin Periodicity Other Features 6 1 5 0 0 0 15 … … … … … … 7 1 5 0.1 0.1 0.1 17 … … … … … … 8 1 5 0.2 0.3 0.25 18 … … … … … … 9 1 5 0.5 0.4 0.35 18 … … … … … … 10 1 5 1 0.8 0.85 20 … … … … … … Note: These features related to the weather would be an average of the district that these houses exist in. This current setup utilizes TS_0 to TS_N as examples to learn from each other since…

Are the terms in the diffusion model equation random variables or probability density functions?
Cross Validated 2023-04-02 00:31 UTC Score 15.0 AI-113-20230402-social-media-da35f887 Full article

Are the terms in the diffusion model equation random variables or probability density functions?

Are all terms in the first line(71) of the equation random variables or probability density functions? If they are probability density functions, is there a possibility of obtaining a value that is not equal to 1 when integrating the right-hand side of the equation after all calculations have been completed? Based on the answer given in line 72, it seems that all terms are considered as probability density functions. If so, is it possible to transform them into the probability density function of a Gaussian distribution? in q(x_{t-1}|x_t,x_0), x_t, x_0, x_{t-1} are EVENTS? or Distribution? I feel like I'm lacking some basic concepts in statistics. Can you help me, please?

AI Stack Exchange 2023-03-30 14:03 UTC Score 31.0 AI-110-20230330-social-media-561a8a71

How to extract product codes within unstructured data

I am working on a project where I have a dataset consisting of unstructured data from multiple ERP systems. Each dataset (extracted from an ERP) has different columns, and unfortunately, there is no standard format for the data. Among the columns, there is a product code, along with other product-related information. The product code can be in various columns, or even within a larger column description. My goal is to extract the product code from each row from this unstructured data. I am looking for advice on which type of model or strategy I can apply to extract the product codes automatically. Here are some key points for consideration: The data is unstructured and comes from various ERP systems; There is no standard format for the columns or the product code placement; The product code can be within a larger column description; The extract data isn't natural language (it doesn't have a syntax). I don't have actual sequences. The columns are extracted from an ERP system and they basically contain a bunch of keywords, like: '3/4" SHOE RED BLUE NIKE", stuff like that; The are millions of possible product codes. Any suggestions or recommendations on models, strategies, or tools that would help me achieve this goal would be greatly appreciated. If you have any experience with a similar problem, please share your insights or any relevant resources. Thank you in advance for your help!

Anyscale Blog 2023-03-28 00:00 UTC Score 53.0 USR-0085-20230328-ai-specialis-931dd4cd Full article

Faster stable diffusion fine-tuning with Ray AIR

*This is part 3 of our generative AI blog series that dives into a concrete example of how you can use Ray to scale the training of generative AI models. To learn more using Ray to productionize generative model workloads, see [part 1](https://www.anyscale.com/blog/ray-common-production-challenges-for-generative-ai-infrastructure). To learn about how Ray empowers LLM frameworks such as Alpa, see [part 2](https://www.anyscale.com/blog/training-175b-parameter-language-models-at-1000-gpu-scale-with-alpa-and-ray).*

Cross Validated 2023-03-24 14:48 UTC Score 20.0 AI-113-20230324-social-media-ebcacd63

Do I need to find odds ratio for the result of binomial GLMM?

I have run a binomial generalised linear mixed model (GLMM) via the lme4 package in R. Then I have got the result for it. In the paper, I wrote this for the result: b = 2.23, SE = 0.59, p The optimal model of mine is from this syntax: fm1 So I have three variables. They're all categorical. The first variable has two categories; the second one has two categories and the last one has three caetegories. The optimal model is the model with three-way interaction which means all variables are needed to explain the finding. And this is the output I've got from emmeans package to see if there are significant differences in each contrast: The example of my interpretations is 'The participants received significantly lower score in ao, clear, dm context than ao, con, dm context (b = -4.74, SE = 0.60, p However, after running your syntax, it gives me this: fixed OR: (Intercept) 1.12325891 0.344561581 3.66178542 seeav 0.67232263 0.211350426 2.13871213 conversationcon 114.08350756 34.934069849 372.56027577 maskno 4.13803353 1.306209092 13.10917341 masktm 4.28593809 1.35230524 13.58368513 seeav:conversationcon 0.20600737 0.039746429 1.06774463 seeav:maskno 0.72696183 0.142448961 3.70991474 seeav:masktm 0.82121327 0.160893533 4.19153725 conversationcon:maskno 0.01711682 0.003296817 0.08886925 conversationcon:masktm 0.04498217 0.008642170 0.23413050 seeav:conversationcon:maskno 30.95364883 3.069134163 312.18197875 seeav:conversationcon:masktm 9.80787459 0.971192946 99.04767571 So now I wonde…

Cross Validated 2023-03-23 21:50 UTC Score 14.0 AI-113-20230323-social-media-16c48da3

Levels of clustered standard errors and fixed effects

A while ago I read (probably on stata forums) that FE can be on a lower level than SE clusters, but not vice versa. For example, firm/household FE with industry/state SE are good, but doing state FE with household SE would be wrong. Intuitively it seems to make sense. If treatment assignment is on a household level, shouldn't household FE be the first choice? But it seems that there are papers in different fields that use higher level FE with lower level SE. What am I missing?

GPT 4 and the Uncharted Territories of Language
Fast.ai 2023-03-20 00:00 UTC Score 14.0 AI-185-20230320-developer-an-c4ef0e9a Full article

GPT 4 and the Uncharted Territories of Language

Language is a source of limitation and liberation. GPT 4 pushes this idea to the extreme by giving us access to unlimited language.

Anyscale Blog 2023-03-20 00:00 UTC Score 36.0 USR-0085-20230320-ai-specialis-da3b3210 Full article

How Ray solves common production challenges for generative AI infrastructure

This is part 1 of our generative AI blog series. In this post, we talk about how to use Ray to productionize common generative model workloads. An upcoming blog will deep dive into why projects like [Alpa](https://github.com/alpa-projects/alpa) are using Ray to scale large models.

AI Stack Exchange 2023-03-16 22:32 UTC Score 34.0 AI-110-20230316-social-media-141d1094 Full article

What papers can I read that explore model performance vs dataset size?

I am trying to estimate how many images I need to label for an object detection task. I understand a lot of variables are at play, but I'd like to find some papers that have already explored this further. Specifically it would be helpful to find charts for specific model architectures on specific classes that plot: Mean Average Precision vs Training Set Size (num instances) What data exists to help me estimate how much data I need to train an object detection model?

AI Stack Exchange 2023-03-16 13:03 UTC Score 9.0 AI-110-20230316-social-media-64d9ce7a

It is not clear why sequential improvement is violated in the constructed rollout algorithm

Below is an example (p.89) from "RL and Optimal Control" book by D.Bertsekas on the construction of a a case study where the rollout algorithm is worse than the base heuristic on which the rollout algorithm is constructed. It is not clear why sequential improvement is violated. First of all, the first sentence is not clear to me: is it the rollout algorithm or the base heuristic that accidentally produces an optimal control sequence? It is not clear to me why sequential improvement is violated in the provided example. I will be happy for clear explanation.

Lilian Weng Blog 2023-03-15 00:00 UTC Score 37.0 USR-0112-20230315-ai-specialis-c01a9c77 Full article

Prompt Engineering

Prompt Engineering , also known as In-Context Prompting , refers to methods for how to communicate with LLM to steer its behavior for desired outcomes without updating the model weights. It is an empirical science and the effect of prompt engineering methods can vary a lot among models, thus requiring heavy experimentation and heuristics. This post only focuses on prompt engineering for autoregressive language models, so nothing with Cloze tests, image generation or multimodality models. At its core, the goal of prompt engineering is about alignment and model steerability. Check my previous post on controllable text generation.

AI Stack Exchange 2023-03-12 23:23 UTC Score 14.0 AI-110-20230312-social-media-a05d284d

Why is Soft Q Learning not an Actor Critic method?

I've been reading these two papers from Haarnoja et. al.: Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor Reinforcement Learning with Deep Energy-Based Policies As far as I can tell, Soft Q-Learning (SQL) and SAC appear very similar. Why is SQL not considered an Actor-Critic method, even though it has an action value network (critic?) and policy network (actor?)? I also cannot seem to find a consensus on the exact definition of an Actor-Critic method.

Cross Validated 2023-03-11 21:19 UTC Score 12.0 AI-113-20230311-social-media-a6e4ec68

What Is the Probability of Losing Money?

I was watching Veritasium's Would You Take This Bet? video. In a part of the video Derek asks people whether they would accept the bet in the case of each true guess for flipping the coin the person would win $10$ dollars and for each true guessing this $10 $ dollar will increase twofold as $10+20+40$ ... etc. But for each false guess the person betting will lose $10$ dollars. So in video he tells that probability of losing money for $100 $ times of guessing is $1/2300$ . I tried to find the this probability by myself. I mean it is obvious the probability of losing money in these circumstances but I couldn't find the same conclusion as Derek. So I tried to find the minimum number of trues guesses that would make the person at lose in final situation. For $10$ of his guesses are true $10\times ((1-(2^7))/(1-2))=1270\rightarrow$ Gaining money $10\times 93=930 \rightarrow$ Losing Money. For $9 $ of his guesses are true $10\times ((1-(2^6))/(1-2))=630 \rightarrow$ Gaining money $10\times 94=940 \rightarrow$ Losing Money. In order to lose money, the person has to be false at least $ 6$ of his guesses. pbinom(6,size = 100, prob = 0.5) = 1.00298e-21 This the result that I found. Where did I make a mistake?

AI Stack Exchange 2023-03-10 20:57 UTC Score 26.0 AI-110-20230310-social-media-e38e35ab

Higher accuracy in the test set than in the training set

Hi I'm trying to train an ANN model to classify images containing these characters: 0,1,2,3,4,T,X,S eg. etc... so something like the classification of records of the MNIST dataset but using my generated images (not handwritten). I generate ~10000 records that have to be divided in the training set and in the test set: n = 10000 X_train, y_train = generate_typed(typed_alphabet_resized.astype('uint8'), int(n*0.8)) X_test, y_test = generate_typed_test(typed_alphabet_resized.astype('uint8'), int(n*0.3)) generate_typed and generate_typed_test are pretty much the same function, the sole difference is the augmentation applied to images: for generate_typed_test the only augmentation applied is scale(1,3) while for generate_typed: augmentation_seq = iaa.Sequential([ iaa.Sometimes(0.3, iaa.GaussianBlur(sigma=(0, .1))), iaa.Sometimes(0.3, iaa.AdditiveGaussianNoise(loc=0, scale=(0.0, 0.05*255), per_channel=0.2)), iaa.Affine(scale=(1, 3)), ], random_order=True) I did that to make the model more generalized as possibile. But really the kind of images the model is supposed to work on in the real world might just (sometimes) be zoomed in or be slightly less centered. However even if I use these two different functions, the images I got are very very similar. Now, the problem is: I got a bigger accuracy on the test set than on the training set, and I really can't understand why and how to fix it. It seems like that the accuracy of my model doesn't matter, if my model has around 80% of accura…

Cross Validated 2023-03-10 02:03 UTC Score 14.0 AI-113-20230310-social-media-b095c513

Computing $E[yy'Cyy']$ for normalized Gaussian $y$

Suppose $x\sim \text{Normal}(0,\Sigma)$ with diagonal $\Sigma$ . Is there a closed form solution or a good approximation to the following quantity where $y=x/\|x\|$ : $$f(C)=E[yy'Cyy']$$ Target is to understand the growth rate of $g(k)=\operatorname{Tr}(\underbrace{f\circ f \circ \cdots \circ f}_{k} \circ I)$ in terms of $k$ . For unnormalized $x$ , I can use Wick's theorem, and this iteration nicely factors, giving nice formulas for $g(k)$ . Wondering if there's a trick I can use to make it work for $y$ . Motivation: factoring density of $x$ is used in Bordelon paper to give loss curve of SGD. Extending this to $y$ will transfer this analysis to the Kaczmarz method.

Cross Validated 2023-03-09 19:58 UTC Score 23.0 AI-113-20230309-social-media-dae442f7 Full article

How to estimate cyclicality and sample from it

I wonder if you can help. # create the baseline (on which the for example a model is fitted form which one can sample and derive the uncertainity of the cycle) x $lag, ccf=ccf.res$ acf) } cycl Here this would be possible if a parametric model would exist and just new.data=data.frame(years=1:10) would allow to extrapolate. But how to get there sensibly? Below you find very simple attempt which based on first inspection seems to be plausible but there must be better (and correct) way to estimate it. Sample data and the attempt (in r ): The data are percentages per group and represent the proportion of observations per group of the overall dataset per year (each column should sum to 100% or 1, but because of rounding some might be slightly over 100%). The below data contains 5Y of data and its collected once a year (end of year) and this sample (patients in given category) shifts across these groups. (due to health risk). This current data represents currently lower cycle with lower health risk. The cyclicality is expected due to exogenous factors and have roughly (length of upper or down cycle between 5-10 years. Unfortunately there is limited data on this migration and its expected (assumed) that the current down cycle its just reverse to explain how the upper cycle looks like (just a mirror). The graph below is derived form this code: plot(ccf ~ lag, data=cycl[cycl$group==1, ], col=1, type="l", ylim=c(-1,1)) with(cycl, by(cycl, group, function(x) lines(ccf ~ lag, data=x, col…

AI Stack Exchange 2023-03-09 00:39 UTC Score 12.0 AI-110-20230309-social-media-d4e2cf3f

How do I know if image after image enhancement is better than before? (Image Preprocessing)

There are few common image enhancement: 1. brightness -> r = s + b 2. negative -> s = 255 - r 3. contrast -> scretching (flexible) dan thresholding (binary image) 4. smoothing -> generate blur penapis non linear (min, max, median) 5. sharpening (high pass filter), suit for getting edge How do I know what should I enchance? Is it brightness, contrast, or what? And how do I know if image is better after enhancement or not (evaluating result) objectively instead of subjectively by our perspective? Mainly for medical imaging such as USG, CT-SCAN, etc... As far As I know, I can see the histogram, but I still don't know what histogram to evaluate the result.

AI Stack Exchange 2023-03-08 08:17 UTC Score 26.0 AI-110-20230308-social-media-4d0dfadb

why by adding additional information as number of sequence on dataset can avoid overfitting

I am developing a regression model to analyze walking styles. The dataset I am using to build the model is from 2 different sources, let's call them dataset A and dataset B. Dataset A has a shape of (15000,6) and dataset B has a shape of (15000,89) . Both datasets are time-series data taken simultaneously for 5 minutes. I then trained the data using input data of shape (15000,89,1) . The loss and val_loss generated from the training process were very small, but when I tested it using real data, the model was unable to predict the real data. Therefore, I think I am experiencing overfitting. Then I tried adding new data to the input data. This new data is a sequence number from 1-50. I added this sequence number as an identity to the input data because the data I will generate will have 50 data in 1 second. I only added this sequence number to the input data. So the input data that was originally (15000,89,1) became (15000,90,1) . Then after adding this sequence number, I trained the new input data, and the result was better than before, and the model was able to predict real data. My question is, why is the technique of adding a sequence number to the input data able to avoid overfitting? Is the additional information of the sequence number part of data augmentation? If yes, please give me logical reasons and relevant references because I can't find relevant references and it is hard to find keywords for them. you can refer to this question to understand the question in detai…

Cross Validated 2023-03-07 18:15 UTC Score 9.0 AI-113-20230307-social-media-6fb6d5ed

Variance Among Coordinates of Multivariate Normal

Sample $(X_1, X_2,\ldots, X_n)^T\sim{N(\textbf{0}, \Sigma)}$ . What is the expected cross-sectional variance of $(X_1, X_2, \ldots, X_n)^T$ ? In other words, if $$ S^2 = \frac{1}{n}\sum_{k = 1}^n \left(X_k - \bar{X}\right)^2\qquad\text{and}\qquad \bar{X} = \frac{1}{n}\sum_{k = 1}^n X_k, $$ what is $E[S^2]$ ? As an example, I'll show the relatively trivial two dimensional case. Suppose $$(X_1, X_2)^T\sim{N\left(\textbf{0}, \begin{pmatrix} \sigma_1^2 & \rho\sigma_1\sigma_2 \\ \rho\sigma_1\sigma_2 & \sigma_2^2\end{pmatrix}\right)}. $$ Then the cross-sectional mean is $$ \bar{X} = \frac{X_1+X_2}{2}. $$ Using the cross-sectional mean, the cross-sectional variance is $$ S^2 = \frac{1}{2}\left(X_1 - \bar{X}\right)^2 + \frac{1}{2}\left(X_2 - \bar{X}\right)^2 = \left(\frac{X_1 - X_2}{2}\right)^2 $$ Hence, the expected cross-sectional variance is $$ E\left[S^2\right] = E\left[\left(\frac{X_1 - X_2}{2}\right)^2\right] = \frac{\sigma_1^2 - 2\rho\sigma_1\sigma_2+\sigma_2^2}{4}. $$

Cross Validated 2023-03-04 22:26 UTC Score 9.0 AI-113-20230304-social-media-8aa172a9

Neural Networks - Can I Use Any Activation for the Output Layer?

I'm new to neural networks, and in almost everything I'm reading, the activation function recommended on the output layer follows a specific pattern: If the network does binary classification (1 output node), use sigmoid If the network does multiclass classification (>1 output nodes), use softmax If the network does regression, don't use an activation function (linear) Which I completely understand - for example, binary classification is a probability and is never going above 1 or below 0, so of course it makes sense to use sigmoid. My question is though, when I'm doing regression, can't I just use the activation function that best fits my range of output values instead of using linear? For example, let's say I'm trying to predict the price of a stock - wouldn't a ReLU activation function make a lot more sense to use on the output layer over a linear activation function, since the price can never be negative? Or for another example, let's say I normalized my output values between 1 and -1 - Wouldn't I want to use a TanH activation on the output?

AI Stack Exchange 2023-03-03 08:48 UTC Score 29.0 AI-110-20230303-social-media-6d7d5547 Full article

Keypoint generation in 3D point clouds with Deep Learning

I have a huge dataset of 3D point clouds (each point consists of X,Y,Z coordinates) and another dataset with keypoints (also X,Y,Z) which lie on quite recognizable structures in the point cloud. As a human it is pretty easy to find these keypoint given the according point cloud. There are 6-24 keypoints for each point cloud which may have up to 100.000 points but can be downsampled to fit into memory while processing. My goal is to train a supervised deep learning model to detect/generate these keypoints in new point clouds. These have to be new synthetic points since the keypoints are most likely not in my point cloud. Previously i tried to train a regression model using PointNet++ semantic segmentation. I generated weights for each point in the input point cloud according to its proximity to the next keypoint. For new point clouds the weights were predicted pretty well but it is very difficult to regenerate the synthetic keypoints from these weights since the area around the keypoint can be very sparse. Essentially i am trying to use a model like this RSN on 3D point clouds to detect synthetic keypoints in the data. I thought about using object detection models like VoxelNet but these detect bounding boxes and i want to get a single predicted point as a result. I am also wondering if its worth looking into GANs but i dont have experience with these models and until now i only found models who generate a whole new point cloud instead of a single points inside a given point…

Cross Validated 2023-02-27 15:22 UTC Score 15.0 AI-113-20230227-social-media-1c809357

When performing a 3-step analysis in Latent Gold, should I use ML or BCH to model an ordinal outcome?

I'm performing a 3-step analysis in Latent Gold 5.1. In step 3 I estimate a model with an ordinal distant outcome. The documentation of Latent Gold gives advice for when to use ML (categorical dependent) or BCH (continuous and count dependent). But it does not explicitly state which method to use when modelling an ordinal dependent variable. Any advice much appreciated.

Cross Validated 2023-02-26 19:34 UTC Score 23.0 AI-113-20230226-social-media-89ce55c1

Simulated data (with the outcome and predictors) from a GLM model

The goal of simulation is to produce a number of synthetic datasets, where the outcomes are a function of the known regression coefficients. I would like to know if my reasoning behind creating synthetic data is valid. The steps involved are: STEP 1: Based on the true (observed) data, fit GLM (e.g., gamma family). STEP 2: Make a synthetic predictors. STEP 3: Based on the output from STEP 2 and the fitted or predict function in R, obtain the expected outcome. STEP 4: Based on the expected outcome, get the estimated shape and scale parameters (based on E(X) and Var(X)). STEP 5: Obtain simulated outcome using the rgamma function in R. STEP 6: Combine the output from STEP 5 and the synthetic predictors from STEP 2 to obtain the full simulated data. In this manner, I am able to generate a synthetic dataset with the same dimension as the true (observed) dataset. However, I am wondering if this is a right way and if I can (or need to) remove STEP 4 - 6.

AI Stack Exchange 2023-02-24 17:36 UTC Score 9.0 AI-110-20230224-social-media-4ac29790

Many To One LSTM - Can I Use the Same Sequence as Input from Previous Timesteps?

I'm new to LSTMs, and I'm trying to do a basic timeseries prediction using stock prices. However, I'm a bit confused as to how the LSTM is supposed to remember outputs from previous timesteps when it has a many to one shape. For example, let's say we're at timestep n , and the following timeseries is part of my input: [[100, 10], [300, 30], [200, 20]] And it maps to some output, let's say 1 Great. But let's say at timestep n - 1 , when the input was just [[100, 10], [300, 30]] , the output was 0 . How will the LSTM know this? Should I include the same data at different timesteps (using something like zero padding) with the corresponding output? Or am I totally misunderstanding something about how LSTMs work?

AI Stack Exchange 2023-02-24 01:10 UTC Score 28.0 AI-110-20230224-social-media-27b02aee

Latent Diffusion Model Can't Learn the Latent Space of a VAE for the MNIST-Fashion Dataset

I'm currently playing around with LDMs on the MNIST-Fashion dataset. I thought the VQVAEs used in the original paper were a bit overkill for what I'm doing (and I don't fully understand how they construct the discretized codebook latent space), so I went with a simple convolutional autoencoder with a kl-regularizer to map to an approximately gaussian latent space. I've run this model a few times and verified that it does reconstruct the original image inputs fairly well. I run into issues when I try to use this model with my LDM implementation. I first made sure standard diffusion directly in image space works, which it does. I then tried latent diffusion with my trained autoencoder and I can't get the loss to drop below a certain threshold (~1.0), and the image outputs are pretty much gaussian noise still. As stated in the paper, I sample latent vectors from the encoder part of the autoencoder and scale them with stats collected from the first batch of data like so: batch = autoencoder.encode(batch).sample().detach() # rescale the embeddings to be unit variance if epoch == 0 and step == 0: print("Calculating scale factor...") std = batch.flatten().std() scale_factor = 1. / std cfg.scale_factor = scale_factor.item() batch *= scale_factor And then pretty much everything else (applying noise, calculating loss, etc) is the same as standard diffusion. Am I missing something, or is the latent space of my simple conv-autoencoder hard to learn for some reason? I would think that, s…

Data Science Stack Exchange 2023-02-21 17:44 UTC Score 12.0 AI-111-20230221-social-media-1e1a9f31 Full article

Tensorflow 2.11 error: AttributeError: module 'tensorflow._api.v2.compat.v2.__internal__' has no attribute 'register_load_context_function'

I had to update Tensorflow to the currently latest version 2.11. when importing i get "AttributeError: module 'tensorflow._api.v2.compat.v2. internal ' has no attribute 'register_load_context_function'". I have also completely reinstalled a full anaconda environment and downgraded Python to the version compatible with the latest of Tensorflow and then "pip3 install Tensorflow==2.11". Got the same error. I have no other ideas. The full error log is the following import tensorflow as tf --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) ~\AppData\Local\Temp\ipykernel_432\3752927832.py in ----> 1 import tensorflow as tf ~\AppData\Roaming\Python\Python310\site-packages\tensorflow\__init__.py in 467 if hasattr(_current_module, "keras"): 468 try: --> 469 _keras._load() 470 except ImportError: 471 pass ~\AppData\Roaming\Python\Python310\site-packages\tensorflow\python\util\lazy_loader.py in _load(self) 39 """Load the module and insert it into the parent's globals.""" 40 # Import the target module and insert it into the parent's namespace ---> 41 module = importlib.import_module(self.__name__) 42 self._parent_module_globals[self._local_name] = module 43 ~\anaconda3\envs\mltrade2\lib\importlib\__init__.py in import_module(name, package) 124 break 125 level += 1 --> 126 return _bootstrap._gcd_import(name[level:], package, level) 127 128 ~\anaconda3\envs\mltrade2\lib\site-packages\keras\__init__.py in 19 """ 20 f…

Cross Validated 2023-02-18 08:10 UTC Score 25.0 AI-113-20230218-social-media-ec5acd13

How do I modify logistic regression in my case (for repeated measures)?

I am a physician conducting some research in Critical Care patients (I have full ethical approval, none of my results will be used to inform patient treatment, etc). When a person's lungs are enormously sick, they can be turned on their front. It often helps. I have a dataset from around 135 patients who have had this maneuver performed. I am trying to create a logistic regression model (if appropriate) to examine if there are differences in the response of patients who undergo this. My outcome variable is 'death during ICU admission' (yes/no), and I have blood tests from before and after the positioning maneuver was performed. Each patient had between 1-13 of these changes in position performed (in total I have 360 instances of this happening in 135 patients). As far as I am aware, it is inappropriate for me to perform logistic regression since the 'treatment' was often performed multiple times on each patient. My question is as follows; do I need to modify my approach to logistic regression to analyze this data? Alternatively, is there a completely different approach I must use to do this?

Cross Validated 2023-02-17 23:45 UTC Score 12.0 AI-113-20230217-social-media-4071386b

Alternatives to ANOVA to find differences between three groups?

So my data is looking at the incidence of emotions within therapy sessions. I am looking at three groups that I suspect have different pattern across several emotions Group 1 n=36 Group 2 n=12 Group 3 n=6 The variables are measured in terms of time spent in that emotion (e.g., 10 minutes of anger, 5 minutes of sadness). I have also constructed a proportion for each emotion based on how much time spent in a given emotion divided by the total time spent experiencing any emotion (e.g., 10 minutes of anger divided by 20 minutes in emotion = 50% anger in that session). I am aware that the group sizes are uneven, and that one group is quite small - these are exploratory analyses so I would just like to find a way to compare them statistically as a starting point. Given that the groups are different across emotions - there is a low incidence of certain emotions in some groups, thus violating normality and homogeneity of variance. What I want to know is whether these groups are different across each emotion type. Any ideas of what would be appropriate or other considerations before making a decision?

Data Science Stack Exchange 2023-02-17 10:22 UTC Score 15.0 AI-111-20230217-social-media-6de59e48 Full article

Solve optimization problem with machine learning algorithm

I have an optimization problem that I solved with grid search using hyperopt in python. In this problem, I have some parameters and a score. I want to find the best parameters that maximize this score. Until now, I didn't see any machine learning algorithms used for solving the optimization task. For example, in classification, we define the problem and use an optimizer (like SGD) to find the best weights. Are there any ML algorithms that can learn how to solve an optimization problem?

Cross Validated 2023-02-16 18:27 UTC Score 9.0 AI-113-20230216-social-media-7bb8e34f

Compare two distributions with discrete variables

I am trying to understand which kind of test I could use in order to test if two distributions differ significantly from each other. My data has the following structure: I have for two countries the numbers of cars sold per 100,000 citizens for 5 different car manufacturers.

Cross Validated 2023-02-15 09:21 UTC Score 26.0 AI-113-20230215-social-media-1d82436a

Get the R2/RMSE for each category of a dataset

This might be a dumb question ! I built a model and I'm satisfied enough with the model, given that I have a dataset with categorical variables I wanted to see the R2/RMSE for each of those categories, but I'm unsure on which set I should conduct this test should I use the training set for that ? My understanding is that the results would be too good because the model already "saw" the data I'm inputing. So should I use the test set instead ?

Cross Validated 2023-02-12 14:07 UTC Score 20.0 AI-113-20230212-social-media-64f94252

Time series analysis hourly data Python SARIMAX or better another ML-Algorithm

I am working on my bachelor thesis with time series data. The idea is to predict the expected battery life based on voltage data from sensors. During my research I came across SARIMAX. For me this ML algorithm sounded very plausible at first. Unfortunately, I was only able to generate constant predictions. Since I was not sure if this prediction was due to the underlying possibly incomplete data set. I Calculated a data set with charge and discharge curves myself. So the data set my questions refer to looks like this: Before passing the data to the algeorithm for learning, I logarithmized the data, formed the firstdifference, and tried to clean up the difference in seasonality. When I create a prediction with SARAMIAX I get only one constant like here: My goal is to continue writing the curve into the future something like this: I have read in some examples that it is not an error of the Sarimax model, but since the prediction only refers to the previous value, only a constant can be predicted. Now, of course, I'm wondering whether I'm on the wrong track with SARIMAX, or whether I've simply taught the model incorrectly and can continue to work with SARIMAX. Maybe there is another ML algorithm you would prefer for this task? Maybe someone reads this post who has experience with the prediction of time series data and puts me back on the right track. I appreciate any kind of feedback, thank you in advance. Edit: The original data is transmitted by the sensors every 15 min, I re…

Cross Validated 2023-02-12 13:08 UTC Score 20.0 AI-113-20230212-social-media-a54cd768

Differences-in-Differences Parallel Trends

I want to measure whether the impact of a company's headquarter country on my dependent variable (goodwill paid) is stronger during recessions. After some researching, I found out that the differences-in-differences analysis could solve my problem. However, in the internet they always show a diagram (see Figure 1 in Difference-in-Difference Estimation by Columbia Public Health) with the "treatment" and "parallel trends". So two lines that increase or decrease in the same way until the treatment and then one line increase/decreases more than the other. My question now is what is my treatment and what is my control variable in my example? The treatment cannot be recessions because otherwise I just have the treatment group after the treatment and the control group before the recessions. If you think another statistical test may be better, I would be happy to consider that. Furthermore, I just want to make sure that I created my model correctly: Goodwil Paid=B0+B1recession+B2Country+B3recessionCountry Would that tell me whether the impact of the country is stronger during recessions? Variable descriptions: -Goodwil paid (dependent variable): Is about how much is paid for a company in acquisitions. -Recessions: 1 if the acquisition was during the crisis and 0 otherwise -Country: The country the acquired company is bought in. It can have a value from 1 to 10 and is based on credit ratings of the countries. Most countries have the rating 1. Thanks a lot for your help. Let me know i…

Inria AI 2023-02-10 09:03 UTC Score 30.0 USR-0036-20230210-research-aca-257683f8 Full article

AIstroSight : nouvelle équipe-projet commune entre Theranexus, Inria, l’université Claude Bernard Lyon 1 et les Hospices Civils de Lyon, dans le domaine des maladies neurologiques rares

AIstroSight : nouvelle équipe-projet commune entre Theranexus, Inria, l’université Claude Bernard Lyon 1 et les Hospices Civils de Lyon, dans le domaine des maladies neurologiques rares mquet ven, 02/10/2023 - 10:03 Theranexus, Inria, l'Université Claude Bernard Lyon 1 et les Hospices Civils de Lyon créent une nouvelle équipe-projet de recherche publique/privée, AIstroSight. Cette équipe-projet a pour objectifs de développer des méthodes numériques innovantes pour la recherche de nouveaux candidats médicaments destinés à traiter les maladies du cerveau, en particulier certaines maladies neurologiques rares. © Inria / Photo B. Fourrier En exploitant le potentiel de l’intelligence artificielle et de la simulation numérique, AIstroSight vise à développer des approches in silico capables d’assister et d’accélérer la recherche de cibles thérapeutiques pertinentes , ainsi qu’à mieux comprendre les processus moléculaires et cellulaires impliqués dans les maladies neurologiques rares et leur traitement . La stratégie de l’équipe consiste à combiner les données biomédicales disponibles (cultures de cellules, imageries médicales, données hospitalières) en une source d'information suffisamment riche et homogène pour son analyse efficace par les algorithmes. Dans ce cadre, AIstroSight élargira son champ de recherche au-delà des neurones pour prendre également en compte les cellules gliales. Ces dernières sont des cellules cérébrales qui assurent la maintenance des neurones et régulent l…

How can I simulate the stationary distribution of particles that each moves differently?
Cross Validated 2023-02-09 22:51 UTC Score 9.0 AI-113-20230209-social-media-3832d031 Full article

How can I simulate the stationary distribution of particles that each moves differently?

Suppose a particle enters a system at $0.5$ in the unit interval $[0,1]$ . With some probability $\lambda_{right}$ , particles go right by $$x_{right} = \frac{x\pi_{H}}{x\pi_{H} + (1-x)\pi_{L} }$$ and with some probability $\lambda_{left}$ , they go left by $$x_{left} = \frac{x(1-\pi_{H})}{x(1-\pi_{H}) + (1-x)(1-\pi_{L}) }$$ where $1>\pi_{H}>\pi_{L}>0$ , so that $x_{right} \geq x \geq x_{left}$ . These are Bayesian updating formulae. I want to simulate the stationary distribution of this system, where the fraction of particles at each point does not change anymore. At the moment, I don't want to impose any restriction on $\pi_{H}$ and $\pi_{L}$ . If $\pi_{H} = 1-\pi_{L}$ , for instance, I can simplify the position of each particle just by how many net right moves it had and get closed form solution from a second-order recurrence equation, but this is not I want to do. I had two options. (1) Make regular grids from 0 to 1. Depending on $\pi_{H}$ and $\pi_{L}$ , the grid points might not equal the support of positions created in this system, meaning some grid points might not be reached just because of the parameters in the formulae. I just linearly interpolate while finding a fixed point of $v(x) = \lambda_{right} v(x')+ \lambda_{left} v(x'') $ such that $x'_{right} =x$ and $x''_{left} = x$ . However, I'm not sure if this is a mathematically or numerically rigorous method. Most importantly, when I impose $\pi_{H} =1-\pi_{L}$ , it doesn't give me the same simulation result as…

AI Stack Exchange 2023-02-09 04:45 UTC Score 9.0 AI-110-20230209-social-media-75acede5 Full article

L2 regularization in BN layers, how to set gamma?

I have read tensorflow's documents about batch normzalization , but still don't get what is the gamma regulizer? the link to document: https://www.tensorflow.org/api_docs/python/tf/keras/layers/BatchNormalization

Cross Validated 2023-02-09 01:51 UTC Score 17.0 AI-113-20230209-social-media-84c70b65

How can I test for phylogenetic signal in a discrete trait ( i.e. counts of parasites)

I am running a PGLMM with a Poisson error distribution in R to evaluate the effect of sociality (binomial) in parasite loads. I want to test for phylogenetic signal in discrete data (e.g counts of parasites in bird species). However, I found several ways of testing for phylogenetic signal on continuous data (phytools::phylosig ..pagel's, K, ) and in categorical (data ape::delta), but not much in how to test this in discrete (count data). Any ideas will be really appreciated!

What could cause the training loss to be different at the same epoch “x” when retraining a model?
AI Stack Exchange 2023-02-07 22:40 UTC Score 18.0 AI-110-20230207-social-media-3b86ed6b Full article

What could cause the training loss to be different at the same epoch “x” when retraining a model?

During a training of a neural network, the test loss reached the its minimum at the x th epoch. Afterwards, I reran the training with the maximum epoch set as x . What is surprising to me is that the test loss in the 2nd run was very different from the 1st at epoch x , even though every other hyper-parameter was the same. The only change I made was the maximum epoch. What could be a possible explanation for this phenomenon? I used the standard DataLoader from Pytorch to shuffle the training data. The seed is also the same.

Cross Validated 2023-02-07 13:43 UTC Score 20.0 AI-113-20230207-social-media-1490ef33

How to compare two ranked lists of genes with ranking values?

I have 80 independent sets of genes with 6000 genes in each. Gene expression values are ranked and scaled from 0 to 1. So, a set looks like this: Gene1 1 Gene2 0.98 Gene3 0.85 ... Gene5998 0.002 Gene5999 0.0015 Gene6000 0.00001 Each set has 6000 of the same genes, but of course, the expression values are different in each set. However, I should have several couples of sets that are very similar. By similar, I mean that the majority of genes should have similar values in two sets. What will be the best way to find those similar sets? And how to show that similarity? One way that I was thinking is to take set A and set B, remove all genes with expression lower than some threshold (like 0.01) in both sets, and find Jaccard similarity between gene sets. But it is hard to set a threshold in this case. More details as requested: Those 80 gene sets were obtained from two different datasets. The goal is to see if some of the 40 gene sets from dataset 1 are similar to some of the 40 sets from dataset 2.

Cross Validated 2023-02-07 08:27 UTC Score 9.0 AI-113-20230207-social-media-68210edb Full article

P-value of negative binomial regression too high?

I am currently working with regression analysis in combination with language analysis on online reviews. I would like to give you a short description of my task and what I want to achieve with it, in order to maybe find a proper solution. I wanted to find possible correlations with the helpfulness score given by the users. For this I used scaled_HS as my dependent variable y . For my variable x I used 63 language features from the LIWC manual . The helpfulness score got scaled by the maximum number of views, to give ratings such as 500 thumbs up and 1000 views a bigger weight than 2 thumbs up and 4 views. Below is a small description of my dataframe: Rating Spoiler HS WC Tone WPS Dic function. ppron i ... swear netspeak assent nonflu filler QMark Exclam keywords mistakes scaled_HS 0 1 0 0.37 150 25.77 16.67 90.67 46.67 5.33 1.33 ... 0.00 0.00 0.00 0.0 0.0 0.00 4.00 0.000000 0.186667 0.017273 1 1 1 0.16 131 1.55 26.20 89.31 58.02 6.87 0.76 ... 0.00 0.00 0.76 0.0 0.0 3.05 0.00 0.000000 0.137405 0.026339 2 1 0 0.24 133 39.19 33.25 92.48 50.38 3.01 2.26 ... 0.00 0.00 0.00 0.0 0.0 0.00 0.00 0.000000 0.097744 0.044079 After applying simple linear regression with the Pearsonr function I found out that some features were significant but had very low coefficients, except HS but I forgot to delete the column, because I have the scaled HS anyways: Coefficients p-value Rating (-0.06201207484873128, 0.015435587631467379) Spoiler (0.059553066433509855, 0.020030343178780382) HS (0.42003896…

AAAI 2023-02-02 21:54 UTC Score 15.0 AI-081-20230202-research-pap-356dfda9 Full article

Milind Tambe of Harvard University and Google Research Wins 2023 AAAI Feigenbaum Prize

The 2023 recipient of the Feigenbaum Prize is Milind Tambe, for high-impact contributions to the field of artificial intelligence through innovation and achievement in socially beneficial applications of AI in security, healthcare, and conservation. The post Milind Tambe of Harvard University and Google Research Wins 2023 AAAI Feigenbaum Prize appeared first on AAAI .

AAAI 2023-02-02 13:12 UTC Score 10.0 AI-081-20230202-research-pap-5e0288a0 Full article

Ayanna Howard of The Ohio State University wins 2023 AAAI/EAAI Patrick Henry Winston Outstanding Educator Award

The 2023 recipient of the Feigenbaum Prize is Milind Tambe, for high-impact contributions to the field of artificial intelligence through innovation and achievement in socially beneficial applications of AI in security, healthcare, and conservation. The post Ayanna Howard of The Ohio State University wins 2023 AAAI/EAAI Patrick Henry Winston Outstanding Educator Award appeared first on AAAI .

AAAI 2023-02-01 16:47 UTC Score 10.0 AI-081-20230201-research-pap-1ff4f2e9 Full article

Tuomas Sandholm of Carnegie Mellon University wins 2023 AAAI Award for Artificial Intelligence for the Benefit of Humanity

Since 2021, the AAAI Award for Artificial Intelligence for the Benefit of Humanity has recognized the positive impacts of artificial intelligence to protect, enhance, and improve human life in meaningful ways with long-lived effects. This year, the AAAI Awards Committee is pleased to announce that the 2023 recipient of the award and $25,000 prize is […] The post Tuomas Sandholm of Carnegie Mellon University wins 2023 AAAI Award for Artificial Intelligence for the Benefit of Humanity appeared first on AAAI .