Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: virtual-labs-archive/artificial-neural-networks-iiith
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: saum7800/artificial-neural-networks-iiith
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.

Commits on Jun 26, 2019

  1. Copy the full SHA
    e3cbdc5 View commit details

Commits on Jun 27, 2019

  1. Copy the full SHA
    03f3cb6 View commit details

Commits on Jun 28, 2019

  1. Copy the full SHA
    8019864 View commit details

Commits on Jul 1, 2019

  1. Copy the full SHA
    7c1461a View commit details
  2. added quiz questions

    saum7800 committed Jul 1, 2019
    Copy the full SHA
    924db6f View commit details

Commits on Jul 3, 2019

  1. Copy the full SHA
    cfe02f0 View commit details
  2. Copy the full SHA
    75e3643 View commit details
  3. Copy the full SHA
    efea562 View commit details

Commits on Jul 4, 2019

  1. Copy the full SHA
    e5fd7ad View commit details
  2. C and L capital

    saum7800 committed Jul 4, 2019
    Copy the full SHA
    3d913b2 View commit details

Commits on Jul 5, 2019

  1. added quiz questions in .json format to 2nd project and made the 3rd …

    …screen for the third project
    saum7800 committed Jul 5, 2019
    Copy the full SHA
    0e1418e View commit details

Commits on Jul 8, 2019

  1. fixed screen and fixed log

    saum7800 committed Jul 8, 2019
    Copy the full SHA
    18272da View commit details
  2. solved codacy issues

    saum7800 committed Jul 8, 2019
    Copy the full SHA
    fa150d4 View commit details

Commits on Jul 9, 2019

  1. Copy the full SHA
    24ae225 View commit details
  2. Copy the full SHA
    e42707c View commit details

Commits on Jul 10, 2019

  1. Copy the full SHA
    a257cc6 View commit details

Commits on Jul 11, 2019

  1. Copy the full SHA
    5e2629d View commit details

Commits on Jul 14, 2019

  1. Copy the full SHA
    653f233 View commit details

Commits on Jul 15, 2019

  1. Copy the full SHA
    c4825da View commit details

Commits on Jul 16, 2019

  1. Copy the full SHA
    0532fd1 View commit details

Commits on Jul 21, 2019

  1. initialized SOM correctly

    saum7800 committed Jul 21, 2019
    Copy the full SHA
    865f4ad View commit details

Commits on Mar 17, 2020

  1. Copy the full SHA
    64290e0 View commit details
  2. undid changes before merge

    saum7800 committed Mar 17, 2020
    Copy the full SHA
    5e6663d View commit details
  3. Merge remote-tracking branch 'upstream/master'

    updating local repo
    saum7800 committed Mar 17, 2020
    Copy the full SHA
    58a0b2e View commit details
  4. Copy the full SHA
    c7b07db View commit details
