Thu May 9 01:49:48 2024
EVENTS
 FREE
SOFTWARE
INSTITUTE

POLITICS
JOBS
MEMBERS'
CORNER

MAILING
LIST

NYLXS Mailing Lists and Archives
NYLXS Members have a lot to say and share but we don't keep many secrets. Join the Hangout Mailing List and say your peice.

DATE 2017-03-01

LEARN

2024-05-09 | 2024-04-09 | 2024-03-09 | 2024-02-09 | 2024-01-09 | 2023-12-09 | 2023-11-09 | 2023-10-09 | 2023-09-09 | 2023-08-09 | 2023-07-09 | 2023-06-09 | 2023-05-09 | 2023-04-09 | 2023-03-09 | 2023-02-09 | 2023-01-09 | 2022-12-09 | 2022-11-09 | 2022-10-09 | 2022-09-09 | 2022-08-09 | 2022-07-09 | 2022-06-09 | 2022-05-09 | 2022-04-09 | 2022-03-09 | 2022-02-09 | 2022-01-09 | 2021-12-09 | 2021-11-09 | 2021-10-09 | 2021-09-09 | 2021-08-09 | 2021-07-09 | 2021-06-09 | 2021-05-09 | 2021-04-09 | 2021-03-09 | 2021-02-09 | 2021-01-09 | 2020-12-09 | 2020-11-09 | 2020-10-09 | 2020-09-09 | 2020-08-09 | 2020-07-09 | 2020-06-09 | 2020-05-09 | 2020-04-09 | 2020-03-09 | 2020-02-09 | 2020-01-09 | 2019-12-09 | 2019-11-09 | 2019-10-09 | 2019-09-09 | 2019-08-09 | 2019-07-09 | 2019-06-09 | 2019-05-09 | 2019-04-09 | 2019-03-09 | 2019-02-09 | 2019-01-09 | 2018-12-09 | 2018-11-09 | 2018-10-09 | 2018-09-09 | 2018-08-09 | 2018-07-09 | 2018-06-09 | 2018-05-09 | 2018-04-09 | 2018-03-09 | 2018-02-09 | 2018-01-09 | 2017-12-09 | 2017-11-09 | 2017-10-09 | 2017-09-09 | 2017-08-09 | 2017-07-09 | 2017-06-09 | 2017-05-09 | 2017-04-09 | 2017-03-09 | 2017-02-09 | 2017-01-09 | 2016-12-09 | 2016-11-09 | 2016-10-09 | 2016-09-09 | 2016-08-09 | 2016-07-09 | 2016-06-09 | 2016-05-09 | 2016-04-09 | 2016-03-09 | 2016-02-09 | 2016-01-09 | 2015-12-09 | 2015-11-09 | 2015-10-09 | 2015-09-09 | 2015-08-09 | 2015-07-09 | 2015-06-09 | 2015-05-09 | 2015-04-09 | 2015-03-09 | 2015-02-09 | 2015-01-09 | 2014-12-09 | 2014-11-09 | 2014-10-09

Key: Value:

Key: Value:

MESSAGE
DATE 2017-03-29
FROM Ruben Safir
SUBJECT Subject: [Learn] perseptors
From learn-bounces-at-nylxs.com Wed Mar 29 22:50:35 2017
Return-Path:
X-Original-To: archive-at-mrbrklyn.com
Delivered-To: archive-at-mrbrklyn.com
Received: from www.mrbrklyn.com (www.mrbrklyn.com [96.57.23.82])
by mrbrklyn.com (Postfix) with ESMTP id 0838C161312;
Wed, 29 Mar 2017 22:50:35 -0400 (EDT)
X-Original-To: learn-at-nylxs.com
Delivered-To: learn-at-nylxs.com
Received: from [10.0.0.62] (flatbush.mrbrklyn.com [10.0.0.62])
by mrbrklyn.com (Postfix) with ESMTP id A4066160E77
for ; Wed, 29 Mar 2017 22:50:31 -0400 (EDT)
From: Ruben Safir
To: "learn-at-nylxs.com"
Message-ID: <563a5295-9353-94b0-104f-0c9a23d7c2f6-at-mrbrklyn.com>
Date: Wed, 29 Mar 2017 22:50:31 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------A7A24B8B06275A636C512F1E"
Subject: [Learn] perseptors
X-BeenThere: learn-at-nylxs.com
X-Mailman-Version: 2.1.17
Precedence: list
List-Id:
List-Unsubscribe: ,

List-Archive:
List-Post:
List-Help:
List-Subscribe: ,

Errors-To: learn-bounces-at-nylxs.com
Sender: "Learn"

This is a multi-part message in MIME format.
--------------A7A24B8B06275A636C512F1E
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

base gig
--
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com

Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013


--------------A7A24B8B06275A636C512F1E
Content-Type: text/x-c++src;
name="learn.cpp"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="learn.cpp"

