Hello, and welcome to this session. This is Professor Farhad. In this session, we would look at applications of the time value of money, part two. This topic is covered in introductory financial accounting courses, as well as intermediate accounting, managerial accounting, as well as corporate finance or introduction to finance. Also covered on the CPA exam. As always, I would like to remind you to connect with me on LinkedIn. If you haven't done so, YouTube is where you would need to subscribe. I have 1,600 plus accounting, auditing, finance, and tax lectures. This is a list of all my courses, including many CPA questions. If you like my lectures, please like them, share them, subscribe, put them in playlists, connect with me on Instagram. If these lectures are helping you, it means they might help other people, so share the wealth. On my website, farhadlectures.com, you will find additional resources and supplementary material that's going to help you succeed in your accounting education, as well as your CPA exam. I strongly suggest you visit my website. For this recording, you will need the time value of money concept as a prerequisite. The link for those sessions are in the description, is in the description below. Make sure to check it out in case you are not familiar with the concept of the time value of money. So let's take a look at part two. This is part two. I already worked part one, so if you're not sure, look in the description. You can see part one if you're interested in practicing those exercises. So let's look at part two. And part two, also a series of questions that's going to illustrate the time value of money. Let's take a look at the first question. For each of the following situation, identify whether the case is either a present value or future value, a single amount or an annuity, the table you would use in your computation, but do not solve. I'm going to go ahead and solve anyhow, sorry, in the interest rate time period you would use. So basically, we're going to go over each one of them and solve it anyhow. Let's look at A. You need to accumulate $10,000 for a trip you wish to take in four years. Hopefully the coronavirus will be done by that time. You're able to earn 8% compounded semi-annually on your savings. Excellent. So the first thing I know is the interest rate is 8% since it's compounded semi-annually it's 4%. So I equal to 4%. You plan to make one deposit and let the money accumulate for four years. So this is you're only making a single deposit. So we are looking at a single amount. What amount? How would you determine the amount of one deposit? Well, so you need 10,000. You need 10,000. How much do you need to invest today? And you can invest this money for the I is compounded semi-annually which is 4% and the N they say for four years. Four years is eight periods. So four years is eight periods because you're going to be that money it's going it's going to accumulate every six months. So how much money you will deposit today? And I'll have to make the I'm going to have to show you the computation although they don't they don't show you this. Well how would you do so easy? I'm going to take my amount go to my present value of a dollar amount I equal to 4 and equal to 8 and equal to 8 and the factor is 7,300.7307. So if I take 10,000 times 0.7307 I should get 7,307 dollars. So today I should invest 7,307 dollars. Now I'm going to have to show you the computation for sure because I want to show you how the compounding work. So let's go to the Excel sheet. So my answer was 7,307 dollars. Now what I said is this I'm going to have period one, period two. I'm going to have remember I said I'm going to have eight periods and each period because it's four years but semi-annually eight periods and I equal to 4 percent. So here's what's going to happen. This money the 7,307 after six months later it's going to grow at 1.04 it's going to grow at 4 percent. Then I'm just going to drag the formula it's basically what I'm going to be doing six months later it will grow to 7,903 the previous amount times 1 plus 0.4 and if I drag it all the way notice the amount is 10,000 dollars. So notice because it's compounded semi this is compounded semi-annually. So I will need today 7,307 dollars. So what I did simply put what I did is I used my present value table to figure it out to figure it out. Now what else I can do I can take the 10,000 I can take the 10,000 and go to my future value table I can go to my future value table. I equal to 4 percent and equal to 8 and it's 1.368. So if I take my 10,000 let's do the math and I divide 10,000 by 1.3686 that's going to give me 7,306 dollars that's fine that's good enough for me. Notice it's the same answer so I could use either the present value table or the future value table. I would use the present value because they're giving me the future value I'd like to use the present value but you could use both remember they're the reciprocal of each other this is what I talked about in the discussion. Now let's take a look at part B assume the same fact in part A except that you will make semi-annual deposit to your savings account so simply put in part A we said if you deposit 7,307 dollars you would receive 10,000. Now what happened in part B in part B saying let's assume you're going to be making one two three four five six seven eight one two three four five six seven eight you're going to be making eight payments eight payments to get to 10,000 dollar how would you find out what's your payment here we are dealing with n equal to same thing as the part A n equal to eight it's four years but it's semi-annual i equal to four percent we know that from if we take the payment once we find the payment times the factor that's going to give us the future value we don't know the payment payment is the x can we find the factor sure we can this is a future value problem we go to the future value annuity table future value annuity table and in this problem we have n equal to eight eight periods at four percent and the factor is 9.2142 so the factor is 9.2142 so let's go ahead and 9.2142 that's going to give us 10,000 dollar now if we solve for x 10,000 divided by the factor 9.2142 it's going to give us a payment approximately 85 dollars at 1,085 dollars now the best way to to prove this is also to show you on an excel sheet so let's go ahead and do so so remember in the prior problem we needed seven thousand and three dollars now let's take a look at this so we're going to have eight payments and we're going to be adding payments to the balance payment plus balance and we're going to have the interest rate of four percent the interest rate is four percent and we're going to have the balance column for the balance so let's do this and see if indeed 1,085 dollars will get us where we need to do we'll get us where we need to get which is 10,000 dollar so we have payment one payment two we have eight payments so I'm just doing the math proof just to kind of show you that is what it is first I have 1,085 and 25 set 28 set to be more specific this money is going to grow at four percent oops four percent so I'm going to I'm going to be making the first payment six months later it's going to it's going to grow at six percent and it's going to grow to be this amount times one plus four percent remember I need my original amount it's going to grow to be 1,128 what I'm going to do I'm going to take this this balance and add to 1,085 six months later and I'm going to let it grow also at four percent and this amount it's going to grow to be 2,302 and what I'm going to do I'm going to drag the formula you guys see what what I'm doing here I'm going to drag the formula here I'm going to drag the formula here and four percent it doesn't matter 0.04 or four and I'm going to drag the formula here and if you notice if I keep adding 1,085 let it grow at four percent at 1,085 let it grow at four percent at 1,085 after eight payment I will have approximately $9,997 okay so this is how we found the value of this the payment which is the payment is what they're asking us is for the payment so I need to make a payment of approximately 1,085 eight payments it will get me approximately 10,000 that's the other way if I don't have 7,307 now to invest all at once often people don't have the money they will save and now you find out exactly how much you will need to save for that hopefully this makes sense to you let's take a look at number C C as in Charlie you want to retire after working 40 years with savings and access of a million so your goal is to have a million you expect to save four thousand a year for 40 years and earn an annual rate of eight percent will you able to retire with more than a million in 40 years well basically what are they asking us here they're asking us if you invest four thousand every year for 40 years and your money earning eight percent will you have a million that's your goal so simply put on again I like always I like to always show you this on a graph because hopefully it makes sense so this is one two three four five six seven eight nine ten eleven twelve thirteen fourteen seventeen eighteen nineteen twenty twenty one twenty two twenty three twenty four twenty five twenty six twenty seven twenty eight twenty nine thirty thirty one thirty two thirty three thirty four thirty five thirty six thirty seven thirty eight thirty nine forty so you're going to be making forty each of these is four thousand and if you make those four thousand dollar payment will you have a million dollar if you invest this money at at eight percent well how would I know well I'm going to take four thousand it's an annuity times the few future value annuity n equal to forty i equal to eight percent so four thousand times that so let me go to the future value and find out if I can do it or not let's see let's see n equal to forty i equal to eight percent so I'm going to take four thousand times two fifty nine and point oh five oh five oh five okay so let's see if that's enough for me to retire if I take four thousand times two fifty nine point oh five oh five and that's going to give me one million thirty six thousand yes I should be fine one million approximately one million thirty six thousand yes I should be fine I should have my million dollars so let's take a look at number d a sweepstake agency names you names you a grand price winner you can take 225 immediately now or elect to receive an annual installment of thirty thousand dollar for twenty twenty years you can earn ten percent which of these prices do you choose so here we are making a we are making a an analysis a decision should we take the 225 now or should we take 30 000 for the next 30 years so here's option one option one you don't need to do anything 225 option two I need to find 30 000 times the present value annuity factor n equal to 30 I'm sorry n equal to 20 I equal to 10 percent that's basically so so 225 versus if I wait and get this money later in 30 000 would I would I be better off it pretty straightforward analysis in a sense so let's take a look at it so on the present value annuity factor n equal to 20 I equal to 10 present value annuity I have n equal to 20 I equal to 10 and the factor is 8.5136 so 30 000 times 8.5136 let's see if that is that is see which one is better 30 000 times 8.5136 that's equal to 225 408 practically the same 225 408 guess what it doesn't matter it doesn't really matter so simply put if you take option one today take 225 today or wait to get 20 30 000 assuming you can earn 8 percent on your 10 percent it's it doesn't matter it those are the same amount so which choose the which prize do you choose I don't know which prize do you choose I'll take the 225 today or I don't know I don't know 10 percent is pretty good 10 percent if you know because they're they're basically option two they're guaranteeing 10 percent and I you know the goal is can you get this money today can you get the 225 today and earn more than 10 percent so this is what basically boils down to can you make an investment where you could earn more than 10 percent if you can take option one if you cannot if you cannot find an investment whether it's in stocks bonds real estate start your own business deposit that money in the bank and 10 percent is pretty tempting okay I'm not sure I'm not really sure what I would do okay that's for you to decide congratulations for winning okay um as always um visit my website in the next three quarter I'm thinking about looking at excel sheet showing you how to solve this problem in excel sheet annuity problems present values and if you're studying for your CPA exam as always study hard especially for your courses accounting is worth it and stay safe during those coronavirus days