Showing with 6,835 additions and 1 deletion.
  1. +67 −0 SRIP/Codes/sop_srip.css
  2. +56 −0 SRIP/Codes/sop_srip.html
  3. +155 −0 SRIP/Codes/sop_srip.js
  4. +33 −0 project issue number 200/Codes/help.css
  5. +66 −0 project issue number 200/Codes/help.html
  6. +67 −0 project issue number 200/Codes/pdp1_SRIP.css
  7. +62 −0 project issue number 200/Codes/pdp1_SRIP.html
  8. +554 −0 project issue number 200/Codes/pdp1_SRIP.js
  9. +258 −0 project issue number 200/Codes/quiz-question.json
  10. +72 −0 project issue number 200/Libraries/names.txt
  11. +68 −0 project issue number 200/Libraries/network.txt
  12. +147 −0 project issue number 200/Libraries/proc.pde
  13. +1,136 −0 project issue number 200/Libraries/stanford-Interactive Activation and Competition.html
  14. +164 −0 ...ect issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook.css
  15. BIN ...t issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook0x.png
  16. BIN ... issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook10x.png
  17. BIN ... issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook11x.png
  18. BIN ... issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook12x.png
  19. BIN ... issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook13x.png
  20. BIN ... issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook14x.png
  21. BIN ... issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook15x.png
  22. BIN ... issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook16x.png
  23. BIN ... issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook17x.png
  24. BIN ... issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook18x.png
  25. BIN ... issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook19x.png
  26. BIN ...t issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook1x.png
  27. BIN ... issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook20x.png
  28. BIN ... issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook21x.png
  29. BIN ... issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook22x.png
  30. BIN ... issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook23x.png
  31. BIN ...t issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook2x.png
  32. BIN ...t issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook3x.png
  33. BIN ...t issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook4x.png
  34. BIN ...t issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook5x.png
  35. BIN ...t issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook6x.png
  36. BIN ...t issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook7x.png
  37. BIN ...t issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook8x.png
  38. BIN ...t issue number 200/Libraries/stanford-Interactive Activation and Competition_files/handbook9x.png
  39. BIN ...number 200/Libraries/stanford-Interactive Activation and Competition_files/jetsandsharkstable.png
  40. BIN ... issue number 200/Libraries/stanford-Interactive Activation and Competition_files/jetsdiagram.png
  41. BIN ...issue number 200/Libraries/stanford-Interactive Activation and Competition_files/netviewer100.png
  42. BIN ...ssue number 200/Libraries/stanford-Interactive Activation and Competition_files/netviewerInit.png
  43. +102 −0 project issue number 200/code documentation/Code Documentation.md
  44. +75 −0 project issue number 200/code documentation/Experiment Project Documentation.md
  45. +34 −0 project issue number 200/code documentation/pdp1-IAC Procedure.md
  46. +55 −0 project issue number 200/code documentation/quiz questions
  47. +42 −0 project issue number 200/code documentation/test-cases.md
  48. +33 −0 project-issue-number-201/Codes/help.css
  49. +71 −0 project-issue-number-201/Codes/help.html
  50. +43 −0 project-issue-number-201/Codes/pdp2.css
  51. +25 −0 project-issue-number-201/Codes/pdp2.html
  52. +896 −0 project-issue-number-201/Codes/pdp2.js
  53. +505 −0 project-issue-number-201/Codes/quiz-questions.json
  54. BIN project-issue-number-201/Libraries/325470512-ANN-by-B-Yegnanarayana-pdf.pdf
  55. +45 −0 project-issue-number-201/Libraries/annealTAB.txt
  56. +40 −0 project-issue-number-201/Libraries/csroomwt.txt
  57. +40 −0 project-issue-number-201/Libraries/descriptors.txt
  58. +40 −0 project-issue-number-201/Libraries/roomunames.txt
  59. +40 −0 project-issue-number-201/Libraries/state.txt
  60. +40 −0 project-issue-number-201/Libraries/stateTEST.txt
  61. +40 −0 project-issue-number-201/Libraries/stateTEST2.txt
  62. +40 −0 project-issue-number-201/Libraries/state_bedroom.txt
  63. +40 −0 project-issue-number-201/Libraries/state_kitchen.txt
  64. +40 −0 project-issue-number-201/Libraries/state_office.txt
  65. +114 −0 project-issue-number-201/code documentation/Code Documentation.md
  66. +75 −0 project-issue-number-201/code documentation/Experiment Project Documentation.md
  67. +48 −0 project-issue-number-201/code documentation/pdp2-CSNN Procedure.md
  68. +20 −0 project-issue-number-201/code documentation/test-cases.md
  69. +122 −0 project-issue-number-205/Codes/clnn_srip.css
  70. +96 −0 project-issue-number-205/Codes/clnn_srip.html
  71. +566 −0 project-issue-number-205/Codes/clnn_srip.js
  72. +39 −0 project-issue-number-205/Codes/help.css
  73. +75 −0 project-issue-number-205/Codes/help.html
  74. +259 −0 project-issue-number-205/Codes/quiz-questions.json
  75. BIN project-issue-number-205/Libraries/equation.png
  76. +94 −0 project-issue-number-205/code documentation/Code Documentation.md
  77. +76 −0 project-issue-number-205/code documentation/Experiment Project Documentation.md
  78. +38 −0 project-issue-number-205/code documentation/pdp2-CSNN Procedure.md
  79. +21 −0 project-issue-number-205/code documentation/test-cases.md
  80. +1 −1 src/lab/exp1/Experiment.html
67 changes: 67 additions & 0 deletions SRIP/Codes/sop_srip.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
*{
font-family:sans-serif;
}

html{
background:url(https://bbl.solutions/wp-content/uploads/2014/11/Blog-background-white-HNM-blue-gradient-blue-gear-2.png);
background-size: cover;
}

#heading{
background-color: lightblue;
color:white;
text-align: center;
border-style: solid;
padding-top:10px;
padding-bottom:10px;
}


.btn {
border: none;
padding: 14px 28px;
font-size: 16px;
cursor: pointer;
background-color:lightblue;
text-align: center;
background-origin: padding-box;
border-radius:10px;
}
.btn:hover{
background:orange;
}

#centre_button{
text-align: center;
}

#flex-container{
display:flex;
flex-direction:row-reverse;
justify-content:space-around;
align-content:center;
}

