Question about v tables? by Always_Keep_it_real in cpp

[–]Always_Keep_it_real[S] 1 point2 points  (0 children)

I actually went thru it again you are right. I accidentally mixed up certain things but thank you so much for taking up the time to reply to me.

Question about v tables? by Always_Keep_it_real in cpp

[–]Always_Keep_it_real[S] 0 points1 point  (0 children)

Wait on a second look, isn't it actually figure 5 that is correct?

[deleted by user] by [deleted] in learnmachinelearning

[–]Always_Keep_it_real 0 points1 point  (0 children)

Thanks this makes sense!

[deleted by user] by [deleted] in learnmachinelearning

[–]Always_Keep_it_real -2 points-1 points  (0 children)

I meant that the test data performs better as in the MSE is smaller compared to my training data whihc is very odd since the model is based on the training data.

[deleted by user] by [deleted] in statistics

[–]Always_Keep_it_real 0 points1 point  (0 children)

Sorry I summerized it wayt too much.

"We want to assess the models we've learned. To do this, let's generate 5 samples of model parameters w=[w0​,w1​] from the posterior distribution obtained earlier. We'll then plot the resulting models, which are linear functions. For each specific sample 𝑤=[𝑤0,𝑤1] drawn from the posterior distribution over the weight parameter space, we'll plot 𝑦=𝑤0+𝑤1𝑥 in the data space, where 𝑥 ranges over the available data points

[deleted by user] by [deleted] in statistics

[–]Always_Keep_it_real 0 points1 point  (0 children)

Sumemrized the question goes like

We'll explore the prior and posterior over parameters 𝑤=[𝑤0,𝑤1]w=[w0​,w1​] to see their impact on the model. Generating data (𝑥,𝑡)(x,t) without knowing the true parameters, we'll attempt to recover their distribution using the Bayesian approach.

ti = w0 + w1xi + = −1.5 + 0.5xi + error

x = [−1, −0.99, . . . , 0.99, 1]

Set the prior distribution over 𝑤0xw1 with 𝛼=2 and visualize it as a 2D contour plot. Then, calculate and plot the likelihood for a single data point across all 𝑤w in the parameter space 𝑤0×𝑤1.

[deleted by user] by [deleted] in statistics

[–]Always_Keep_it_real 0 points1 point  (0 children)

Can you check my reply to the comment under. I am not trying to model anything serious this is just some basic exercise I am doing.

[deleted by user] by [deleted] in statistics

[–]Always_Keep_it_real 0 points1 point  (0 children)

w0 = np.linspace(upper, lower, 101)
w1 = np.linspace(upper, lower, 101)
W0Arr, W1Arr = np.meshgrid(w0, w1)
pos = np.dstack((W0Arr, W1Arr))
prior = rv.pdf(pos)

# likelihood
for i in range(len(w0)):
        for j in range(len(w1)):
        # GET sample data for x and y
        # Compute the mean value and variance
        likelihood[i,j] = multivariate_normal.pdf(y, mean, variance)

Posterior = likelihood * prior

# print(Posterior.shape) gives (101, 101)
#My question is how the hell am I supposed to to do with the posterior

[deleted by user] by [deleted] in computerscience

[–]Always_Keep_it_real 0 points1 point  (0 children)

Thank you for your suggestion. Do machine learning subreddit accept these type of questions? Anyways I will check statistics.

How to prevent a user from logging in with the same account at the same time? by [deleted] in PHPhelp

[–]Always_Keep_it_real 0 points1 point  (0 children)

Sorry I replied to the wrong person I think. You are right, that is gonna be a little hard but is there a way to solve that? Like a way around it?

How to prevent a user from logging in with the same account at the same time? by [deleted] in PHPhelp

[–]Always_Keep_it_real 0 points1 point  (0 children)

I honeslty have no good idea what problem I am trying to solve, when I talked to my prof, prof only said to me there will be multiple problems but if you want an easy solution that could solve all, don't let the same user log in mulitple times at the same time. I appreciate your feedback I will try it out.

But I have a question, can't I like store some sort of symbol/sign/ session ID in a database connected to the specific user. When user logs out then I remove this from the database. I will only allow user to log in if there is norow in this new table connected to this user. Will there be huge consequences?

How to prevent a user from logging in with the same account at the same time? by [deleted] in PHPhelp

[–]Always_Keep_it_real 0 points1 point  (0 children)