It is the evening of 4th December 1957 and a thick fog has descended upon southeast London UK. Commuter trains out of some of London's busiest terminals are severely delayed. The trains are busy tonight with many hopping on the first they can get on. One of these trains is an electric multiple unit bound for Hayes Bromley Kent. The train departs Charing Cross 30 minutes late and heads down the line to Waterloo East, then London Bridge, New Cross and Pass St John's. Owing to the late departure and fog, the Hayes train, much like others, have missed their slot in the carefully arranged timetable. After slowing passing the St John's signal box, the train is brought to a stand at the signal just before the next signal box. The signaler needs to know where the train is going as it is running out of sync. This is not unusual. However, this rather run-of-the-mill hold-up will be the scene for the third worst rail disaster in British history, in which two trains were collided and 90 would die. Welcome to Plainly Difficult, my name is John and today we will dive into the Lewisham St John's rail crash. I'm back at the scene of a disaster in the flesh. I've travelled through here hundreds of times over the years, but it's only been recently that I've discovered it was the location of a terrible crash. I posted some photos and footage up on my Instagram last month when I was down here getting some film. And a good few of you guessed correctly where I was. Oh and whilst I'm here, as always the B-roll footage is up on my second channel. The link is in the description as well as the pinned comment. Our disaster today is a big one involving two trains and a bridge collapse. I'll keep the background light on this one and I won't dive too deep into British railway signalling, as I have covered this before in the Harrow and Wilston and Clapham crashes. Background. St John's has always been a bit of a nowhere stop. There's not much to do around here and as such it's not really a destination station, more just a suburban stop that commuter trains call at. It marks roughly halfway between New Cross and its interchange in the 1950s at least with the London Underground East London Line and its south-eastern railways interchange at Lewisham. Trains bypass St John's on the through lines on their way to either London Bridge or down on the south-eastern mainline. But although not a massively busy station, the area is busy with junctions and can become a bit of a pinch point for trains heading south-east out towards Kent. The St John's signal box is responsible for signalling trains towards Lewisham and the North Kent line or along the south-eastern mainline down towards Park Bridge Junction and eventually Hither Green. Each major junction in this period of British railways signalling is controlled by its own signal box. As such, when a train is bound for Hayes from London avoiding Lewisham, it negotiates the down through across St John's junction and on to the down through south-eastern mainline. From here, the train has to negotiate the Park Bridge Junction, taking the diverging routes down onto the Mid Kent line. St John's is also interesting in that running over the junction is a bridge, which takes trains towards Peckham from Lewisham. But for this video, at least it's irrelevant. The south-eastern mainline through lines also accommodate fast services towards the Kent coast. The 1950s were a rather interesting time. Nowadays, if you sit at St John's, you'll only see electric multiple units, but in 1957, you can see electric, diesel and steam-powered formations. The same could be said for the signalling at the time, both automatic colour lights as well as absolute block signalling practices were in operation. But around St John's, it was colour light signalling and I'll briefly explain what each signal means as it's pretty vital in our story. Right, day one basic signalling for you. There's four types of signal, danger which is red, caution which is one yellow, preliminary caution which is double yellow and green which is clear. Yellow, double yellow and green are all proceed aspects, but they tell the driver the condition of the signals ahead. Green means that the next two signals are showing proceed, double yellow means that the next signal is proceed and yellow means that the next signal is showing red, stop or danger. Remember this for later. The disaster. Right back to that foggy evening in December 1957, at roughly 8 minutes past 6pm, an express train consisting of a Battle of Britain class number 34066 named Spitfire was hauling 11 coaches, carrying around 700 passengers. At around this time, it departed Cannon Street heading for Ramsgate. The train between London Bridge and New Cross was receiving all clear signals. It was travelling slower than usual, mainly due to the fog, taking 10 minutes to reach there from Cannon Street. By this time, the Hayes train had been brought to a stand at the signal just before Parksbridge Junction. This was because the signal protecting the junction ahead was holding a Hastings bound diesel electric train. The signal at Parksbridge Junction had got confused over which train was due to go to Hayes. This was because of issues with the describer system and the thick fog, not allowing the signaler to see the actual train in the flesh. With two trains now backed up at Parksbridge Junction's signals, the Hayes train was protected in the rear by signal Lima 18. This was around 18 minutes past 6 in the evening and the Ramsgate train was approaching St John's. The train was travelling around 35 miles an hour. It went past the double yellow and single yellow with Driver True making no reduction in speed. It was quickly approaching Lima 18 at danger. The fireman aboard the steam locomotive was the first to see the signal at danger. There was roughly 138 yards between the signal and the rear of the Hayes train, nowhere near enough to stop the train in time. At 18.20 the Ramsgate train hit the rear of the Hayes train. The Hayes train was formed of two four-car units and a two-car unit at the rear. The impact pushed the rear two cars forward into the eighth carriage, completely destroying it. The tender and leading coach at Ramsgate train were thrown off the track. This dislodged a pier of the bridge just beyond St John's signal box, causing it to fall and crush two coaches. A third train approaching the bridge heading towards Lewisham luckily stopped just short of the now disappeared main span. 89 were killed instantly with another dying in hospital of their injuries. Around 60% of the fatalities were aboard the Ramsgate train's two front carriages which were now crushed under the bridge. Two households adjacent to the line called the London Ambulance and Met Police Services emergency lines roughly at around 22 minutes past 6pm. The fog hindered emergency services hiding the true scale of the disaster. All services that required movement towards Lewisham were cancelled, causing havoc for pretty much anyone needing to get home in South East London. Traction current was isolated all evening and into the early morning to help rescue efforts. The last injured survivor was removed four hours after the collision. It would take just over a week for the line to be cleared. The bridge removed and replaced with a temporary structure. The aftermath. Now why did the accident happen? The Ramsgate train was found to have working breaks. It had been tested before the journey. However, the guard when interviewed after the accident stated that he didn't feel any break application prior to the impact. The fireman and driver although shaken up were actually alive and were interviewed. In fireman hairs interview he stated that my driver did not ask me to see the signals between New Cross and St John's starter. Nor did he cross the foot plate to view the signals. We were running normally. I estimate speed at St John's at about 40 miles an hour. This is telling because you see on UK trains drivers are placed on the left side of the cab but the signals around the accident area were actually on the right hand side of the running line meaning you would have to look across the front of the engine severely reducing the distance that you can see which when coupled to the reduced visibility of the fog meant seeing and reacting to the signals was severely hindered. Sadly the answer to the disaster was plain and simple. Driver through the Ramsgate train just didn't react to the signals which could have been helped by asking the fireman who usually occupied the right hand side of the cab to observe the right hand sighted signals. In the 1958 report into the crash it was state in its conclusion. I am therefore convinced that Driver True did not see signals Lima 16, Lima 17 or Lima 18 and accordingly he did not make a brake application until after his fireman had called out that Lima 18 was at red. Criminal proceedings would be launched upon Driver True for manslaughter but the jury could not reach a verdict and he was acquitted at a second trial but the real issue although caused by the driver was the lack of train protection systems. I mean a very similar disaster unfolded at the start of the decade at Harrow and Wilson in 1952. AWS or automatic warning system was gradually being rolled out at the time mainly for semaphore controlled areas but Lewisham showed it was really required everywhere. The system would be rolled out across the British rail network and even still forms the backbone of British train protection systems and warning systems today albeit augmented with train protection and warning system so this disaster I am going to rate it as a bad day at the office and a number six on the legacy scale. This is a plain difficult production all videos on the channel were creative commons attribution share a light licensed. Plain difficult videos are produced by me John in the currently very windy corner of southern London UK. I'd like to thank my patrons and YouTube members for your financial support and also the rest of you who tune in every week to see your dose of me talking. I have an Instagram so go and check that out for random pictures and odds and sods of things I get up to when not working on videos and I've also got Twitter. If you're enjoying this outro song then please check it out on my second channel made by John and all that's left to say is thank you for watching and Mr Music, play us out please.