/*
* =====================================================================================
*
* Filename: learn.cpp
*
* Description: Learn with a Neuronet and Perceptrons
*
* Version: 1.0
* Created: 03/29/2017 04:14:13 PM
* Revision: none
* Compiler: gcc
*
* Author: Ruben Safir (mn), ruben-at-mrbrklyn.com
* Company: NYLXS Inc
*
* =====================================================================================
*/
#include "perceptron.h"
const float LEARN_RATE = 0.2;
const int PRECISION = 3;
const int NUMWIDTH = PRECISION + 3;

void tt(std::vector truth_table ){
std::cout << std::endl << "__Truth Table__" << std::endl;
for(auto x : truth_table)
{
std::cout << x << "\t";
}
std::cout << std::endl;

}
int main (int argc, char ** argv )
{
std::vector * sensor_inputs[4] = {
new std::vector {0,0},
new std::vector {0,1},
new std::vector {1,0},
new std::vector{1,1}
};

std::vector weight_inputs = { 0.4, 0.4, 0.0 };
std::vector truth_table(4);
for(int i = 0; i<4; i++){
network::Perceptron p_and (*sensor_inputs[i],weight_inputs, 0.5);
std::cout << "AND sum =>" << p_and.get_sum() << std::endl << std::endl;
std::cout << "AND threshold =>" << p_and.get_threshold() << std::endl;
std::cout << "AND Functor =>" << p_and.functor() << std::endl << std::endl;
truth_table[i] = p_and.functor();
}

tt(truth_table);

weight_inputs[0] = 0.6;
weight_inputs[1] = 0.6;
weight_inputs[2] = 0.0;
for(int i = 0; i<4; i++){
network::Perceptron p_or (*sensor_inputs[i],weight_inputs, 0.5);
std::cout << "XOR sum =>" << p_or.get_sum() << std::endl;
std::cout << "XOR threshold =>" << p_or.get_threshold() << std::endl;
std::cout << "XOR Functor =>" << p_or.functor() << std::endl;
truth_table[i] = p_or.functor();
}
tt(truth_table);

weight_inputs[0] = -0.4;
weight_inputs[1] = -0.4;
weight_inputs[2] = 0.0;
for(int i = 0; i<4; i++){
network::Perceptron p_or (*sensor_inputs[i],weight_inputs, -0.5);
std::cout << "NAND sum =>" << p_or.get_sum() << std::endl;
std::cout << "NAND threshold =>" << p_or.get_threshold() << std::endl;
std::cout << "NAND Functor =>" << p_or.functor() << std::endl;
truth_table[i] = p_or.functor();
}
tt(truth_table);

return 1;
}


--------------A7A24B8B06275A636C512F1E
Content-Type: text/x-chdr;
name="perceptron.h"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="perceptron.h"

/*
* =====================================================================================
*
* Filename: perceptron.h
*
* Description: Basic Unit for AI machine learning
*
* Version: 1.0
* Created Mon Mar 27 22:33:19 EDT 2017
* Revision: none
* Compiler: gcc
*
* Author: Ruben Safir (mn), ruben-at-mrbrklyn.com
* Company: NYLXS Inc - LIU Thesis
*
* =====================================================================================
*/

#ifndef PERCEPTRON_H
#define PERCEPTRON_H
#include
#include
#include
namespace network {

/*
* =====================================================================================
* Class: Perceptron
* Description: This class describes a single node and its data
* =====================================================================================
*/
template < class T, class W >
class Perceptron
{
public:
/* ==================== LIFECYCLE ======================================= */
Perceptron ( std::vector s1, std::vector w1, float thresh ): sensors{s1}, weights{w1}, threshold{thresh} {
sensors.push_back(1);
weighted_sum();
}; /* constructor */

/* ==================== ACCESSORS ======================================= */
W get_sum()
{
// std::cout << "Called get sum" << std::endl;
return sum;
};

float get_threshold()
{
return threshold;
};

/* ==================== MUTATORS ======================================= */
int functor()
{
if(sum < get_threshold())
{
return 0;
}else{
return 1;
}
}
/* ==================== OPERATORS ======================================= */
/* ==================== DATA MEMBERS ======================================= */
T data;
protected:

private:
std::vector sensors;
std::vector weights;
float threshold;
float sum = 0;
float weighted_sum()
{
if( sensors.size() != weights.size() )
{
std::cerr << __LINE__ << " You broke my perceptron by failing to give a weight for the bias";
exit(1);
}
for (int i = 0; i < static_cast ( sensors.size()) ; i++)
{
std::cout << "sensor =>" << sensors[i] << std::endl;
std::cout << "weight =>" << weights[i] << std::endl;
sum += weights[i] * sensors[i];
// std::cout << "sum =>" << sum << std::endl;
// std::cout << "get sum =>" << get_sum() << std::endl;

};
return sum;
};



}; /* ---------- end of template class Perceptron ---------- */


}//close of namespace network

