Tuesday, July 11, 2023

I asked AI aka ChatGPT "How to improve Social Media Algorithms to prevent extremism and promote balance in thinking within society"

 

I thought it would be an interesting question to pose to ChatGPT the most exciting AI engine at the current point in time, July 11, 2023. Basically ask AI how it thinks, AI algorithms in Social Media should be improved. 

Here is the fascinating answer I got.

I have to say I am very impressed with this response that feels Spot On!!

Improving social media algorithms to prevent extremism and promote balance in thinking within society is a complex challenge. While there is no definitive solution, here are a few suggestions that could potentially contribute to a more balanced and informed social media environment:


1. Transparency and User Control: Social media platforms should provide transparent explanations of how their algorithms work, including factors that influence content visibility and recommendations. Empowering users with control over their feed preferences and filtering options can help them customize their experience and reduce the echo chamber effect.


2. Diverse Content Recommendations: Algorithms should be designed to prioritize diversity and provide a range of perspectives on important topics. This could involve exposing users to content that challenges their existing beliefs, promoting reputable sources, and ensuring representation from various viewpoints.


3. Fact-Checking and Contextual Information: Integrating fact-checking mechanisms into the algorithm can help combat the spread of misinformation and disinformation. Platforms could work with reputable fact-checking organizations to provide accurate information and context alongside potentially misleading content.


4. Ethical Design and Responsible AI: Social media platforms should prioritize ethical design principles, taking into account the potential impacts of their algorithms on individuals and society. Responsible AI practices involve avoiding amplification of extremist or polarizing content and being mindful of the potential consequences of algorithmic decisions.


5. User Education and Media Literacy: Promoting media literacy and critical thinking skills among users is crucial. Social media platforms can collaborate with educators, organizations, and experts to provide resources, training, and initiatives that help users navigate information and engage in respectful and informed discussions.


6. Feedback Mechanisms and Continuous Improvement: Platforms should actively seek feedback from users and the wider community to understand the impact of their algorithms and make necessary adjustments. Regular evaluations, external audits, and ongoing research can contribute to refining algorithms and addressing potential biases or unintended consequences.

It's important to note that no single solution can completely eliminate extremism or ensure perfect balance. Combating extremism and promoting balanced thinking requires a multi-faceted approach involving collaboration among social media platforms, governments, users, and society at large.


So its not this problem cannot be solved, but if the purely capitalist structure motivated by corporate greed that is driving the social media giants will allow these changes to happen

Wednesday, November 9, 2016

Mushroom, Chicken Rice, with bacon, brussel sprouts and paneer, wrapped in Collard Greens


Ingredients
  • 2 tablespoon olive oil
  • 1/4 teaspoon of ground Sichuan peppers, ground to a powder
  • 1/4 teaspoon all spice powder
  • 1/4 teaspoon cloves, cardamom and cinnamon powder
  • 1/2 teaspoon of jeera powder
  • 1/2 teaspoon of fennel seed powder
  • 2 spoons of chili powder
  • 1/2 large onion finely chopped
  • 1 can of chicken
  • 6 pieces dried mushrooms
  • 1 teaspoon of ketchup
  • 2 teaspoon of sriracha sauce
  • 4 slices of cooked bacon, finely chopped
  • 1/2 cup cooked rice
  • 1/2 cup paneer(cottage cheese) chopped in small pieces
  • 5 teaspoons of grated asiago or parmesan cheese
  • 3 large collard green leaves
  1. Start with heating a pot. 
  2. Add oil and heat. 
  3. Add all seasoning powders and cook for a minute. 
  4. Add chopped dried mushrooms and fry for a minute 
  5. Add onions and fry for 2 minutes. 
  6. Add 1 can of chicken after straining the water. 
  7. After a minute add cooked bacon. 
  8. Add the stem from the collard greens finely chopped.  
  9. Add finely chopped paneer
  10. Add left-over cooked rice and mix well
  11. Switch off heat. Let it cool down for a few minutes
  12. Add one egg and grate some asiago or parmesan cheese. Mix well and keep aside
  13. Take the collard green leaves, without the stem.
  14. Add the rice mixture into it and wrap it, holding with a tooth pick.
  15. Sprinkle Salt on the collard green wrap.
  16. Steam or Bake. Place in steamer and steam till the collard green is cooked well and soft but does not break apart. OR Place in a baking dish drizzle some oil over it and bake it at 400F for 30 minutes.  

