Skip to content

Commit bc26aed

Browse files
committed
Update 1-2-modele-semiwariogramu.ipynb
1 parent 22b27dd commit bc26aed

File tree

1 file changed

+32
-38
lines changed

1 file changed

+32
-38
lines changed

tutorials/functional/translated/PL-Polish/1-2-modele-semiwariogramu.ipynb

Lines changed: 32 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@
186186
"id": "ff651f33-7c46-420d-8d2d-d9e72ea1c923",
187187
"metadata": {},
188188
"source": [
189-
"The spatial correlation of this structure is very weak. We can change it with a simple blur filter. Its size will be close to the **range** parameter! Blur filter averages pixel values within its range. In other words, it areas with correlated values. I set the filter size to seven (7) units, but you can set it smaller or larger for your experiments. You can apply it multiple times to get smoother areas, where values will be even more similar within the filter range."
189+
"Przestrzenna korelacja takiej powierzchni jest bardzo słaba (w końcu to sygnał chaotyczny). Ale możemy to zmienić nakładając prosty filtr rozmywający. Jego wielkość, liczona w pikselach, będzie bliska parametrowi `range` teoretycznego semiwariogramu. Filtr rozmywający uśrednia wartości wewnątrz okna o zadanym wymiarze NxN pikseli, a to uśrednianie to jest de facto przestrzenna korelacja. Sąsiedzi będą mieli zbliżone wartości, nie będzie nagłych zmian w pikselach obok.\n",
190+
"\n",
191+
"Ustawimy filtr na 7 jednostek, ale możesz go powiększyć albo zmniejszyć w ramach własnych eksperymentów. Filtr ten można zaaplikować wiele razy, wtedy wartości będą jeszcze bardziej zbliżone."
190192
]
191193
},
192194
{
@@ -233,19 +235,19 @@
233235
"id": "2ae16b05-e589-4378-9bc0-49eea1955d1e",
234236
"metadata": {},
235237
"source": [
236-
"## Chapter 2: Calculate the experimental semivariogram\n",
238+
"## Część 2: eksperymentalny semiwariogram\n",
237239
"\n",
238-
"We must create the experimental variogram before we start comparing theoretical models. Our two-dimensional surface must be transformed into an array:\n",
240+
"Eksperymentalny wariogram musi zostać przygotowany do tego, żeby dopasować do niego najlepszą funkcję teoretyczną. Żeby to zrobić, dwuwymiarowa macierz (powierzchnia) jest przekształcona do tablicy z koordynatami pikseli i ich natężeniem.\n",
239241
"\n",
240242
"```\n",
241243
"[\n",
242-
" [coordinate x1, coordinate y1, value1],\n",
243-
" [coordinate x2, coordinate y2, value2],\n",
244+
" [współrzędna x1, współrzędna y1, wartość j1],\n",
245+
" [współrzędna x2, współrzędna y2, wartość j2],\n",
244246
" [...],\n",
245247
"]\n",
246248
"```\n",
247249
"\n",
248-
"The path to transform a 2D surface into pixel coordinates has two steps. In the first step, we use `scipy` to make a sparse representation of the surface, and in the second step, we use `numpy` to transform the sparse representation into an array."
250+
"Taka transformacja jest możliwa w pakiecie `scipy`. Najpierw macierz przekształacana jest do macierzy rzadkiej, a następnie macierz rzadka jest transformowana w `numpy` do tablicy."
249251
]
250252
},
251253
{
@@ -255,7 +257,7 @@
255257
"metadata": {},
256258
"outputs": [],
257259
"source": [
258-
"# Transform data into x, y, val array\n",
260+
"# Transformacja do x (kolumna), y (wiersz), wartość\n",
259261
"\n",
260262
"sparse_data = coo_matrix(surf_blurred)"
261263
]
@@ -267,7 +269,7 @@
267269
"metadata": {},
268270
"outputs": [],
269271
"source": [
270-
"# data, col, row == value, x, y\n",
272+
"# kolumna (col), wiersz (row), wartość (data) == x, y, wartość\n",
271273
"\n",
272274
"xyval = np.asarray([sparse_data.col, sparse_data.row, sparse_data.data]).T"
273275
]
@@ -276,11 +278,7 @@
276278
"cell_type": "markdown",
277279
"id": "331bea1b-b797-47ce-9e22-10614b64013c",
278280
"metadata": {},
279-
"source": [
280-
"We know the data - the effective range of correlation is set to seven units, because we set the mean filter to this size. \n",
281-
"\n",
282-
"With this knowledge, we will set `step_size` into 2 units and `max_range` into 20 (way above the actual maximum range, which is 7, but we show in this way how variograms behave at a large distance where there is no spatial correlation)."
283-
]
281+
"source": "Wiemy, że zasięg sąsiedztwa (`range`) wynosi siedem jednostek, więc z góry możemy założyć, że próg (`sill`) będzie umiejscowiony właśnie w tym punkcie. Ustawmy więc krok (`step_size`) na dwie jednostki, całkowity zasięg (`max_range`) na 20 jednostek i sprawdźmy jak wyglądaja semiwariancja."
284282
},
285283
{
286284
"cell_type": "code",
@@ -289,7 +287,7 @@
289287
"metadata": {},
290288
"outputs": [],
291289
"source": [
292-
"# Get experimental variogram\n",
290+
"# Stwórz eksperymentalny semiwariogram\n",
293291
"\n",
294292
"experimental = build_experimental_variogram(xyval, step_size=2, max_range=20)"
295293
]
@@ -320,13 +318,13 @@
320318
"id": "1bb3cdc6-1014-4096-a737-428b6dd7dd85",
321319
"metadata": {},
322320
"source": [
323-
"After examining the plot, we can set the theoretical variogram parameters.\n",
321+
"Po analize semiwariancji ustawiamy:\n",
324322
"\n",
325-
"- **nugget** to `0`,\n",
326-
"- **sill** to `1.3`,\n",
327-
"- **range** to `8`.\n",
323+
"- **nugget** na `0`,\n",
324+
"- **sill** na `1.3`,\n",
325+
"- **range** na `8`.\n",
328326
"\n",
329-
"We can create the theoretical variogram from scratch without calling the `build_theoretical_variogram()` function or the `TheoreticalVariogram` class. Those three parameters are all that we need for modeling."
327+
"Możemy stworzyć teoretyczny semiwarioragm bez używania klasy `TheoreticalVariogram`. Wystarczy znać model semiwariogramu i trzy parametry które go opisują. W dalszej części ręcznie przyporządkujemy kilka modeli teoretycznych."
330328
]
331329
},
332330
{
@@ -336,7 +334,7 @@
336334
"metadata": {},
337335
"outputs": [],
338336
"source": [
339-
"# Set nugget, sill and range\n",
337+
"# nugget, sill, range\n",
340338
"\n",
341339
"_nugget = 0\n",
342340
"_sill = 1.3\n",
@@ -348,9 +346,9 @@
348346
"id": "aff88b16-ccd4-40b8-9ced-9b38dc16b644",
349347
"metadata": {},
350348
"source": [
351-
"## Chapter 3: Fit variogram models\n",
349+
"## Część 3: dopasowanie modeli\n",
352350
"\n",
353-
"We have seven theoretical functions to model the experimental semivariances:\n",
351+
"Możemy wybierać spośród siedmiu teoretycznych modeli:\n",
354352
"\n",
355353
"- circular\n",
356354
"- cubic\n",
@@ -368,7 +366,7 @@
368366
"metadata": {},
369367
"outputs": [],
370368
"source": [
371-
"# Crete different models: circular, cubic, exponential, gaussian, linear, power, spherical\n",
369+
"# Stwórz różne dopasowania: circular, cubic, exponential, gaussian, linear, power, spherical\n",
372370
"\n",
373371
"circular = build_theoretical_variogram(\n",
374372
" experimental_variogram=experimental,\n",
@@ -424,9 +422,7 @@
424422
"cell_type": "markdown",
425423
"id": "4d249898-f66a-4601-b01b-cc4d44b89015",
426424
"metadata": {},
427-
"source": [
428-
"With all models calculated, let's take a look at their output. Before we jump into the last step, which model works optimally with the experimental variogram? (It is tricky question!)"
429-
]
425+
"source": "Sprawdźmy jak wyglądają poszczególne krzywe dopasowania. Zastanów się, która jest najlepsza?"
430426
},
431427
{
432428
"cell_type": "code",
@@ -594,23 +590,23 @@
594590
"id": "8fa9f80e-bd83-43ed-baf8-d53cf1204814",
595591
"metadata": {},
596592
"source": [
597-
"What was your guess?\n",
593+
"Jaki był twój wybór?\n",
598594
"\n",
599595
".\n",
600596
".\n",
601597
".\n",
602598
"\n",
603-
"I hope, that you have chosen `circular` or `linear` model! But we should be careful with the final opinion and even more careful if we let the algorithm decide which model is the best based on the **root mean squared error metric** (RMSE). For us, the best model is always the model that has the best fit for the closest distances. A model with low RMSE may be \"great\" with distances from 10 to 18... which oscillate around the sill of our data, and point pairs at those distances useless for weighting (weight is constant from some distance)."
599+
"Modele `circular` i `linear` są najlepiej dopasowane, ale nie powinniśmy określać dopasowania *na oko*, tylko na podstawie obliczenia błędu. Szczególnie dla bliskiego zakresu (`range`) bo te odległości mają największy wpływ na interpolację Krigingu."
604600
]
605601
},
606602
{
607603
"cell_type": "markdown",
608604
"id": "58144b62-dc21-4a9d-adc5-36ffa35d9bbe",
609605
"metadata": {},
610606
"source": [
611-
"## Chapter 4: Compare variogram models\n",
607+
"## Część 4: porównanie modeli teoretycznych\n",
612608
"\n",
613-
"The last part is a comparison of variogram models. We will still use our \"own eyes\" to decide which model is the best, but this time we will plot all of them in a single plot."
609+
"Porównajmy wszystkie modele na raz, na jednym rysunku."
614610
]
615611
},
616612
{
@@ -631,7 +627,7 @@
631627
}
632628
],
633629
"source": [
634-
"# Plot ALL models\n",
630+
"# Narysuj wszystkie krzywe dopasowania\n",
635631
"\n",
636632
"_lags = circular.lags\n",
637633
"\n",
@@ -662,9 +658,7 @@
662658
"cell_type": "markdown",
663659
"id": "1ef408a3-57ef-4db5-a94c-013db263ab67",
664660
"metadata": {},
665-
"source": [
666-
"We observe that the lowest distance from a modeled value to the experimental curve at small distances has linear model."
667-
]
661+
"source": "Najlepsze dopasowania dla bliskich zasięgów ma model `linear` - liniowy."
668662
},
669663
{
670664
"cell_type": "markdown",
@@ -679,11 +673,11 @@
679673
"id": "4d928adb-e337-47b0-bfb1-6cd1b8cd8195",
680674
"metadata": {},
681675
"source": [
682-
"## Changelog\n",
676+
"## Dziennik zmian\n",
683677
"\n",
684-
"| Date | Changes | Author |\n",
685-
"|------------|----------------------------------------------|----------------------------------|\n",
686-
"| 2025-02-28 | Tutorial has been adapted to the 1.0 release | @SimonMolinsky (Szymon Moliński) |"
678+
"| Data | Zmiany | Autor |\n",
679+
"|------------|------------------------------------------|----------------------------------|\n",
680+
"| 2025-08-27 | Samouczek przetłumaczony na język polski | @SimonMolinsky (Szymon Moliński) |"
687681
]
688682
},
689683
{

0 commit comments

Comments
 (0)