#endif


--------------A7A24B8B06275A636C512F1E
Content-Type: text/x-c++src;
name="perceptron.cpp"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="perceptron.cpp"

#include "perceptron.h"
#include



--------------A7A24B8B06275A636C512F1E
Content-Type: text/plain; charset=UTF-8;
name="makefile"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="makefile"

WFg6PWdjYwpDWFhGTEFHUzo9LVdhbGwgLWdnZGIgLXBnIApMREZMQUdTOj0gLXBnIC1wdGhy
ZWFkCgpsZWFybjogcGVyY2VwdHJvbi5vIGxlYXJuLm8KCSQoQ1hYKSAkKENYWEZMQUdTKSAk
KExERkxBR1MpIC1vIGxlYXJuLmV4ZSBwZXJjZXB0cm9uLm8gbGVhcm4ubwoKcGVyY2VwdHJv
bjogcGVyY2VwdHJvbi5jcHAgcGVyY2VwdHJvbi5oCgkkKENYWCkgJChDWFhGTEFHUykgJChM
REZMQUdTKSAtYyBwZXJjZXB0cm9uLmNwcAoKbm9kZXM6IGxlYXJuLmNwcCBsZWFybi5oCgkk
KENYWCkgJChDWFhGTEFHUykgJChMREZMQUdTKSAtYyBsZWFybi5jcHAgCgppbmNsdWRlIG1h
a2UuZGVwcwptYWtlLmRlcHM6ICouY3BwOyAke0NYWH0gJHtDWFhGTEFHU30gLU0gKi5jcHAg
PiRACgo=
--------------A7A24B8B06275A636C512F1E
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Learn mailing list
Learn-at-nylxs.com
http://lists.mrbrklyn.com/mailman/listinfo/learn

--------------A7A24B8B06275A636C512F1E--

  1. 2017-03-02 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] neutal networks and pacman
  2. 2017-03-02 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Ultrametric networks: a new tool for phylogenetic analysis
  3. 2017-03-05 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] cost in evolution
  4. 2017-03-09 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] CatScan fossil files
  5. 2017-03-10 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] neural Networks and Quantum Mechanics
  6. 2017-03-12 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] I just found a GREAT video on partial derivatives
  7. 2017-03-13 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] Contact DOJ and thell them to blow it out their ass
  8. 2017-03-14 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] CatScan fossil files
  9. 2017-03-14 Ramon Nagesan <ramon.nagesan-at-gmail.com> Re: [Learn] CatScan fossil files
  10. 2017-03-16 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] is this up
  11. 2017-03-16 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] hang out is down
  12. 2017-03-16 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] is this working
  13. 2017-03-16 Charlie Gonzalez <itcharlie-at-gmail.com> Subject: [Learn] Registration for The Perl Conference 2017 is now open!!
  14. 2017-03-16 From: "soledad.esteban" <soledad.esteban-at-icp.cat> Subject: [Learn] [dinosaur] Advanced course Geometric Morphometrics in R,
  15. 2017-03-17 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: [dinosaur] Advanced course Geometric Morphometrics in
  16. 2017-03-17 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] good news !
  17. 2017-03-18 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] circles
  18. 2017-03-20 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Alice
  19. 2017-03-20 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] hough transform - Lecture 9
  20. 2017-03-21 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Anyone understand this well
  21. 2017-03-21 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: [dinosaur] Digital mapping of dinosaurian tracksites
  22. 2017-03-22 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] ODBASE 2017 - The 16th International Conference on
  23. 2017-03-24 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Decision Tree
  24. 2017-03-24 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Genetic Modification with decent
  25. 2017-03-27 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] Fwd: Re: hough transform - Lecture 9
  26. 2017-03-27 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] MOOCS
  27. 2017-03-27 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Peter Novig learning and on line teaching
  28. 2017-03-28 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] computations
  29. 2017-03-29 Christopher League <league-at-contrapunctus.net> Re: [Learn] This is hard to understand what the logic is here
  30. 2017-03-29 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] This is hard to understand what the logic is here
  31. 2017-03-29 Christopher League <league-at-contrapunctus.net> Re: [Learn] This is hard to understand what the logic is here
  32. 2017-03-29 Ruben Safir <mrbrklyn-at-panix.com> Re: [Learn] This is hard to understand what the logic is here
  33. 2017-03-29 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] perseptors
  34. 2017-03-29 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] This is hard to understand what the logic is here
  35. 2017-03-29 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] This is hard to understand what the logic is here
  36. 2017-03-30 Ruben Safir <mrbrklyn-at-panix.com> Re: [Learn] c arrays
  37. 2017-03-30 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] c arrays
  38. 2017-03-30 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] random weights
  39. 2017-03-30 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] randomize with commentary
  40. 2017-03-31 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Computational Paleo

NYLXS are Do'ers and the first step of Doing is Joining! Join NYLXS and make a difference in your community today!