Wednesday, September 28, 2016

Avakkai Apple Thokku


Ingredients


  • 10 Raw Apples, preferably the very sour kind
  • 1 cup Mustard Seeds
  • 1.5 - 2 cups Spice Red Chili Powder
  • 3/4 - 1 cup Salt
  • 1/4 cup Turmeric Powder
  • 1/4 tablespoon Asafoetida
  • 3 tablespoon Fenugreek(Methi) Seeds
  • 2 cups Sesame Oil
  • 1/3 cup of Whole Garlic Cloves, Optional
  • 1/2 cup Lemon Juice, needed if apple is not sour enough

Method

  1. Adjust number of apples depending on size. Grate the apples, roughly, with the skin. Use a grater with bigger holes and not the fine ones.
  2. Lightly toast the mustard seeds along with the fenugreek seeds for a few minutes in low heat and grind to a fine powder. This powder can be stored for later use if there some left after making the pickle.
  3. Bring Oil to Medium Heat in a thick and deep pot.
  4. Add the Garlic
  5. A minute later add Asafoetida, add the grated apples, powder that was ground above, chili powder and 3/4 of a cup first of salt.
  6. Let it fry for 5 minutes
  7. Taste. 
    • It should be spicy. 
    • Check for salt, very mildly salty is good, but then salt is always a personal preference. 
    • It will have a bitter bite from the mustard/fenugreek powder, but the bitterness will fade as the pickle ages in the fridge.
    • Check for sourness
  8. If salt is not sufficient, add as needed.
  9. If sourness does not come through, add some lemon juice as needed.
  10. Cook for an additional 15-20 minutes
  11. Reduce heat to low-medium and slowly cook until all of the below happens.  
    • The mixture reduces down in volume and thickness reaches Thokku consistence i.e a lightly thick paste
    • The oil must separate out
    • The water in the mixture is almost completely gone. Specially if you don't plan on refrigerating the pickle
  12. Turn off heat, cover and let it cool down naturally.
  13. Stores in glass jam jars, preferably refrigerated.  
The key to taste is aging it for a few days so the bitterness wears out.

The key to longer life when stored is 
  • acidity from the sourness
  • saltiness
  • more oil, there should be a layer of the oil on top of the Pickle/Thokku when stored
  • Making sure as much of the water has been cooked out. I tend do reduce it in the oven for a few hours, occasional stirring, for longer shelf life. 
This goes well with 
  • just plain white rice
  • curd rice
  • as an accompaniment for dosa, idli
  • as a spicy spread with mayo on sandwiches 


Tuesday, April 26, 2016

The Good Fart Day - Celebrating a Healthy Colon - May 14th


I hereby proclaim that May 14th, shall hence forth be known as

The Good Fart Day

A day that celebrates a healthy Colon and guilt free farting.

Here is a verse that says it all

The Theory of Farts

டர்ரும் புர்ரும் நிர்பயஹ,
(darrum burrum nir bayaha)
(loud farts are not to be feared)

குய்யும் முய்யும் மத்ய மஹ, 
(kuyyum muyyum madhya maha)
(medium sounding farts can be tolerated)

நிசப்தம் பிராண சந்கட்டி. 
(nisaptham praana sankatti)
(The quiet ones are life threatening)


This started of as my contribution to the ridiculous list of days celebrating all sort of non-sense.
Did you know there is World Cleavage Day. Really!?

But then I realized, If you have a breast cancer day, 
why not have a colon cancer awareness day.
But what a boring name.
So I decided to call it the 

"Good Fart Day"

So how about we celebrate our fine asses, by drinking to it, reminiscing on all the ass jokes that we can think of, may be giving your digestive system a break, giving it a good enema, and making sure we give it the respect that it deserves.

An lets always remember, the ass hole is always in charge