table,th,td{
border:1px solid lightblue;
border-collapse: collapse;
}

td{
height:30px;
padding:5px;
}

input{
border:none;
}

input:hover{
background:lightCyan;
}

#one{
margin-bottom:20px;
float: right;
margin-right: 2%;
}
56 changes: 56 additions & 0 deletions SRIP/Codes/sop_srip.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>sop</title>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<script src="sop_srip.js"></script>
<link rel="stylesheet" type="text/css" href="sop_srip.css">
</head>

<body>
<h1 id="heading">SOP</h1>

<div id="centre_button">
<button class="btn" onclick="initSOM()">Initialize SOM</button>
<button class="btn" onclick="window.open('help.html','_blank')">Next City</button>
<button class="btn" onclick="setNewValues()">Next Iteration</button>
<button class="btn" onclick="document.location.reload(true)">Reset</button>
</div>
<br><br>

<div id="flex-container">
<div id="city-coordinates"></div>

<table id="one">
<tr>
<th>Variable</th>
<th>Value</th>
</tr>
<tr>
<td>Number of cities</td>
<td><input type="text" autocomplete="off" id="numCities" value='20'></td>
</tr>
<tr>
<td>Number of Nodes</td>
<td><input type="text" autocomplete="off" id="numNodes" value='40'></td>
</tr>
<tr>
<td>Number of iterations</td>
<td><input type="text" autocomplete="off" id="numIter" value='20'></td>
</tr>
<tr>
<td>City Step Size</td>
<td><input type="text" autocomplete="off" id="cityStep" value='1'></td>
</tr>
<tr>
<td>Iteration step size</td>
<td><input type="text" autocomplete="off" id="iterStep" value='1'></td>
</tr>
</table>
<div id="weight-coordinates"></div>
</div>
</body>

</html>
155 changes: 155 additions & 0 deletions SRIP/Codes/sop_srip.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
//console.log("whaaaat!");
let tau0 = 1.0;
let tauT = tau0;
let currentCityIndex =1;
let currentIterationIndex =1;
let pi=3.14159;
let numCities;
let numNodes;
let numIterations;
let cityStep;
let iterStep;
let cityData=[];
cityData[0]=[];
cityData[1]=[];
let weights=[];
weights[0]=[];
weights[1]=[];
weights[2]=[];
weights[3]=[];

function setValues()
{
numCities=parseInt(document.getElementById("numCities").value);
numNodes=parseInt(document.getElementById("numNodes").value);
numIterations=parseInt(document.getElementById("numIter").value);
cityStep=parseInt(document.getElementById("cityStep").value);
iterStep=parseInt(document.getElementById("iterStep").value);
// console.log(isNaN(i));
}

function setData()
{
for(let i=0;i<numCities;i++)
{
cityData[0][i]=Math.random();
cityData[1][i]=Math.random();
}
}

function setWeights()
{
let r=[];
let theta=[];
for(let i=0;i<numNodes;i++)
{
r=1.0;
theta=(pi/(numNodes-1)) + 2*pi*(i)/(numNodes-1);
let x= r * Math.cos(theta);
let y= r * Math.sin(theta);
weights[0][i]=x;
weights[1][i]=y;
weights[2][i]=Math.random();
weights[3][i]=Math.random();
}
}

function plotData()
{
let drawdata = {
x: cityData[0],
y: cityData[1],
mode: 'markers',
type: 'scatter',
hoverinfo: 'skip',
marker: {
size: 10,
symbol: "star-open",
color: "blue"
}
};
let layout = {
xaxis: {
range: [-0.1, 1.1],
title: "x-coordinate of city location"
},
yaxis: {
range: [-0.1, 1.1],
title: "y-coordinate of city location"
},
title: "Coordinates of cities",
width: 400,
height: 400

//xlabel:"X-coordinate of data",
//ylabel:"Y-coordinate of data"
};

var data = [drawdata];

Plotly.newPlot('city-coordinates', data, layout);
}

function plotWeights(){
let i;
let weightTemp1=[];
weightTemp1[0]=[];
weightTemp1[1]=[];
weightTemp1[2]=[];
weightTemp1[3]=[];
for(i=0;i<numNodes;i++)
{
weightTemp1[0][i]=weights[0][i];
weightTemp1[1][i]=weights[1][i];
weightTemp1[2][i]=weights[2][i];
weightTemp1[3][i]=weights[3][i];
}
weightTemp1[0][i]=0;
weightTemp1[1][i]=0;
weightTemp1[2][i]=weights[2][0];
weightTemp1[3][i]=weights[3][0];
let drawWeight = {
x: weightTemp1[2],
y: weightTemp1[3],
mode: 'markers',
type: 'scatter',
hoverinfo: 'skip',
marker: {
size: 4,
symbol: "circle",
color: "black"
}
};
let layout = {
xaxis: {
range: [-0.1, 1.1],
title: "w_1"
},
yaxis: {
range: [-0.1, 1.1],
title: "w_2"
},
title: "Weight vectors coordinates of nodes",
width: 400,
height: 400

//xlabel:"X-coordinate of data",
//ylabel:"Y-coordinate of data"
};

var data = [drawWeight];

Plotly.newPlot('weight-coordinates', data, layout);
}



