I’m not sure how to use Predict[]

In my university I got an assignment: I need to predict the stock price using two of machine learning methods with imported data. (I’ve chosen Linear regression and Decision tree).
I tried to make a program myself but encountered errors and since I’m a rookie in machine learning I don’t quite understand what I’m doing wrong.
I added a screenshot how the data in imported file looks like just in case.
So here’s my code:
a = Rest[Import["Test.xlsx", {"Data"}][[1]]][[;; - 2, {2, 3, 4, 5, 6, 7}]];
b = Rest[Import["Test.xlsx", {"Data"}][[1]]][[;; - 2, {8}]];
trainingset = {a -> b};
prediction1 = Predict[trainingset, Method -> "LinearRegression"];
prediction2 = Predict[trainingset, Method -> "DecisionTree"];
At lines where I use Predict[] I got these error:
"Predict: Incompatible variable type (Numerical) and variable value ({{243.73},{242.65},{240.82},{240.87},{239.1},{236.1},{234.5},{238.18},{237.6},{238.91},<<991>>})."
So can someone explain me what’s going on here?

enter image description here

If an AI is sure it is going to lose, what can it do to make the game fun for the player?

For context i am contributing to a sequential turn based strategy game. I have an idea how to improve it but i feel i need some input to help me evaluate and improve it. We currently have a really dumb AI that just follows a rough set of rules each turn. I’m considering to upgrade it to a basic search based AI to not be guaranteed to win every time i play it.

There are many reason why an AI could be behind the curve. These include that is wasn’t able to grow it’s economy well due to bad luck with map generation, that it’s economy was disrupted early by an enemy raid while the defending army was out of reach, that the starter army was defeated early and resources had to be invested to replace it instead of economic upgrades or more importantly there being a big awesome deciding battle with all units involved and it lost. A search based AI will be able to know when it is obvious that it is growing slower than it should, can’t recover and it is now impossible to win due to runaway success. Such a runaway success is often boring to play especially if it happened 3 times in a row.

Assume there is no meta game where multiple players can gang up on the strongest one. I am open to nudge the game rules in the AIs favor if this happens. However rubber banding can give the player the impression that they are punished for playing well, the AI drags out a game into an almost stalemate or even wins unfairly.

The problem i’m trying to solve is not that the AI is loosing but that the AI rolling over and dying is not fun or interesting.

It is even worse. If the player is sufficiently good he will experience that every time.

In some theories of literature after the conclusion seems forgone and the tension is falling a new small conflict that is relevant enough or something else that justifies further elaboration and excitement. enter image description here

My idea is to have a library of endgame scenarios, a handful of which end up with player loosing unless he plays really well, most pose a small challenge that the player is entirely able to deal with and some are a "i role over, just kill me already, please".

Are you aware of anyone trying something like this before? If someone tried this in a strategy game or even outside of strategy games before i would like to learn from them.

Can you spot some obvious problems with this idea? I already considered the AI misjudging the impossibility of wining. However i might be to enamored with my idea to spot different problems.

How can i make sure that this still feels fair? It is easy for the AI to get some extra resources however if a player is loosing i am afraid that he would feel cheapened if he got some extra money and units.

How i help the player having fun or at-least variety when they are losing? I really have no ideas for this.

how to make sure your wordpress is clean of any old files from previous themes so you can install a new theme

with no issues from past themes/plugins. The goal here is I am planning to install a premium theme for my existing WP site and use Divi Plugin So far I’ve tried contacting Bluehost but they just did a ‘scan’ or something so I don’t know if they understood what I meant. I’m relatively new to WP. Tinkering for about 2 years. I’ve tried google searching and irrelevant articles pop up. When searching this site I got 0 results. Hope I’m articulating my question well.

How to make sure characters act accordingly when a spell that clouds judgement is cast on them?

If an NPC spellcaster, or any other magic source, magically clouds the judgement of a PC, how can I make sure the player acts according to the spells nature? Is there anyway to do this without seizing their character? My specific example is, in d&d-5e, if the spell Enemies Abound, which makes the target perceive all creatures as enemies, is cast on a player, how can I encourage them to choose targets indiscriminately? Would I have to control their PC, or could I allow them to remain in control?

How do I make sure access token comes from authenticated user?

My problem boils down to the use of Okta’s access tokens to secure api endpoint.

I followed this okta guide to set up a react single-page application with their wiget.

When I log into the site I get a access token to use with my api.

I tried to access my api with the access token following this guide

On the api side Okta recommended to verify the access token. When I use their OktaJwtVerifier to verify the token I get faced with a question. How does this verifier know that I gave them the token from a authorized state and not from someone hijacking the token?

The verifier supposedly asserts that

  • Signature is valid
  • Access token is not expired
  • The aud claim matches any expected aud claim passed to verifyAccessToken().
  • The iss claim matches the issuer the verifier is constructed with.
  • Any custom claim assertions that you add are confirmed

But the validator does not know where the token came from.

I noticed that the access token gets saved into localStorage.

Does this not open up for a impersination attack on the access token? Suppose someone got access to the localStorage and used the access token on my api without authenticating. I tested if this would work and it did.

How can I prevent someone from stealing and using my access token without authenticating ???

A player rolled very bad stats, how to make sure they still enjoy the game?


Question

How to make sure that a player that rolled awful stats will still have an awesome time at the table? What possibilities are available for the DM? Would it feel cheap to find stat-boosting items? What can players do to make sure that player is still having fun?

The simple solution of re-rolling the stats is out of the question. The adventure has already begun and it would feel very unsatisfying if the original rolling carried no weight at all.

Background

Starting a new adventure, we all decided to roll stats (highest 3 of 4d6) for our new characters. Most people rolled stats close to what one would get with point-buy, but one player had all stats in the range 8 to 11 and averaged below 10 (which is worse than a commoner).

The players are all quite new to the game and it is the debut for the GM. We all had some laughs on the horrible rolls and everyone is still having fun. The player has not complained yet, but my worry is that it will feel less fun in the long run.

The player picked druid, so they can wild-shape away the physical stats at level 2.

[ Politics ] Open Question : Did you know for sure you were gay or straight when you were nine years old”?

I was reading today’s headlines on Google News and came across this: ‘I want to be brave like you’: 9-year-old boy asks Pete Buttigieg to help him tell the world he’s gay. I don’t think I was definitely attracted to girls until I was almost twelve years old. Do kids figure that out sooner these days?

how to make sure vulnerability management does not lead to reduced to compromised security

when running vulnerability scans often a particular version of say Node.js is reported to be vulnerable along with a recommendation to update to a higher version. Then we have also unsecure TLS, SSL protocols like TLS 1.0 and SSL 3.0 and it’s recommended to disable them altogether. For me, any of the above recommendations is a change that needs to be applied to a given application, host etc. Now I’m wondering have one can make sure that any of two changes does not lead to reduced or compromised security? How one can make sure that the new Node.js version is not introducing even more severe weaknesses / vulnerabilities ? How does change management fit into this ? In the end updating the Node.js version or disabling unsecure TLS/SSL protocols is a change request? Isn’t it?

How to make sure we are in a safe room?

This must have been asked before but can not find it. The closest I found was this post but it lacks (perhaps in my knowledge of the documents in it) a clear understanding in the preparations of for example a room where two world leaders would meet, why both of them would be confident enough to be sure that they are not being monitored?