"I should be in charge," said the brain , "Because I run all the body's systems, so without me nothing would happen."
"I should be in charge," said the blood , "Because I circulate oxygen all over so without me you'd waste away."
"I should be in charge," said the stomach," Because I process food and give all of you energy."
"I should be in charge," said the legs, "because I carry the body wherever it needs to go."
"I should be in charge," said the eyes, "Because I allow the body to see where it goes."
"I should be in charge," said the rectum, "Because Im responsible for waste removal."
All the other body parts laughed at the rectum And insulted him, so in a huff, he shut down tight. Within a few days, the brain had a terrible headache, the stomach was bloated, the legs got wobbly, the eyes got watery, and the blood Was toxic. They all decided that the rectum should be the boss
The Moral of the story? Even though the others do all the work.... The ass hole is usually in charge

Lets keep him happy.
And so...... 
"Happy Good Fart Day"

Sunday, October 25, 2015

வாழ்க்கை தாரகை (life is a star)



இது பொதிகை மலை, அதில் பனியின் புகை
         (idhu podhigai malai, adhil paniyin pugai)
         (Podhigai Mountains, the mists smoke)
இந்த  இரவின் பகை, என் கைகள் துணை
         (indha iravin pagai, en kaigal thunai)
         (The nights enmity, my arms shall guard)