function initSOM()
{
// console.log("wut");
setValues();
setData();
setWeights();
plotData();
plotWeights();
}
33 changes: 33 additions & 0 deletions project issue number 200/Codes/help.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
*{
font-family:sans-serif;
}

html{
background:url(https://bbl.solutions/wp-content/uploads/2014/11/Blog-background-white-HNM-blue-gradient-blue-gear-2.png);
background-size: cover;
}

#heading{
background-color: lightblue;
color:white;
text-align: center;
border-style: solid;
padding-top:10px;
padding-bottom:10px;
}

#ol{
background: lightcyan;
padding: 30px;
border-style: solid;

}

h3{
background-color: lightblue;
color:white;
text-align: center;
border-style: solid;
padding-top:10px;
padding-bottom:10px;
}
66 changes: 66 additions & 0 deletions project issue number 200/Codes/help.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>HELP</title>
<link rel="stylesheet" type="text/css" href="help.css">
</head>

<body>
<h1 id="heading">HELP</h1>
<p>
An interactive activation and competition network consists of a collection of processing units organized into some number of competitive pools. There are excitatory connections among units in different pools and inhibitory connections among units within the same pool. The excitatory connections between pools are generally bidirectional, thereby making the processing interactive in the sense that processing in each pool both influences and is influenced by processing in other pools. Within a pool, the inhibitory connections are usually assumed to run from each unit in the pool to every other unit in the pool. This implements a kind of competition among the units such that the unit or units in the pool that receive the strongest activation tend to drive down the activation of the other units.
</p>
<h3>Procedure for use</h3>
<ol id="ol">
<li> Observe the bottom of the simulator to know which cycle number is going on and to see the g-delta plot and global change value.</li>
<br>
<li> hover your mouse over any component to highlight the component and see it's excitatory and inhibitory connections with other units. The activation and net input of that unit is displayed on top left.</li>
<br>
<li> Click on any unit (except in the instance pool) to give external input to that unit and activate it.</li>
<br>
<li> Observe how activation of that unit affects the other units activation and net inputs.</li>
<br>
<li> Also observe how the global change spikes in the few cycles after giving external input to a unit.</li>
<br>
<li> Click on same unit to take away the external input given to that unit.</li>
<br>
<li> Observe how the residual net input remains even after removing external input.</li>
<br>
<li> Press spacebar to pause the simulator in current cycle. Press spacebar again to resume cycles.</li>
<br>
<li> In paused position, hover over units whose activation data you want. In paused position, cycle will be stopped and giving external input will be disallowed.</li>
<br>
<li> Press r to reset the simulator with the same values just used in the simulator. </li>
<br>
<li> Press s to activate slow motion mode which performs cycles slower than actual speed to get a closer look at how the values of the units change. Press s again to resume real speed cycle change.</li>
<br>
<li> Change the values of the variables in the table ( in range of (original value - 0.5) to (original value + 0.5) ) and click on set values and restart to start new set of cycles with changed values of variables.</li>
<br>
<li> Click on Reset original values and restart to start new set of cycles with original values of variables.</li>
</ol>
<h3>Formulae Used</h3>
<p>
if weights between i'th and j'th components is +ve,<br>
q = weight * activation<br>
excitation += q for all units.<br><br>

if weights between i'th and j'th components is -ve,<br>
q = weight * activation<br>
inhibition += q for all units.<br><br>

net input = (estr * external input) + (beta * excitation) + (gamma * inhibition)
<br>
delta excitation = (actmax - activation) * net input - decay * (activation - actrest)<br>
activation += delta excitation<br>
g Delta = g Delta + absolute(delta excitation)<br><br>

delta inhibition = (activation - actmin) * net input - decay * (activation - actrest);<br>
activation += delta inhibition;<br>
g Delta = g Delta + absolute(delta inhibiton);<br><br>
For more information and help regarding IAC, click <a href="https://web.stanford.edu/group/pdplab/pdphandbook/handbookch3.html">here</a>
</p>
</body>

</html>
Loading