Aloha, welcome to Kondo Insider, Hawaii show about association living. Anyway, I'm Richard Emory, your co-host or your host today. You may have missed me in the last six or eight weeks. I was on vacation visiting the fires in Sydney and had some business obligations. But I'm glad to be back and all is well. Today's a very important day in Hawaii. It's January 23rd, 2020, the day of the cutoff for the bills for the 2020 legislature. And to date, we still haven't got all the records from today yet, but it looks like we have about 14 bills introduced that affect Kondo living. And I have as my co-host guest today, the wonderful Jane Sugimura. Welcome, Jane. Hi, Richard. Happy New Year. Happy New Year. It's Chinese New Year tomorrow. Right. So I'm going to a Chinese New Year celebration tomorrow. But anyway, the legislature, I know you and I have been looking at what we've seen so far. We don't have final opinions, but let's begin with a couple of the bills we see. One long needed Senate bill 2200 regarding the famous emotional support animals. What do you know about that? Yeah, that's a very interesting. And the reason it, you know, and Senator Sharon Morin-Walkie introduced it at our request, Hawaii Council's request, because we had, you know, a lot of concern about the people who, the licensed professionals who were writing the letters that were being given to board the directors for animals that were not, you know, the, what do you call it, the service animals, the emotional support animals. And so this bill basically says to the licensed professional, you need to actually see the person that you're writing the letter for. And you have to examine that person and make written findings that that person, you know, has a disability. And that the assistance animal that the letter is about is going to alleviate symptoms of that disability. And that disability is something that is covered by the Americans for Disability Act. And we think that, well, we hope that if this bill passes that, you know, the licensed professionals will be a lot more careful about writing these letters so that, you know, they, you know, so it doesn't result in somebody wanting a pet going to their, you know, neighborhood, family neighborhood doctor and saying, you know, here's this letter form. Can you just sign it without, you know, examining me and determining that I have a disability under ADA? Well, you know, the paper today had an article about the, I want to say the FAA on people bringing in service animals or emotional support animals on aircraft, and they're really tightening up the rules, you know, that make it only can be a dog. And number two, they again have to have their requisite forms completed showing that a licensed professional says they're in need of that animal and what disability that animal services. This has been a long time problem in a way.  I know in my building, I mean, we have, we have a bylaw amendment saying no pets. And I have people coming up to me all the time and saying, why do we have all these animals in the building? And why do some people have two and three animals?  And, you know, so, but, you know, we get these letters and they're signed by a doctor or psychologist or licensed social worker. I mean, and it says what it says that the person has a disability and needs the animal. I mean, we really don't have any choice but to allow it to happen, allow them to have it. Otherwise, you know, the Hawaii Civil Rights Commission comes down on us. Nobody wants that. Well, the problem has been in the past that the Hawaii Civil Rights Commission has opposed this type of bill in the beginning saying it's a hardship on the disabled person. But then they'll feel embarrassed about having to go do this. And, you know, I think it's a time in our society that people have to rationalize and justify otherwise there's abuse. So, hopefully we'll get... Right. And, you know, and I've heard from, you know, from some disabled people that they really don't mind something like this because they're aware of the abuses and it makes it harder for them. I mean, the truly disabled people who really need to, you know, have the house rules or the regulations, you know, dealing with pets, modify so that they can have them. And so it just makes it harder for them. And so, you know, this bill, I think, is going to truly protect those people who really are disabled and are entitled under the federal law to have the house rules modified so that they can have this animal live with them and their units. Well, the other thing that I see in the list, I feel a lot of bills, so we're going to kind of touch on them lightly today and then come back in the next week or so and talk about each one in more details and the pros and the cons. But one of the ones I saw that was interesting was Senate Bill 2419, which basically says, makes violations of voting requirements for elections of a condominium association subject to the enforcement powers that a real estate commission. And I believe there's a companion house bill on this as well. I was looking at that. I was looking at that and I'm saying what kind of, I mean, it just makes it very vague. It's just what, I mean, it's violations of voting requirements.  But, you know, there are already provisions for holding the proxies and the ballots so that the people who are objecting to maybe the results can go and look at them. I hear from a very small group every year that the sky is falling, but I haven't seen it in practice. But House Bill 2165, not the companion bill, has related issues saying, requires the managing agents have come from dominiums to confirm the eligibility of candidates for board elections in the authority of proxy assignments. And I haven't looked at that closely yet, but first of all, a lot of condos don't have managing agents. What do they do? Yeah, and, you know, to me, I thought it was really vague.  I mean, is there an owner or an officer or director or a general partner of a partner that owns the entity?  And, you know, to me, I'm thinking once you put up the names, if they're not, you know, proper people, if they're not an owner, they're not part of a corporation or a general partner. All their owners are going to speak up real quickly.  And if that happens, then, you know, they just, they should be removed from the ballot. All condominium managing agents have a list of owners and it basically matches the tax records on who the owners are. And from that, you take proxies in and you check off the list that, yeah, they're an owner and they look to see if they're signed and meet the statutory requirements and proxies are issued and people are nominated who are owners, right, of the association. And there are times that people have tried to be nominated who aren't owners on the list and managing agents typically don't allow them to be nominated. So I'm not sure what the rub is here. It certainly isn't a widespread problem, but it seems that people are trying to infer that managing agents are not being diligent with regard to conducting an election and who's able to vote and who's able to be nominated. And I just don't think that's the case. And I haven't seen anything in the past to show that's a widespread problem in a way. Yeah, I haven't seen it as a problem either. But you know, why don't we see what comes up in the testimony? Because that usually kind of ferrets out what the real issues are or where exactly, you know, what area is affected. Because usually they're the ones who will come and testify.   Yeah, Noe, not to ever argue with you. But when we say the real issues, it's their perception of the real issues because there just is no evidence of this widespread problem. And so someone's trying to make an issue. But another two bills, Senate bills, introduced by our Senator Baker, one of our really conscientious senators in the legislature, has to do with appealing the sunset provisions of Act 195 and Act 196. Can you explain what that means? Yeah, 195 was the priority of payments bill.  And, you know, a priority of payments means that, you know, if you miss the payment and if you're on sure pay for some reason, if you miss the payment or made it late, let's say you, because the sure pay comes on your bank account and you didn't have the money there and somehow it didn't get paid and by the time you got the money in it was late. Anyway, you incurred a late charge and because it's automatic, and if the property management company doesn't tell you that it was late and you're going to be assessed a late charge, you don't know because owners don't get monthly statements. At least most associations don't get monthly, they don't have monthly statements. And so, you know, the owners don't usually find out until you have, you know, late charges and attorney fees and whatnot and it may be several hundreds or thousands of dollars. And this created, you know, some, you know, bad feelings between boards and owners sometimes that were foreclosure. And so there was a bill to delete the priority of payments in the condo statute. And that doesn't mean that the associations can't collect late charges. It just means that, you know, it doesn't go to the top of the list so that when the next month's maintenance fee becomes due, it doesn't get applied to the late charge first so that you're always late. What was Act 196? 196 was one that introduced binding, voluntary binding arbitration and it expanded the mediation statute to add other people because before it was just the owners and the board and now, you know, board members can, you know, who have disputes against each other and the managing agents. You know, they are now additional parties and there are additional, some other changes regarding the mediation where if you ask for mediation, evide a mediation and you don't get it, then you can file a motion to compel and recover up to $1,500 in legal fees for that effort. And I think the subset provisions in both acts were put into the bills in conference. So the sunsets weren't, you know, part of the public debate process and I think they were put in because, you know, the legislators were concerned that there might be abuse and, you know, for both of them, they've been in effect for a year now. There has been no abuse and, you know, I think it's a good thing that the sunsets are going away. I agree because we're basically saying the sunset is, both these are already laws, Act 195, 196, but they expire at the end of this year or sometime I think this year or next. And what does move? The priority payment sunset is June 30th of this year, 2020. And so what this does basically is eliminate the sunset so it continues on. So on that note, we're going to take a short one minute break and we'll come back and discuss a few more of the bills that have been introduced that will be debating over the next couple of months. We'll be right back in a minute. Aloha. My name is Wendy Lowe and I want you to join me as we take our health back. On my show, all we do is talk about things in everyday life in Hawaii or abroad. I have guests on board that would just talk about different aspects of health in every way, whether it's medical health, nutritional health, diabetic health. You name it, we'll talk about it. Even financial health. We'll even have some of the Miss Hawaii's on board and all the different topics that I feel will make your health and your lifestyle a lot better. So come join me. I welcome you to take your health back. Mahalo. Aloha. My name is Duration. You are watching Think Tech Hawaii. I will be hosting a show here every other Wednesday at 1 p.m. and we will be talking to a lot of experts and guests around sustainability, social justice, the future here in Hawaii, progressive politics and a whole lot more. So please tune in and thank you for watching Think Tech Hawaii. Welcome back to Condo Insider with Jane Sugimura talking about the legislature and what bills we expect to talk about in 2020. I should say that we are by any of them as far as the legislature. There's a lot of old bills from last year that technically are still alive. They didn't get a hearing last year that we're not talking about.  But there was an interest in one Senate bill 2007 which basically requires a property manager of a cooperative or co-op, a plan community association or condo to be certified in property management by a national recognized body. Yeah, that's very interesting. Yeah, what was the reason for that? And I note that according to the notes on this bill, Carl Rhodes, Senator Carl Rhodes, introduced it by request. That means somebody asked him to introduce this bill and he did so. I saw, you know, it's hard to, do you have any reason why this bill is being submitted? You know, in the past, we've had introductions to make all property managers be a real estate broker which makes no sense because we don't buy or sell real estate and the education is different for a community association manager we caught. And then you deal with the issues. There's lots of associations that don't retain a managing agent and have community association managers. Then you look at the fact in condo world, you have commercial condos, spatial condos, parking condos, assisted living condos, senior living condos. There's different training and skill sets required for that type of association. I don't know what the issue is here because we have projects that are self-managed, but industry managers now are certainly going through training through various trade organizations. They don't call them certified in property management. Certainly it's the wrong terminology. But we'll have to see what is on the shakes because again, it seems to me where people are misunderstanding that a community association manager, co-property manager, is making the decisions. The board is making the decisions. And not only that, the manager can't practice law. So I'm not sure what's driving this, but it's certainly not appropriately worded in my opinion to address any relative issue in this. Along that vein, there's something on your list that we might want to talk about, and I know that it's being drafted. And that's a resolution, which is one of the last items on your list. And that's a resolution that calls for a task force to be set up to come back with recommendations to the next legislature in 2021 with legislation that would mandate that all condominium board members be educated and certified. And the reason for that is so that the board, and that goes along with all of these bills that want the property managers to be certified and licensed and whatnot, because a lot of unit owners believe that somebody needs to be responsible. And if there is a law that says that board members have to do shared duties and shouldn't get involved in conflicts of interest, shouldn't do selective enforcement, and when you talk to some board members, they don't even know what you're talking about. And the legislators have been asking for this for a long time to mandate education of board members and certify them.  And one of the things that a task force that are going to consider is use of the condominium ed fund to require the real estate commission to use the procurement system and hire a vendor to come up with a program to do webinars and certify board members. And the task force is going to be made up of stakeholders, plus the DCCA and the real estate commission and stakeholders would be Hawaii Council, CAI, COCO, the property management companies that are in town, maybe some people from ARM, but people who are in the industry, and they should be part of this task force to give their input on what the legislation is going to look like. And one of the suggestions that I'm going to make is that the DCCA actually come up with a curriculum and all the stakeholders should be involved in that as well. Come up with a curriculum that the vendors are going to be using in their webinars. And people and all the property management companies, they do training. And if they can apply to the DCCA and say, okay, give us the curriculum, we're going to do the training, we'll take your point. And then that way, CAI, Hawaii Council, all the property management companies who already do training, right? We follow the DCCA real estate commission's curriculum and we can certify. So we have all these people certifying and educating board members. And what hopefully will happen is that board members can no longer say they don't know what a fiduciary duty is. They understand conflict of interest and the obligations of a board member so that to at least maybe minimize some of the concerns made by the unit owners to the legislature. And there was this case recently in Maui that I think we had, what's his name? The attorney on Conor and Sider. The Maui one. Terry, you ever hear? Eric Ferrer. Eric Ferrer, right? Yeah. And in that case, the board members are named individually, but the judge, because he said, oh, these people are unpaid volunteers and I'm not going to hold them liable. The insurance company ended up paying for it and then the cost of that settlement that's spread around to all the condominiums in the state because I know my insurance went up, my association insurance went up, my umbrella insurance went up and I talked to Susabio, she says, that's what happened. So that Maui case happened and the insurance company had to pay, guess who had to chip in and pay off the insurance companies. So hopefully this will minimize these types of events and with board members who are educated and maybe they're not going to be experts, at least they're going to know. And there's going to be a record because everybody who's certified is going to be, their name is going to be submitted to the DCCA and they cannot say that they didn't know and hopefully this will affect insurance premiums, it will affect the amount of claims that are made in the state of Hawaii and so that's on the table for next year, but the resolution is supposed to be introduced this year. I'm all for the task force because then they can deal with, the two unit condominium have to do this. Then they can deal with the issue, well the biggest problem is, you know CAI does seminars, you do seminars through HCCA, condominium council Maui does seminars, we do condo insider every week, there's newsletters, the real estate commission puts that information. The problem is either no one reads it or they don't go to the seminars. This is a volunteer job. But you have a mandatory system where if everybody who serves on a board, if they don't get the certification, they can't serve and hopefully that will weed out the people who are causing the problems because we all know, that board in Eric Ferrer's case, they didn't have a clue. They didn't have a clue about fiduciary duty, they didn't have a clue about reasonable accommodation. That was a travesty and if they had known or they had people who knew what the law was, then maybe they wouldn't have ended up in the lawsuit and we wouldn't have had a $2.9 million judgment entered against an association. I think my point is as follows, that education is good but it needs to be the basic responsibilities. You don't need to train the board to be property managers. Then nobody wants to go because it's going to become too difficult. Then you need to have education online so it's easy for people to do so the people will take this volunteer job. You're not going to solve everything by thinking you can mandate a law and fix it. I'm all for the resolution and the task force but it's not such a simple issue and I think the task force will set it up. This way I think what we're saying is that they can be held accountable because now when they get sued or when claims are made they can't say, oh, we didn't know. Like, you know, like that I think there's an Eric Ferrer situation, you know, really showed what could happen in the worst case analysis. You had a board president who was a bully and he had eight sheets who just filed the board president because he was a board president which was the wrong thing to do and I think, you know, at a very minimum they had to take the webinar and participate in the training they're going to know that this is a no-no and they shouldn't do it and I think that's the whole point of mandatory education and certification is to let them know that there are certain things they're not supposed to do and if they engage in doing it there are consequences. It's interesting, Senate Bill 2871 basically talks about giving in our case the real estate commission authority not to collect money these biannual registration fees if the commission determines they think there's already enough money in it. If you look at our fund today I don't know the exact number but I'm going to say there's about $2 million in our real estate education fund that could be used for education and I would give the real estate commission credit that they do some education it helps subsidize some seminars but the amount of money we're charging we're collecting money much faster than we're spending it we ought to look at this resolution to see what we can do to improve education. I'm all afraid of that. That's why we're going to be meeting with the executive director of the real estate commission to tell them he's got all his money and right now there's a moratorium they have too much money and Representative Takashi Ono's committee I think had hearings last year and they made a decision that there's a moratorium on payments to be made to the Colombian education fund because they had too much money and they're not spending it. I'm going to wrap this up now to the end of the show we're going to have lots more conversation in the coming weeks on bills that survive and don't survive as always I love working with you on this show I love the educational opportunities for our association boards and management companies and others out there so I want to thank you for working with me today on this I look forward to looking at the final list of bills having a couple of glasses of wine and then maybe having a couple more glasses of wine but anyway thank you for being on the show and we'll see you all on condo insider tune in next Thursday three o'clock aloha