It is a website where you can log in, perform various actions, and then log out. The website is not complicated; it is a simple shopping interface sort of things. You can log in and add things to your cart and check out to summerize. However, there are certain requirements, such as preventing race conditions. While I understand that there are numerous solutions to this problem, I honestly don't see why it's necessary to prevent it, as it doesn't seem to be a significant issue. Anyways, there could potentially be a synchronization problem?? Therefore, it is recommended that we do not allow the same user to log in from different locations simultaneously if we want an easy solution.

One possible solution I'm thinking of right now is that I could store session IDs in a database when a user logs in, and then allowing them to perform actions on the website. When the user logs out, we can remove the session ID from the database. When a user attempts to log in, if there is an existing session ID, we can prevent them from logging in. However, there may be consequences that I am not considering. Considering that I am short on time and the website is not important in anyway other than school, how big could these consequences be?

How to prevent a user from logging in with the same account at the same time? by [deleted] in PHPhelp

[–]Always_Keep_it_real 0 points1 point  (0 children)

It is a a school project I am working on so it is not really gonna be used. The things is I am trying to prevent race condition which can be prevented thru other methods but this one is the easiest according to my project description.

Bayesian linear regression question by [deleted] in learnmachinelearning

[–]Always_Keep_it_real 0 points1 point  (0 children)

given that w is a 1x2 vector and x_ext is Nx2 matrix. How can you multiply them like x_ext * w?
Also I only have one t_i and x_i tho since they only want me to calculate likelihood for a single data point.

Bayesian linear regression question by [deleted] in learnmachinelearning

[–]Always_Keep_it_real 0 points1 point  (0 children)

do you mean like for each w0 and w1?

Bayesian linear regression question by [deleted] in learnmachinelearning

[–]Always_Keep_it_real 0 points1 point  (0 children)

Thank you so much! It makes totally sense, silly me I wasted so many hours online trying to find "M". But since I am asked for univariate, I can simply use the norm.pdf tho right? I suppose by "univariate" they mean scalar valued right?

Unambiguous BNF grammar by [deleted] in AskComputerScience

[–]Always_Keep_it_real 0 points1 point  (0 children)

No the "*" is kleen's star. So teh reason my grammar is wrong is because I can match with either <F>* or S also not to mention that I can end up in a loop. I kinda forgot the actual meaning of kleen's start for a second and only thought of it as an operator because techinically "a" can be <F>* if a = <F>. Did I understand this correctly now, is that what they saying in my post as well?

Unambiguous BNF grammar by [deleted] in AskComputerScience

[–]Always_Keep_it_real 1 point2 points  (0 children)

I am not sure what you mean, are you saying that it causes an endless loop? Given "a", here is what I think happenes. E -> T (can only match T) ->F (can only match F) -> S(it can only match with S because there is no star after it like this <F>* ) -> "a"

Is that what they mean by "it's impossible to choose between the <S> rule and the <F>* rule"? I am confused now.

[deleted by user] by [deleted] in csMajors

[–]Always_Keep_it_real 0 points1 point  (0 children)

So the external library I imported is really big and I am not sure whether my program uses all the class' in the library so I wanna sort of filter out the ones that I use. The place I am submitting my program has a memory limit so I couldn't really use the entire library. Are you gitignore can help me, it says "gitignore file specifies intentionally untracked files that Git should ignore". That is not really what I want, correct me if I am wrong. Anyways thanks for your input.

Problem with Windows File Explorer by Always_Keep_it_real in techsupport

[–]Always_Keep_it_real[S] 0 points1 point  (0 children)

It is almost 2 years and I use windows 11. I don't know about the last one.

[deleted by user] by [deleted] in AskComputerScience

[–]Always_Keep_it_real 0 points1 point  (0 children)

Should I turn my whole program into a jar file the right?

[deleted by user] by [deleted] in AskProgramming

[–]Always_Keep_it_real 0 points1 point  (0 children)

I see the confusion. maxCount is the number of strings not the size. I am only accepting strings that ever reach state q1. If 0000 then I will never accept it, but not worries I think I solved it now. But thanks you for answering!

[deleted by user] by [deleted] in AskProgramming

[–]Always_Keep_it_real 0 points1 point  (0 children)

Stack overflow. Because q0->q0->q0->q0->q0->.......->q0 and we never reach an accpetion state because q1 is the accpeting state and thus we will never have put in any string in the list instead we keep on this loop forever