பாரெலாம், தேடியும், என் மனம், உன்வசம்  
         (paarelaam, thediyum, en manam, un vasam)
         (World over, I have searched, but my heart's with you)
என் மனம், தாண்டவம், காரணம், உன்னிடம்
         (en manam, thaandavam, kaaranam, unnidam)
         (My heart, dances, the reason, is with you)

என் கண் அசைத்தாலே  உந்தன் ஞாபகம்
         (en kann asaindhaalae, undhan ngyabagam)
         (Even when my eyes move, its you that I think of)

நீ காமன் கலை, அதை ஓதும் சிலை
        (nee kaaman kalai, adhai odhum silai)
        (You are, the Art of love[kaman, is the god of love], the sculpture that speaks it)
உன் இதழ்கள் தனை, என் இதழில் இணை
        (un idhalgal thanai, en idhalil innai)
        (Let your lips, join with mine)
மோகமோ, என் வசம், நாணமோ, உன் வசம்
        (mogamo, en vasam, naanamo, un vasam)
        (passion is in me, shyness in you)
தேகமோ, சேரணும், தாகமோ, தீரணும்
        (thegamo, seranum, thhagamo, theeranum)
        (Our Bodies, should meet, thirsts to be quenched)

உன்  கை அணைத்தாலே, உள்ளம் போர்க்களம்
        (un kai anaithaalae, ullam porkalam)
        (If your arms hug, my heart comes a battle field)

உன் பார்வை வலை, அது எந்தன் சிறை
        (un paarvai valai, adhu endhan sirai)
        (Your look is a net,  that becomes my prison)
நீ பேசும் குரல், நான் தூங்கும் இசை
       (nee paesum kural, naan thoongum isai)
       (The voice when you speak, is the music I sleep to)
காலத்தின், போக்கெனும், சோர்விலா, ஓர் விஷம்,
       (kaalathin, pokaenum, sorvila, or visham)
       (Time, its passage, is a tireless, poison)
அதை போக்கவும், தாக்குமே, தேவதை, உன் ரசம்
       (adhai pokkavum, thaakumae, thevathai, un rasam)
       (To eliminate, it fights, goddess,  your essence.)

என் வாய் இசைத்தாலே உந்தன்  வாசகம்
       (en vaai isaithaalae, undhan vaasagam)
       (When my mouth sings, its your story)

உன் இமைகள் கலை, அசைக்கும் பரதக்கலை,
      (un imaigalkalai, asaikkum barathakalai)
      (Your eyelids, are moved by the art of barathanatyam[south indian classical dance])
என் திசை சாய்க்குமே,  உன் ஒரு புன்னகை
      (en thisai saaikumae, un oru punnagai)
      (It changes my direction, your one smile)
காந்தமோ, உன் இடை, சாந்தமோ, உன் நடை
      (kaandhamo, un idai, saanthamo, un nadai)
      (magnet, your hips, calm, your steps)
கடல் பாறையோ, கால்களை, தேய மோதுதே, உன் நகை
      (kadal paarayo, kaalkalai, theya modhuthey, un nagai)
      (rock at sea, my feet, to erode they crash, your giggles)

அகம்  அடைந்தாலே, வாழ்க்கை தாரகை
      (agam adainthalae, vaalkai thaarakai)
      (When I win your heart, my life is a star)


Copyright (c) Sarvi Shanmugham

Tuesday, September 1, 2015

Rent Vs Buy Comparson


To Rent or Buy. A question that never seems to have answers, and happens to be center of many debates when family and friends get together. And I have a had more than my share of that conversation.

A friend of mine, Subbu, started this spread sheet analyzing the Home Buying decision a while back and shared it with me. I had a few more questions and what ifs that I wanted to understand. So I decided to expand on this. I am sure a lot of you have questions on this topic. This is an attempt to settle this by the numbers.

Found and even better one from New York Times here use that

Well not really, but to provide a tool to debate with hard numbers, different assumptions and projections for the future.

Below, you will find that document published. I have protected most of the formulae so you wont be able to modify them. But the fields marked green in the first page are editable to allow you to test out different assumptions about the future.

The original interactive google spread sheet document can be found can be found here.

The one thing this document does not cover is the emotional aspects of owning your own home, the memories and the ups and downs that might come with it. Attempting that would be an exercise in futility.

The analysis, starts with the following assumptions

  1. You have X amount of money for down payment, specified in Case 1, Down Payment Amount.
  2. You have a monthly allocation of Y amount, specified in Case 1,  Maximum Allocation
  3. Price home you want to buy
  4. Rent you expect to pay for the house if you were to rent.
From here we look at different scenarios, change in price of the house, change in rent, change in interest rates, Expected appreciation for the house as well as the expected rate of return for money you might invest outside of the house.

You can always customize the different cases/scenarios from there, like 
  1. delaying the buying decision for a few years if you think the house prices are too high
  2. model an increase in interest rates X year from now, if you delay buying the house.
  3. What if you decide to rent for the rest of your life.
  4. Different rates of appreciation for the house
  5. Different rates of return for your investment money.
  6. Different inflation rates for rent and other expense.
The following is just a read only view of the document. If you want to try modifying the scenarios and the values, you want to use the above link to the original google sheets, make your own copy or download it to Excel and you can make modifications and try out different scenarios.

Use the Inputs tab below the graph to try out different scenarios.

Have fun trying it out. If you have any questions or corrections on the formulae I have used or  suggestions to improve, do let me know.



Copyright (c) Sarvi Shanmugham

Friday, August 28, 2015

My Quantopian Notes

While working on Quantopian.com, I have had to do a fair bit of learning in various areas

  1. Learn Statistics
  2. Operating on Data in Pandas
  3. Trading Models
This is my attempt at documenting some of my learnings for my own and others.

Fundamentals Data Operations

Calculate Z-Score for specific fundamental fields in the Quantopian fundamentals DataFrame.


from scipy import stats
#Get rows you want
d=fund_df.loc[['pe_ratio','ev_to_ebitda']]
#Transpose it
d=d.T
#Drop NANs
d=d.dropna()
#Apply stats.zscore on that data
d=d.apply(stats.zscore)
#transpose it back
d=d.T
#rename the columns as needed
zscore=d.rename({'ev_to_ebitda':'ev_to_ebitda_zscore','pe_ratio':'pe_ratio_zscore'})

Calculate Z-Score for specific fundamental fields in the Quantopian fundamentals DataFrame, but do it group-wise by Morning Start Sector Code


from scipy import stats
#Transpose it
d=fund_df.T
#Drop NANs
d=d.dropna()
#Groupby Morning Star Code
d=d.groupby('morningstar_sector_code')
#Get rows you want
d=d[['pe_ratio','ev_to_ebitda']]
#Transform with stats.zscore on that grouped data
d=d.transform(stats.zscore)
#transpose it back
d=d.T
#rename the columns as needed
gzscore=d.rename({'ev_to_ebitda':'ev_to_ebitda_gzscore','pe_ratio':'pe_ratio_gzscore'})

Add these rows to back to fundamentals data


fund_df = pandas.concat([fund_df,zscore,gzscore]) 





Copyright (c) Sarvi Shanmugham