should be live still testing my sound and everything takes too many clicks to go live have to automate the process ideally yes i'll go check out by the chaos.com if you haven't done so already there's a lot of tools they check them out let me know what you think i'll jump into development i have this data from a kegel competition see how long i can get away without using a robot for programming probably not long we have this new project it's called the seizure fuzz that's only because i need to have a limit of how many linkedin likes 26 characters of URLs before it starts shortening them into funny things so i want to avoid that let's run this application quickly am i getting errors already no it's because it's already running isn't it run it again okay so that's how it looks like so far when we had i think two sessions that we spend on it in this one so we don't have an option to scroll this is a fairly large data set so remember how big is it data is on my desktop so not very big a bit too big then can it it's a 26 27 gigabyte that shouldn't be too bad so i just have all this ceiling of windows open on was it one two three four five essentially five different screens pump let's get into it well this currently what the tool looks like can select your eg id not that id yeah that looks like a seizure there it's actually an interesting one what does it look like so in here you can select your eg id in this case 100 let's wait 110 seconds of EG data. You can select your channels or not displaying all the channels. There's other tools that display all channels. You can see examples. This one just displaying one channel at a time just to you know, we'll be doing more with this. This actually looks a lot like a seizure. The reason this is 110 seconds. So you have those 18 labels of probably seizure. You can open the original test CSV. No, sorry, not test it. Train CSV. Yeah, about 7.5 megabytes. Yeah, that's what it looks like. So say when we go 6 or 4 wherever it is, it looks like a seizure to me. That's why it's probably be a good example to probably have as a default loading by default. Obviously, it's impossible to search for anything in here. Okay, 1, 5, 1, 7, 1, 7, 9, 6. Right. So we have, yeah, they're all labeled as seizure. They were only A3 experts. In this case, five. That's what I was, yeah, I was mentioning it the other time I looked at it does that it's a bit odd. So you have each one of those entries in the train CSV file meant to be 50 second long. Then you have this offset to it. It's that number there that will tell you in seconds what the offset is like. So in my application theory, when you do that, it will select just the a 50 second window. So it should be 58266. That doesn't make sense. That's over 100. You need to fix that. But the point is, it does the offset to begin with. They're heavily overlaid on top of one another. So if, yeah, this 62, yeah, I'm not convinced. I figure just displaying the same data all the time is just changing the X axis is six or four. In this one, you can type in this. No. Oops. Yeah, the selector is not great, but you get the drift. You can expand it or anything. Anyway, so you have those. This is the type of labels that we have. We have a procedure, a GPD was a generalized something, something that would be lateral. Should have an explanation for this. We have a structure. Yeah, that's the does the description. It's just weird that the annotations in this case were done in most cases by three reviewers, and they had the 100% agreement rate between them in terms of the label. So there's one, two, three, four, five, six labels. The six one is the hour. In this case, I have 100% agreement. But then with the same oops, with the same data segment, this six or four then you also have a couple of labels, a couple of epochs, 50 second segments that were labeled by five experts. So I'm not sure why the whole five just didn't look at the whole thing considering again, this would be 50 plus 62 second segment. I don't know why it's essentially the overlap is very heavy. I don't know why. So each one of those will be 50 second window. The first one will be starting at time zero in the second one, time two, time four, six on four. So just duplicating the data is essentially this fudging, fudging that the classic fudging of a data set, where you're trying to duplicate more, create more data when you don't actually have it. All the labels are essentially in all these cases are the same. Anyway, it's not clear why there were like three reviewers for some of them and five for others. So you see essentially in these two cases, a three cases, four reviewers said it's a seizure. And one said it's over. So no, not the 100% agreement. Yeah, this is an interesting case. Again, you have a high duplication rate, the whole data will be 74 seconds. It's hard for me to actually find those in the drop down menu. So so while it's becoming a quite unresponsive, so obviously, not quite ready to be published. I have to make sure the expert consensus is actually updated. When you select this one, the idea originally, the reason it's a drop down, it's an input is that you can filter the EG IDs. So you can just display one of the labels, like all the EG IDs for one specific label. That doesn't work at the moment. Once you selected the EG ID, then you have those different offsets. And again, just seem to be highly duplicated data. Essentially, those in between would not be necessary. It might get away with, you know, offset zero and offset 18, because each of those is 50 seconds. So you really don't need those in between. Because this will be zero to 50. This will be two to 52. So it's essentially the same, the same time window, then four to 54, six to 56. Yeah, done. No need, no need. You can just have the first and the last. So you will have zero to 50. And then 18 to 68. That should be plenty. So essentially, it looks to me like, I'm just trying to create more data points when a window is actually in the data itself. This one here, for example, I understand the Russia now behind it. Yeah, so this is all the same. A data segment. If you look at the raw file, you just have 50 plus 62, whatever it is. But then you'll have a lot of like duplicates on the same thing. So in reality, you could have had a zero to 50 and then say this, if you need some overlap of 10 seconds, so you have 40 to 90. And that will cover it all. So instead of having these 18 entries, it's really just two. So hopefully it's clear what I'm trying to say. If my chance, if anyone looked at this data set and I totally misunderstand what the data set is doing, do let me know. I should have a link to the data. It's on Kegel, Chimpsv, no. Yeah, harmful brain. Yeah, this one. So put a source in the description there. They will write the description in a sec. Yeah, let's just pop, or might as well do it now. And the canvas. So eventually the plan is to continue with this data set. We're not, we just take the data as is. We can change it and use the labels to eventually do a classifier. We'll be using fuzzy logic. So it's explainable AI stuff.  We want to actually know what they're doing. And then the data also contains these spectrograms. There's like 11,000 of them. And they are 10 minutes long. So let's see. An example of how not to store your data. Yeah, so essentially, those should display 50 second each one of those sub IDs. And then you will have, yeah, we're still testing this. There's a few interesting examples there that's obviously, some of them have just crazy noise. So I'm not sure one way to go about to see if you actually have ECG. Sometimes I mean the ECG electrode could be off. But everything else might be working correctly. That is possible. However, if you see very noisy ECG like this, this is probably a strong indication that something that other things are very wrong in this recording. So yeah, so if you see stuff like this in your ECG channel, it's highly likely that if you select, yeah, if you look at the ECG recordings that you'll see some high noise there as well, just kind of indicative of problems. So might start filtering this data that way. I just suspect that by the time we filter, and when I say filter, I'm not saying, you know, we won't be taking something is, you know, really bad and trying to improve it. I'm saying like filtering is in getting rid of it. And then something just happened to the tool to get an error or something. It's thinking about it.  Hopefully, one of the bots, the GitHub co-pilot or GPT-4 can fix all this or us. So I haven't published this yet. Just running it locally. There's many other tools that are published on binarykills.com. Go check them out. And let me know what you think. Let's check the chat. If we have any questions, I wouldn't be happy to dive into them. They are good questions. And no, there's nothing. Okay, let's continue development. And yeah, if a human doesn't want to talk, we have to talk to a robot. It's not ideal. It's the second best at the moment. But let's try co-pilot first chat. Hey, can you add the source reference at the bottom of the page with a link? I'll provide the link in a sec. That's obviously a simple task for co-pilot. So we have a body at the end of the body section of the HTML. We'll add a reference. The link is this kegel competition. We use this bit for the text. It opens another window. That's great. We'll call it data source. That should be fine. Okay, what else quickly can we do? Yeah, there's a big problem of the EGID becoming less responsive when you scroll down this list. It's not great. We want this one. I think it's a good example because I'm pretty sure there's an actual more classic looking, like a textbook, lookalike seizure in that segment. So I want to use it as default. So for that, we use a starting chat. We go use this workspace handle in co-pilot. So it actually looks everywhere, not just this file for EGID. Where can we set the default value that loads when the page is loading the first time? Yes, it's determining workspace structure, deciding which files to look at and found five references. I don't know why. And yes, it's just going for the index HTML. Now, I just suspected that there is something in the script.js. And yes, it did look at the script.js, so I am confident that it's giving you a legit response in the EGID. I mean, it was biased because my mouse cursor was already there. There could be another reason that it's just giving me that. Let's pop it in there quickly. Right. No, actually, yeah. So the ID, EGID is the ID that will be used in JavaScript as well. This is by the way not tutorials about the HTML. I think those, these tutorials probably be obsolete with LLMs because the LLM happily and quickly covering all those basic, basic stuff. So I don't think you need tutorials anymore. Here's the default value. Do we have default value?  So question, where does this bit of code goes? A how to update to include the default value for EGID? A popular drop down. Yeah, I don't know why sometimes maybe it's a Linux thing that those are not the links that just text. Sometimes there are links. So I'm saying it because yeah, it's really great when they are links, you can just click on it will go to the function that needs it changing, pop let drop down, etching. Yeah, we don't need that log anymore. Get rid of it. Drop down ID, option, object ID, context sub ID. Okay, okay, okay, okay. Yeah. Okay, you've dropped down ID with get the standard function, isn't it? So might as well. Yeah, we don't want to be just make sure we have the correct function. And we're just gonna replace the whole lot. That's that later. So this will be still the first value. Because default value is not being populated. We do want the default value to be interested in that. Okay, that works. Right. So that's our default value and somewhere, yeah, down the list. It's a real matter to make sure the seizure. So when selecting, okay, let's do another one. Yeah, let's start a new chat because it's a new issue. We don't want the previous response to influence this one. A workspace, we need to make sure when selecting the segment, the expert consensus is updated. First of all, we need to swap places, the consensus should come after the EG sub ID, because we have a label for each sub ID, not the general ID. So you have multiple IDs and then the label, I can disable, you have it for each one of those. So this is the label and you have it for essentially a, what is it that number ID, ending with 604 and then 0.1, 0.2, 0.3. Right, let's swap between them. The order is the expert consensus, oops, can go below, go here and make sure is expert, make sure that the expert consensus is being updated when the EG ID, oh, come on. Yeah, it's sending it too quickly because I speak too slowly. Right, so this is wrong. It looked at five references. So still we have a workspace handle. So we'll look at the whole code, not just the, we currently the maskers areas. Let's do another prompt and actually completed this time. Let's actually talk to a GPT for a sec. Okay, a couple of things. We actually need the expert consensus to be updated when we select a different EEG segment. We need it to show the label associated with that segment. The label is in train CSV file. Let's pop it into co-pilot. If you haven't checked bionicales.com, go do so. There's a lot of interesting tools and blogs. And don't forget to provide your feedback after you checked it out. Okay, let's see what it said. So I want to update the expert consensus drop down when the different EEG segments selected. That's right. So now script.js, we're really there. When the EEG or sub ID changes, you should fetch the corresponding label. Here's a rough, why is it a rough idea? Why is it not the actual code? We had that have it in page and update chart. Yes, that's what it's recommending. They have EEG ID sub ID. That's correct. Let's pop it in here. That's the same. Fetch the offset directly from the selected sub ID. That's fetch the label from selected EEG ID and sub ID. Okay, let's get rid of it for a sec. We need to change the flask up as well. So how are we changing the code based on the previous response to generate the whole function? Just need to make sure sometimes it's putting missing bits. Fetch and update chart. It seemed to be the same. It seemed to be the whole thing. Just make it smaller. Sorry for that, because yeah, we know we try not to actually focus on the code itself. We're trying to do the overall thing, 168. Line 182. Okay, so we have that one. Now it's slower and we're getting an error. Those get label. It did tell us to change the backend as well. The get label in particular, specifically. You have to know why this is not a link. Would be nice if it was get label. By the way, we're only using robots because humans are way too busy. But if you do want to chat, I could even bring you on air. Get label. Don't have it, do we? We don't. Script. Just get label. Need to edit label. And that it deals. I forgot what the structure of the code. We do have a data. It deals by another Python script. This one. Okay, so it's already suggesting a get label function. Fetch as label for giving each EEG and subject identifier. Try. Yep, it's retrieving that from train CSV. Looks legit. And returning either label not found or the label, I would imagine. Yeah, label zero. Assuming it's an array and it didn't actually work. No such file directory, but of course there is a get label. This is all happening in the backend. Patience IDs works okay. Let's try this. It's a folder thing. You can't find the file. No, it's not in the data path. It's in another folder. It should be doing that a EF is not used. Should we get label function in that it is responsible? No, I do want to use it. Don't just remove it. Don't just remove it. Yeah, get label should also have the F in it. The F in it, the F in it, get label, it's already using it over here. Get label, the F in it, fix this one first, just select the whole code and do the workspace as well, because we need to eventually update the data utils by the code as well. Yes, having trouble reading that file shouldn't be a problem, because it's already read elsewhere. Hey, can we just do it in the same way as for the previous functions? It's not looking at the whole code. Okay, did it fix it? There's only one way to know is to run it by reading the CSV file, filtering the data frame, and returning the corresponding label. Okay, that obviously didn't work. Hey, can you update this based on the previous response? Here it is. Should we do something more fun and get back to this later? Or should we just continue banging our heads? Okay, let's continue banging. Okay, it should be simple. Why do I have a failing GPT-4? We'll be able to deal with this. Yeah, just a pop this in. It can take longer prompts. You can actually use the tokenizer. It's a good name, isn't it? Okay, when we have 2000 tokens, it should be fine. Flask application, 3000 data utils, three and a half. That's the structure of this data set to 6000. Do we need that info and stuff? Yeah, so you're just listening to some podcast that I don't remember the name. But essentially saying, if I understood correctly, that whatever is in the beginning and the end of the prompt, that's what essentially has more likely chance to be picked up by the model. Even so, we have this 8500 tokens should be not too much for GPT-4 to handle. Ah, we forgot the errors. Let's clear this. Clear the terminal, run this again. Yeah, we get this control shift C error. I'm getting the following error above. I shared all the codes. We have access to the entire project. Can we fix this error first? It's to do with updating the expert consensus value when a different EEG ID and sub ID segment of raw data was selected. Let's do that. And let's also try out read losing my voice. And the humans are not talking. So I might just use the pot just to raise my vocal chords. Oops, have to edit that out if this ever turns into a video highly unlikely. Clear. All right, the error you're encountering key error sub ID in your flask app happens because the data frame DF in the get label function doesn't recognize the column sub ID. This is likely because the column in your CSV file is actually named EEG sub ID as seen in your train dot CSV metadata structure. Here's how you can fix this. One, correct the column name in the get label function replace sub ID with EEG sub ID. This change will align the column name with what's in your CSV file. Two, update the request parameter. Make sure that the parameter passed in the URL for sub ID aligns with what the function expects. Since you're using EEG sub ID in your data frame, the URL parameter should also be EEG sub ID. Here's the updated get label function in your flask app. Python at app dot route slash get label EEG ID equals request dot args dot get EEG ID EEG sub ID equals request dot args dot get EEG sub ID. So this one is not referring to, it is referring to data utils, but it doesn't have a get label. So I think we can get rid of it can we? In data utils, the get label function, can we get rid of it? I'm pretty sure it's a yes. Now we're still getting an error, a different error, still an error. This is what I get in the terminal. Okay, can you fix that? Got it. The error you're encountering now, type error, int argument must be a string, a bytes like object or a real number, not none type, suggests that either EEG ID or EEG sub ID or both is none. This typically happens when the expected query parameters are not passed in the URL or the names used in request dot args dot get don't match the query parameter names in the URL. To resolve this, let's do a couple of things. One, check the front end code. Ensure that the request made to slash get label includes both EEG ID and EEG sub ID as query parameters. The URL should look something like slash get label EEG XXX and EEG sub ID equals YYY. Two, safeguard against none values in back end. Modify the get label function to handle cases where EEG ID or EEG sub ID might be none. Okay, the other thing about it still doesn't work. That is being displayed, which is great when still getting an error. The problem I'm pretty sure is, well, first of all, most of the time the label for same EEG IDs is always the same anyway. But yes, there might be a chance that it is not. So we still need to address it in the code. Currently, yeah, I'm getting this was the default value is six or four is the one that has something that looks like a seizure. Yes, it's working came most of the time. The expert consensus is not being updated. The value is not being retrieved properly. And I'm getting the following error, error. Do we need to speak with American accent? Do I have to update the code? We would like to move on and develop it further. We will need to load the spectrogram spectrograms from the dataset and then start training a fuzzy logic classifier to classify between different labels. Yep. It looks like you're encountering a 400 bad request error when calling slash get label, suggesting that either EEG ID or EEG sub ID is missing or invalid. Also, the expert consensus field is showing as undefined in your requests to slash fetch EEG data, which might be related to the front end not handling the received data correctly. Let's address these issues step by step. One, verify query parameters in front end. Ensure that when making a request to slash get label, both EEG ID and EEG sub ID are included and valid. Check the JavaScript code where the slash get label request is made. Ensure that the values for EEG ID and EEG sub ID are correctly retrieved and appended to the query string. Two, handle undefined expert consensus. This issue likely occurs because the front end JavaScript isn't handling the received label data correctly or the label data isn't being sent correctly from the back end. Check the part of your JavaScript code where you update the expert consensus field based on the response from slash get label. Make sure it correctly sets the value even if the back end returns an error or an empty value. Three, implementing spectrogram loading and fuzzy logic classifier. Once you've resolved the current issues, you can proceed to load spectrogram data. Ensure you have a route in your flask app to handle spectrogram data loading. For the fuzzy logic classifier, you'll need to define your fuzzy sets, membership functions, and rules based on the features extracted from the EEG and spectrogram data. Libraries like scikit fuzzy and python can be helpful. The fuzzy classifier would take features from your data as input and output a classification label. Make sure to test and validate this classifier thoroughly with your data set. Let's also clean up the error handling in your slash slash get label function in the flask app to ensure it's robust. Python app dot route slash get label, def get label, egid request dot args dot egid, eg sub id equals request dot args dot eg sub id. If not eg or not eg sub id, return JSONify error missing eg or eg sub id. 400, try egid and eed eg sub eg sub d, accept value error, return JSONify error invalid eg id or eg sub id 400, rest of the code remains the same. Finally, ensure you handle any possible errors or edge cases both on the front end and back end to make the application more robust and user friendly. Once these issues are resolved, you can move forward with the next stages of your project, such as loading spectrogram data and implementing the fuzzy logic classifier. Yeah, we're back in business is working again. So now when you select is the default one is still that 604 that has something that looks like a seizure. All these 18 labels have the same label. Can you explain the code structure specifically? Sorry, can you explain the data structure specifically focusing on the fact that each label is for a 50 second row eg data, but then the sub id offsets seem to be very small. The data set structure you've described is quite interesting and a bit complex due to the way the data is segmented and labeled. Let's break it down one eg data structure eg recording. Each eg recording is identified by an eg id. This id represents a full eg recording session for a patient sub samples of eg data within each eg recording. There are sub samples of data each 50 seconds long. These sub samples are identified by eg sub id. The eg label offset seconds indicates the time offset from the start of the eg recording to the beginning of the sub sample. Spectrogram data corresponding to each eg recording. There is also spectrogram data. Spectrograms provide a visual representation of the spectrum of frequencies in the eg signal as they vary with time. The spectrogram id corresponds to the entire spectrogram recording while spectrogram sub id refers to specific parts of the spectrogram with spectrogram label offset seconds indicating the time offset similar to the eg data. Two labeling of eg data label per 52nd sub sample. The critical aspect here is that the annotations or labels provided by experts are for each 52nd sub sample of eg data eg sub id. This means that the experts have reviewed each 52nd segment and provided a label for it. Small subset of labeled data. The reason the labeled data set might seem small is likely because the labeling is intensive and is done on these 52nd segments not on the entire recording. In real world scenarios especially in medical data getting labeled data is often a challenge due to the time and expertise required for accurate labeling. Three application of labels multiple labels per eg recording an entire eg recording eg id can have multiple labels because each 52nd segment eg sub id within it might exhibit different characteristics. For example some segments might show seizure activity while others might not. For data utilization for analysis when analyzing the data you will likely be looking at these 52nd segments and using their corresponding labels to train models validate hypotheses or conduct analyses. For model training in machine learning applications each 52nd segment becomes an individual sample for training. The model learns to classify or predict the label for unseen 52nd segments of eg data. Five data challenges complexity and overlapping samples handling eg data is complex due to its high dimensionality and the fact that different segments of the same recording can exhibit vastly different characteristics. Expert disagreement there might be cases where experts disagree on labels for the same eg segment reflecting the subjective nature of interpreting eg data. Understanding this structure is crucial for appropriately processing the data training models and interpreting results. The key is to remember that the labels apply to specific segments 50 seconds long of a continuous eg recording. I just realized something yeah another potential indication of how bad this data set is is when you load this default eg id select your sub id the all seizure labels this is what you get on different eg electrodes looks a lot like a seizure but this is really zoomed out so we don't see the details we'll be looking at the details later yeah get this slowing down of so it looks like spiking and then it's also slowing down which is a good indicator but then you look at the ecg and it has the same structure to it the same overview overall amplitude which is highly unusual so so this makes me think that it's more likely to be artifact and yes we need to look at the details of it but yeah just highly unusual the ecg seem to be still there but then this artifact should be coming from the brain not the heart if it is a seizure so in this case it will be i've a most likely to be muscle activity I mean I guess there's a chance that there is a cardiological a cardio event but that affecting the brain recordings but yes you don't expect to see ecg in your eg that's a really not good sign so yeah most likely just to be a bad that point also we need to make sure the patient id is updated in the same way as the expert consensus so when we select the different eg id and sub id the patient id should get updated the original idea there was that those will be inputs and when selecting a patient the eg id will get filtered to show data from only a specific patient or a specific label however that doesn't seem to work we have any ideas of how to fix it do let know and keep it light yep you've made some astute observations about your eg data set let's address them one similar patterns in eg and ecg the similarity you're observing between eg and ecg patterns is intriguing usually eg brain activity and ecg heart activity should exhibit distinctly different patterns the similarity could indeed suggest an artifact or some form of interference in the eg data this is a common issue in eg recordings where various types of interference like electrical muscular ocular artifacts can affect the data quality two analyzing artifacts it's essential to closely examine these patterns to determine if they're genuine brain activity or artifacts if it's an artifact especially one that mimics seizure like activity it could significantly impact the analysis and model training advanced signal processing techniques or consulting with a clinical expert might be necessary to discern this three updating patient id dynamically regarding the dynamic update of the patient id based on eg id and sub id the front end should make a request to the back end whenever a new eg id and sub id are selected the back end then responds with the corresponding patient id here's a potential way to implement this front end when an eg id and sub id are selected trigger a javascript function to make an ajax request to a new flask route passing the selected eg id and sub id back end flask create a new route that receives the eg id and sub id looks up the corresponding patient id from the data set and returns it as a response front end on receiving the response update the patient id field in your form or interface four code implementation flask route example python at app dot routes get patient id def get patient id eg id request dot args dot get eg id sub id equals request dot args get sub id code to fetch patient id based on eg id and sub id patient id equals tire fetched patient id return json if i patient id equal patient id javascript ajax call example that comes javascript function update patient id sub id fetch slash get patient escla id id and adj id and sub id then response equals response dot json then document dot get element by patient id value dot patient score id dot catch error console dot error error error five investigating artifact versus seizure zooming in since you mentioned that the overview looks like a seizure but you need to zoom in for details it's vital to analyze the data at different scales sometimes what looks like an artifact in a zoomed out view could be genuine eeg activity when examined closely comparative analysis compare the questionable eeg patterns with known artifact patterns and seizure patterns this might involve looking at different frequency bands amplitudes and morphologies six data quality concerns if you continue to find unusual patterns or artifacts that mimic brain activity this could be a significant concern for the data set's reliability in such cases documenting these findings and considering their impact on your analysis and models is essential you might need to employ additional pre-processing steps to filter out such artifacts or reconsider the data set's use remember eeg data interpretation is complex and often requires a blend of signal processing expertise and clinical knowledge consulting with a neurologist or a clinical expert in eeg interpretation could provide valuable insights especially when distinguishing between genuine brain activity and artifacts we have an option to add a channel so then we can compare one of the eeg to the ecg side by side we should just continue to the spectrograms i just suspect the whole yeah there's something wrong with this data set all together there's a lot of weird things i can do a summary but i found the pretty much three at least two or three major red red flags keep finding red flags like this one ecg is there a the fact that it's inverse should not matter it's it's fine but then yeah this is what's happening on the left side of the head and this is on the right it's just a major artifact and you have um yeah i have a lot of trouble with those labels yes we will have a 64 yeah 64 sorry 54 seconds in this data and this is because and it's just overlap they're essentially the same it's 0 to 52 to 52 and 4 to 54 second windows so as you can tell almost was at 99.999 percent overlap so i don't know why they even there seems like a fudging data thing trying to make big data out of a small data set don't like it yeah in this case yeah this one is legit because for this one we should be showing 0 to 50 so it should go up to up to here and there's a label for it it's labeled as LPD a lateralized periodic discharges so that's okay and essentially all those are redundant and then you could have say you know if you need a little bit of overlap you can have eight eight seconds of overlap and this one be essentially 42 to what's 50 plus 42 90 seconds so it'll cover the whole lot it's still labeled as LPD yeah so i might need an expert for this one i don't know who those experts are the third red flag was yeah so if we look at the original train file training file so all the labels yeah so this one here it has all this overlaps in it that are redundant could have just kept well the first and the last one yeah and everything was how these labels made six or four yet this one so in this case three experts label this as seizure that's funny and you had 100 100-cent agreements but then three is not a large number i mean three is would be like the absolute minimum because generally we'll have a two and if there's a disagreement between the labels you show it to a third one and then they come to some sort of consensus it's actually not how you come to a consensus so they just do consensus by majority majority vote they have to kind of yeah convince each other so yeah in this case so this label there where's the current one why is it not showing the current position that's not it six or four right and then you have this that's 771 yeah this 771 it will have 14 offsets and yes they were labeled as ava but interestingly six experts still said it's a seizure and eight said it's ava so does it mean yeah let's check the description again yeah so that's the voting the count of annotated votes for a given brain activity class so those are the the different types yeah so in this case what's the acg looks like okay i need to make sure this display is always locked to 50 seconds that patient idea is not updating properly but changing yeah eg id is not being used just update yeah based on previous conversation is good sometimes that this guards was previously was discussed yeah but this one is still not being used and this still need to be updated particularly the eg id and eg sub id are not actually being used the i like how it's just getting rid of it eg pt4 doesn't do that so if i mention that i still want to use it if i mention eg id and eg sub id did you just remove them from the code and that's not cool i do need them so we want to retrieve the patient id based on which sub id segment of eg was actually selected we need to know which patient this data is coming from yeah it's bringing them back we're getting an error patient id is not actually being i think we need to update the JavaScript as well do we need to update other parts of the code as well like the JavaScript yeah that's the default default eg id and where do we actually change the code hey we are lazy how to update the code based on previous responses yeah we'll fetch the patient id's popline drop down was that where just updating the first time around then we need to do it again to know why those are not links they meant to be we should have designed to be links and we're changing the inputs to those functions i don't think so it does kind of make sense yeah originally we might need to bring in the big guns the gpt and do this again should we start a new chat so the gpt is better the this implementation of the gpt the open ai is better as keeping overall context yeah because we just want to switch out once and forever the structure okay now can we focus on how the input dropped out menus are being populated and displayed and what happens when we change the values so originally the idea was that you can filter the data based on the label type or the patient that doesn't work at the moment we do need to make sure however that when we select a different sub id and id of the eg data file we need to make sure that the expert consensus and patient id and all other parameters are being modified the data should be retrieved correctly from the train csv file as you can see from the structure of the data set we have other values in the train csv file can you help me update the code and its specific code in this case you just see some noise to begin with and you have something that yeah potentially looks like the rpx in ecg update drop down on page load page and display related data update back end end points yeah that needs to update the front end as well that you're going to listen for the eg id and sub id drop downs when these values change you should fetch and update the related drop downs accordingly that sounds legit let's try it out obviously i can't search well i can't search it's just not as convenient yeah so it's every time you ask for something it's very likely to add additional functions instead of just fixing existing code it's a bit unfortunate we're not giving up on this data set just yet we'll have the review tool and next thing we'll be visualizing the spectrogram data i don't think i can generate it myself i would have just generated the spectrograms myself because i did review some of the examples they also don't look quite right but we'll just have to load them yeah just have to pass this csv file correctly so someone someone must have already done this obviously but i don't have access to to it there's some example code on the kegel competition site but i don't necessarily trust it so i'd like to understand the data ourselves anyway we're gonna have to do this first yeah the problem with this thing you end up with too many functions yeah every time you ask for something it's generating a new one instead of fixing existing code you're still getting an error no we're not getting an error yes we are getting an error so i didn't implement the code correctly so the safest thing to do is to pop in the shavascript and the write them code into the llm again give it also this error code yeah get patients id obviously as a problem with it it's made it simpler what you would think is better it looks like you've made some great progress with your code however there's a small issue that needs fixing the 404 error for the slash get patient id's endpoint indicates that you haven't defined this route in your flask app to resolve this you should either remove the call to populate drop down get patient id's patient dash id in your javascript code or create a corresponding endpoint in your flask app if you want to create the endpoint here's how you can do it flask back end changes add an endpoint to fetch patient id's this endpoint will return a list of unique patient id's based on the eeg data available python at app dot root slash get patient id's def get patient id's df equals data utils dot read csv os path joyda path train dot csv patient id's df patient id dot unique tolest return jsonify patient id's reviewing the javascript code if you decide to keep the call to populate the patient id drop down ensure that your javascript code correctly handles this if you decide to remove it ensure to also remove any related functionality that depends on this drop down other notes one error handling make sure to handle errors gracefully in both your javascript and python code this will improve the user experience and make debugging easier two loading data efficiently if your data set is large consider optimizing the way you load and process data in your flask app to improve performance three front end interactions ensure that your front end correctly responds to user interactions such as changing drop down values and that it displays the appropriate data four testing thoroughly test your application to ensure that all components are working as expected this includes testing the front end interactions data fetching and chart updates by making these adjustments your eeg data viewer should work more reliably and efficiently yay so the first time around we get no errors which is great we have this default thing that looks like a seizure but then i'm not sure because the ecg also has something that looks like a seizure which is highly suspicious as as we know ecg shouldn't have any seizures in it so it's over something is really wrong we'll have to test this the other thing i'm trying to make sure is that yeah when you select a specific sub id or the specific id doesn't matter we get the seizures being updated correctly the label being updated correctly maybe maybe not just hope it includes gpt4 with the corresponding code something is really wrong we added a new function and changed an existing one so it looks like we added a new function and changed an existing one the tool is working okay on first page load but later when selecting a different eg id or different eg sub id i'm getting the error above so the recent change a broke the code how do we fix it yep so change get patient id and we also there's something yeah something silly i want to get into displaying the spectrograms here as well doing some processing and training a fuzzy logic classifier obviously by the look of how we are progressing today that is not happening the error you're encountering type error object of type n64 is not json serializable occurs in your slash get related data flask route this happens because the pandas data frames i-lock method returns a numpy int64 type which is not directly serializable to json you can fix this by explicitly converting these values to python's native int type which is json serializable here's how you can update your flask route python at app.route slash get related data def get related data eg id equals request.args.get eg id sub id's request.args.get sub id if not eg id or not sub id return jsonify error missing eg id or sub id for and try df equals with data utils dot read csv os dot path train dot csv related data equals def eg id equals fx sub id equals sub id if not related data it is actually working now let's test that some more yeah so we just needed to make sure the patient id is being updated when we select a different eg id so we have six one two six two and let's check this random one seven nine five five let's go to uh train csv table pop in seven nine five five get too many of those why seven nine five five zero yeah oh eight four seven we want to check yeah that would be the patient id and that's correct yeah this one has interesting labels as well so let's see let's just see that everything measures we have just nine a nine nine nine a rows in the data so nine labels can highly suspicious each one has to should be 50 second data so we actually need to make sure this window is only 50 seconds so this will be zero to 50 and this will be four seconds to 54 seconds which is highly unusual because as you can tell there's a whatever percentage almost 100 overlap and then you have all these duplicates six to 56 eight to 58 I think if I understand the data correctly please correct me if I'm wrong so we really just needed the first that goes zero to 50 and the last one that goes 26 to 76 and this is unusual because you would expect the whole data to go to 76 but it's going to 134 that's not right let's check the original so we have this one as default it's going to 107 and what's a 62 plus 50 something is wrong isn't it we have 112 no that's correct yeah so you have zero to 50 and this one will be going 62 to 112 yeah so each of those sub IDs will be 50 seconds that's by the way means that you only need the first one and probably say if you had zero and 12 you cover the whole data so you don't really don't need the 18 of them instead of 18 that points you should have just had two because if overall you have 112 seconds you essentially have a 250 second segments he could have had or three of them doesn't matter you know what I mean yeah you should have had three three of them because it should have some overlap is okay but not this much overlap this one is like nine almost like a hundred percent overlap two seconds overlap out of out of one out of 50 what's that other percent that is so you can could really ignore a get rid of the sub ID 12 or could have just kept yeah one say 10 and 17 so you could have kept just zero 10 and 17 and you would be covering the whole data the other interesting thing is the label itself so in this case we display the first row as the title to know how to do it in the libre office someone knows how to do it yeah essentially want to display all this stuff so we also can change the data it is the way it is it was supposedly generated by Harvard medical school so you have to take the word for it and so other things we're not yet looking at is the spectrogram ID the spectrograms yeah there's another data folder for those think that 10 minute files spectrogram ID unique identifier for the entire EEG recording okay well EEG that I mean they should correspond to one another right well yes there are examples of example figures yeah this is what the first figure looks like as you can tell you there's something wrong yeah I went over this already time zero you have this a low frequency component but there's nothing in the time series I mean this time series as well because it's time and frequency energy this indicates that you should have something in the whatever for whatever 510 hertz there but the the raw EEG looks the same throughout and there were 20 seizures labeled in this data yeah yeah they're not being quite transparent about this yeah it's turned into a table and filter being able to filter different components on which one has 20 seizures in a row yeah don't really know how to use I will just use python so we need to display all the data correctly here anyway I'm still transcribing not anymore hey can you look at the two images uploaded hey tell me what the difference between them one is for ecg the second one is for ecg and the first one is for one of the EEG electrodes let me know if you see something unusual in it yep I can see the images you uploaded one showing a graph for the electrode fp2 and the other for ekg the primary difference is that the two graphs are representing data from different types of electrodes fp2 is an electrode position on the scalp used for recording brain activity in EEG while ekg more commonly referred to as ecg or electrocardiogram records the heart's electrical activity the EEG graph for fp2 shows typical brainwave patterns you'd expect in an EEG reading with amplitude changes that are generally consistent with brain activity on the other hand the ekg graph shows larger fluctuations that are characteristic of heart rhythms it's typical for ekg readings to show larger voltage changes than EEG because the electrical activity of the heart is stronger than that of the brain as for the unusual observation in the data set having a large number of overlapping windows eg 0 to 50s 454s etc isn't necessarily a problem if each window is being used to capture and label different events or to provide context for machine learning models overlapping windows can be particularly useful if events like seizures occur as they could start at any time within the larger recording however it's important for the labeling process to account for this overlap to ensure the labels are accurate and not duplicative unless there's a clear reason to have multiple annotators label the same event for consensus or quality control purposes as for the data fetch if you're looking to retrieve 50 second windows the index calculations for the fetch would indeed start at offset sr and end at offset plus 50 sr which would give you the 50 second data window based on the 200 samples second rate this is only correct if offset refers to the start of the 50 second window you're interested in let me know if you need further clarification or assistance with the data and the visualizations so that's the thing about it is that overlap is only okay or so much overlap is only okay if the labels are different but i don't think there was an intention to label them differently like if all of these things are labeled as seizures that's wrong because this should have been say no seizure seizure onset end of seizure and acquired after the seizure which actually seem to be legit in this case so if those are seizure spikes they are more frequent larger amplitude to begin with then they're slowing down and then you have a quiet after the storm so looks that shit could be there is an ecg in the chamber then there's also this seizure is in it so yeah but it would have made sense as well potentially yeah this could have affected the the heart rate so yes you could have had a higher heart rate during seizure that kind of makes sense in this case i still suspect something is wrong suspect maybe this electrode label is not correct yeah i'm retrieving it all from the data itself if you haven't checked biolikeos.com please do so there's a lot of interesting tools in there well hopefully you will find them interesting as well forget to let me know what you think we take a break and continue this stream or just start another stream by the way the sessions are meant to be interactive do pop your questions in the chat yeah there's no age yeah you would expect the age in the the patient it's quite a lot of patients the ids are a bit odd i'm sorry i was looking at label label id it's different than sub id and label id label ids that's a good description isn't it label id and id for this set of labels or patient id is clear patient who donated the data so patients donated the data okay yeah the expert consensus they should have explained how they reach consensus because it's yeah it's just this majority majority vote there's no in this case there were 16 reviewers one voted lpd one l rda one voted ava yeah this one is really interesting one it had five voting gpd five voting ava one voting g rda and the consensus vote instead of ava is labeled as a gpd uh yeah you wouldn't you wouldn't do it if anything you you should have went the default the ava so essentially ignore it because you don't want to put the weight on it i assume that's correct yeah those votes is the count of the annotated votes for a given brain activity class the full names of the activity classes yeah lateralized periodic discharges generalized periodic discharges so this throughout the whole brain lateralized the specific area of the brain rhythmic delta so we we we would be able to see that see alert t there's no seizure idea see what the gpd so i don't get it how there were 10 seizures labeled and now and nine gpds in the same 10 minutes worth of recording yeah it looks like there's something happening there in the spectrogram but it's not visible in the raw data the ecg is a total mess pd what's lpd again lateralized periodic discharges yeah so the lateral area there no it's left right left lateral right lateral yes there's something if that's what they mean if the lpds yeah they are lateral because they're only happening here and there on both left and right side there should have been really a distinction as well between like unilateral bilateral yeah wouldn't necessarily not sure why they break it down this way you might just take a break and continue in a bit i'm just thinking we'll just finish the stream if there's no questions no comments everyone's happy everyone's probably busy doing this stuff so i might just