>
next
Story ------ Overview 'semi' connecting Haskell to the Internet ----------- A. in Colored..Counter20.hs (cc20) file-system ------------ recorder: write every txt to p5SimY/svgS/test03.html in cc20 via 'textSvg' runKBASE The file system will update itself circa every 30 second. use 'iframe_c' capabilities of runKBASE --------------------------- src/TheAToBPlotter.hs the main function variables in switches in 'runKBASE' purpose -------- With the function similaritYvalue > compute 'SimilaritY Value -> with 'guess' => rate similaritYvalue :: (Foldable t2, Foldable t1, Ord p, Fractional p) => t2 p -> t1 p -> p -- Defined at C:\stack\SimilaritYWriter20\src\Colored_2_3_5_Counter20.hs:1270:1 prepare to read data the main function needs two variables each type String e.g *> let simiVals gb1 gb2 = similaritYvalue gb1 gb2 -- gb will be turned into the type Ord and then to Fractional *> let gb = map realToFrac (map ord "The") *> :t gb gb :: Fractional b => [b] *> let gb2 = map realToFrac (map ord "The") *> simiVals gb gb2 0.0 -- as it turns out here "The" == "The" -> simiVal => 0.0 *> let foGb1 gb = map realToFrac (map ord gb ) *> let foGb2 gb = map realToFrac (map ord gb ) *> let simiVal gb1 fgb2 = similaritYvalue (foGb1 gb1) (foGb2 gb2) *> simVal "The" "the" -- :) 9.968847352024921 -- the simiVal (similarity value) of the twp Strings *> simiVal "the" "the world is everything" 85.93339176161263 *> simiVal "The" "the world is everything" 87.33567046450482 and so on... WxMaxima ---------- src/TheAToBPlotter.hs && src/Colored_2_3_5_Counter.hs write pointclouds to file src/wxms/ullu1.wxm && src/wxms/lala.wxm One being a pointcloud (ptc) that is connected by 1 dimensional graphs. --compile the wxm file and explore The functions are ordered in a way that is possible to manually reduce the complexity of a given network by selecting in the gnu/wxmaxima plotter window. Right now the system is set to plot ptc4 but there are other ptc (ptc0..ptc8) ptc functions as well. As explained above every simiVal function needs a pair of inputs but if we would like to compare more than 2 inputs with each other we need a selection that has a certain order. see 'source/ConceptPlotter.png' This is how the wxm-plotter works and how ptcs can be computed for this program. Fourier --------- The idea of overlaying periodic functions and applying them to a data set is described in the github repository acsvToWx https://github.com/CBroemse/csvToWx For sheer curiosity the idea is kept for further investigations. Within this 'csvToWx' also the relation to mq (magic 'quadrants' :) is mentioned. To me they could represent an ordered state in the computational sense, I dont know if they actually are magic squares but the Fourier combined with magic-squares idea as shown has been carried further to this data-adventure. The different outcomes of choosing simple 2 dimensional periodic functions like f(sin X) to the 'fourier-PanmagicMq' functions is hinted at. The dimensionality of 'progVar' functions: 'src/TheAToBPlotter.hs' is selected via the get1 .. get4 variables get1 :: Int main function runKBASE offOn target plot addGh ghAdd n d get1 get2 get3 get4 = so far the selection is limited to choosing which four Strings to compare of a list of Strings ([String] ) thus the input list called 'bonelist' and this four selected items must match. (e.g I cannot get forth atom of a list length 3 and get a String result. (Just a Maybe String) but of course within its boundaries we do not necessarily need another data type. data type 'Punkt' ----------------- *Main> :t Punkt Punkt :: String -> Maybe Punkt -> Maybe Punkt -> Maybe Punkt -> Maybe Punkt -> Maybe Punkt -> Punkt Main> :t Co.checkflow Co.checkflow :: [Punkt -> Maybe Punkt] -> [Punkt] -> [[Char]] The reason to choose 5 'Maybe Punkt' structure and not another number is just a guess. Maybe any other number choice could be better but I wanted model a six-dimensional 'something' to see if there are obvious and more hidden differences to a 4 dimensional one, how are they like and can I compute them? However in the wxmaxima plot 3x3 ; 4x4 ; 5x5 & 6x6 matrices are apllied to the data and plotted. Just the data type has at least 6 dimensions because of the String. So choosing 5 'Maybe Punkts' also should have been a reduction that shortens the dimensionality not adds to it. Which worked out, until I wanted to make it work (formation) e.g *> let pi = Punkt "m" Nothing Nothing Nothing Nothing Nothing a fully functional error-handler and/or search tree of a 'unintended' high dimonsionality>6 with the same type - define a structure that is called 'formation' - which uploads functions into the main pipe and applies them to the data - when buiding the final 'Punkt' structure these are different computations that can be used with '[father,mother...' in src/TheAToBPotter :684 in 'kArmTest5' -- to be used with pg-functions formation :: [String] -> Punkt *> formation e = Punkt "formation" (Just (basis2 1 e)) (Just (basis2 2 e)) (Just (basis2 3 e)) (Just (basis2 4 e)) (Just (basis2 5 e)) Reduction ---------- To get out of the growing complexity and still being able to model the data type I settled for a hexagonal structure the 'honeycomb' to hopefully get a little bit of information out of the data that could be plotted by wxmaxima or the 3dPlotter. The 'refresh' svg file is an example of an sorting algorythm that lays out the honeycomb structures. Three coordinates points are placed on the edges of three equal sized hexagons. The green hexagon (hex0) is defined to be the first point of a given phiMax value. Green will be doubled in diameter but not in height and a second hexagon (hex1) will be drawn. We compute the difference between hex0 and hex1 using hex0 as a metric. (hex0 + 1/2 hex0) is the unit width. The overlaying area of three hexagons will be compared. 2_3_5_Counter -------------- The last step is a visualization that is based on the functions: -- aSieve :: Num b => Int -> [(String, b)] *> aSieve 1 [("\"green\"",1),("\"green\"",1),("\"green\"",1)] -- aSieve2 :: (Num a, Num b) => Int -> [(a, b)] *> aSieve2 3 [(2,1),(1,3),(1,3)] See 'source/2_3_5_1.png' The aim is to compare the previous 3 steps with this visualization. What can be learned ? still under development Architecture ------------- the structuring of 'src/Colored_2_3_5_Counter.hs' pg - functions (pg1..pg6) establishes the structure in the plot when choosing 2d such as sin(x) or cos(x) will yield simper output see 'source/sinCosCosSin2.png' vs see 'source/ptc4wittsatz1.png' e.g *> pg1 11 8.107263813734254e-4 now set to in 'src/TheAToBPlotter' pg1 x = F.fourierMQ6NOPAN123 x pg2 x = (F.fourierMQ5NOPAN123 x) pg3 x = (F.fourierMQ4NOPAN123 x) in 'open' ghc *TheAToBPlotter> C.kArmTest5 -- (imported see above) compare to results of *TheAToBPlotter> kArmTest5 -- fill in variables Lit: e.g *> liT = ["AAABB","AABAB","AAA","BBBAA"] a list used in cc20 and TheAToBPlotter that collects the selected progVars. poinclouds: the main differences stems of three different sorting functions 'wohlGeorNet1' ..'wohlGeorNet' graphs ------ see 'source/2at1d2at2d2at3d.png' x real graph / \ add5 x x | | add3 x---x---x x--x | /| \ | |\ | / | x | | \ |/ | / x--x--x----x---x---x \ / \/ x add2 | x -------------------------- ??? add5 x--x--x / / \ x--x x / / \ / x--x---x--x x--x add3 | /| | | |/ | x--x---x---x----x--x \ / x add2 | x the first add2 , then add3 then add5 the add functions as different steps in the 2_3_5_counter compile and plot the shortest path with wxmaxima 'source/graphs.wxm'