Commit c4d5582a authored by Bruno López Trigo's avatar Bruno López Trigo

Actualizada documentación e solucionada animación de carga en formulario

parent f6cb0227
......@@ -290,6 +290,9 @@ class FormFURIA extends Component {
);
}
} else if (this.props.classifierExists) {
this.setState({
loading: true
});
response = await buildClassifier(
this.props.dataset,
this.state.FURIAparams,
......
......@@ -274,6 +274,9 @@ class FormJ48 extends Component {
);
}
} else if (this.props.classifierExists) {
this.setState({
loading: true
});
response = await buildClassifier(
this.props.dataset,
this.state.J48params,
......
......@@ -273,6 +273,9 @@ class FormREP extends Component {
);
}
} else if (this.props.classifierExists) {
this.setState({
loading: true
});
response = await buildClassifier(
this.props.dataset,
this.state.REPparams,
......
......@@ -272,6 +272,9 @@ class FormRandom extends Component {
);
}
} else if (this.props.classifierExists) {
this.setState({
loading: true
});
response = await buildClassifier(
this.props.dataset,
this.state.Randomparams,
......
......@@ -141,7 +141,7 @@ export default class Rules extends Component {
noAreaGradient
verticalGrid
yTicks={3}
xTicks={5}
xTicks={3}
axisLabels={{
x: comp.attribute,
y: this.props.language.labels[this.props.language.id]
......@@ -162,7 +162,7 @@ export default class Rules extends Component {
noAreaGradient
verticalGrid
yTicks={3}
xTicks={5}
xTicks={3}
dataPoints
axisLabels={{
x: comp.attribute,
......
......@@ -25,6 +25,7 @@ import FormREP from "../components/builder/FormREP";
import FormRandom from "../components/builder/FormRandom";
import { Redirect } from "react-router-dom";
import FormFURIA from "../components/builder/FormFURIA";
import { getTree, getRules } from "../components/global/API";
const styles = theme => ({});
......@@ -35,8 +36,34 @@ class FormBuilder extends Component {
this.changeAlgorithm = this.changeAlgorithm.bind(this);
}
changeAlgorithm(algorithm) {
async changeAlgorithm(algorithm) {
this.props.changeAlgorithm(algorithm);
if (algorithm === "FURIA") {
var response = await getRules(
this.props.dataset,
algorithm,
this.props.language.id,
this.props.token
);
if (!response.error) {
this.setState({
redirect: true
});
}
} else {
response = await getTree(
this.props.dataset,
algorithm,
this.props.language.id,
this.props.token
);
console.log(response.error);
if (!response.error) {
this.setState({
redirect: true
});
}
}
}
render() {
......@@ -88,7 +115,8 @@ class FormBuilder extends Component {
closeSession={this.props.closeSession}
/>
)}
{!this.props.token ? <Redirect to="/" /> : ""}
{!this.props.token && <Redirect to="/" />}
{this.state.redirect && <Redirect to="/classifiers" />}
</Fragment>
);
}
......
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6840 64-bit) (preloaded format=pdflatex 2018.12.5) 20 DEC 2018 13:45
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6840 64-bit) (preloaded format=pdflatex 2018.12.5) 21 DEC 2018 11:44
entering extended mode
**./main.tex
(main.tex
......@@ -1084,12 +1084,12 @@ File: ./images/PaqueteBuilder.png Graphic file (type png)
Package pdftex.def Info: ./images/PaqueteBuilder.png used on input line 363.
(pdftex.def) Requested size: 125.12099pt x 163.27937pt.
[7]
<./images/PaqueteClassifiers.png, id=348, 369.17924pt x 428.19975pt>
<./images/PaqueteClassifiers.png, id=348, 408.92775pt x 413.74574pt>
File: ./images/PaqueteClassifiers.png Graphic file (type png)
<use ./images/PaqueteClassifiers.png>
Package pdftex.def Info: ./images/PaqueteClassifiers.png used on input line 38
6.
(pdftex.def) Requested size: 250.24199pt x 290.2507pt.
(pdftex.def) Requested size: 250.24199pt x 253.19263pt.
[8 <./images/PaqueteModelsFuzzy.png>]
<./images/PaqueteExplainer.png, id=358, 569.7285pt x 480.5955pt>
......@@ -1151,12 +1151,12 @@ Overfull \hbox (4.52092pt too wide) in paragraph at lines 1026--1027
[][][][][][][][][][][][][][][][][][][][][][][][]
[]
<./images/Administrar.png, id=632, 1155.71774pt x 486.618pt>
<./images/Administrar.png, id=633, 1155.71774pt x 486.618pt>
File: ./images/Administrar.png Graphic file (type png)
<use ./images/Administrar.png>
Package pdftex.def Info: ./images/Administrar.png used on input line 1041.
(pdftex.def) Requested size: 500.484pt x 210.73412pt.
<./images/Formulario.png, id=634, 373.395pt x 553.31718pt>
<./images/Formulario.png, id=635, 373.395pt x 553.31718pt>
File: ./images/Formulario.png Graphic file (type png)
<use ./images/Formulario.png>
Package pdftex.def Info: ./images/Formulario.png used on input line 1050.
......@@ -1165,12 +1165,12 @@ Package pdftex.def Info: ./images/Formulario.png used on input line 1050.
Underfull \vbox (badness 10000) has occurred while \output is active []
[24 <./images/Administrar.png>]
<./images/Id.png, id=655, 451.6875pt x 55.407pt>
<./images/Id.png, id=656, 451.6875pt x 55.407pt>
File: ./images/Id.png Graphic file (type png)
<use ./images/Id.png>
Package pdftex.def Info: ./images/Id.png used on input line 1068.
(pdftex.def) Requested size: 250.24199pt x 30.69713pt.
<./images/ReactRouterGa.png, id=657, 380.622pt x 233.673pt>
<./images/ReactRouterGa.png, id=658, 380.622pt x 233.673pt>
File: ./images/ReactRouterGa.png Graphic file (type png)
<use ./images/ReactRouterGa.png>
Package pdftex.def Info: ./images/ReactRouterGa.png used on input line 1077.
......@@ -1519,29 +1519,29 @@ es confundido con [class_j] un [confusion]%. [Instancia 1],
LaTeX Font Info: Font shape `T1/ptm/bx/it' in size <10> not available
(Font) Font shape `T1/ptm/b/it' tried instead on input line 1437.
[33]
<./images/Network.png, id=727, 926.2605pt x 396.88275pt>
<./images/Network.png, id=728, 926.2605pt x 396.88275pt>
File: ./images/Network.png Graphic file (type png)
<use ./images/Network.png>
Package pdftex.def Info: ./images/Network.png used on input line 1478.
(pdftex.def) Requested size: 500.484pt x 214.44672pt.
[34]
<./images/NetworkOut.png, id=738, 925.056pt x 394.47375pt>
<./images/NetworkOut.png, id=739, 925.056pt x 394.47375pt>
File: ./images/NetworkOut.png Graphic file (type png)
<use ./images/NetworkOut.png>
Package pdftex.def Info: ./images/NetworkOut.png used on input line 1485.
(pdftex.def) Requested size: 500.484pt x 213.42195pt.
<./images/NetworkIP.png, id=740, 922.647pt x 393.8715pt>
<./images/NetworkIP.png, id=741, 922.647pt x 393.8715pt>
File: ./images/NetworkIP.png Graphic file (type png)
<use ./images/NetworkIP.png>
Package pdftex.def Info: ./images/NetworkIP.png used on input line 1492.
(pdftex.def) Requested size: 500.484pt x 213.65504pt.
[35 <./images/Network.png> <./images/NetworkOut.png>]
<./images/NetworkNAT.png, id=757, 925.056pt x 511.9125pt>
<./images/NetworkNAT.png, id=758, 925.056pt x 511.9125pt>
File: ./images/NetworkNAT.png Graphic file (type png)
<use ./images/NetworkNAT.png>
Package pdftex.def Info: ./images/NetworkNAT.png used on input line 1499.
(pdftex.def) Requested size: 500.484pt x 276.9598pt.
<./images/NetworkFirewall.png, id=759, 923.24925pt x 391.4625pt>
<./images/NetworkFirewall.png, id=760, 923.24925pt x 391.4625pt>
File: ./images/NetworkFirewall.png Graphic file (type png)
<use ./images/NetworkFirewall.png>
Package pdftex.def Info: ./images/NetworkFirewall.png used on input line 1506.
......@@ -1551,7 +1551,7 @@ Package pdftex.def Info: ./images/NetworkFirewall.png used on input line 1506.
Underfull \vbox (badness 1590) has occurred while \output is active []
[36 <./images/NetworkIP.png> <./images/NetworkNAT.png>]
<./images/NetworkPorts.png, id=772, 923.24925pt x 394.47375pt>
<./images/NetworkPorts.png, id=773, 923.24925pt x 394.47375pt>
File: ./images/NetworkPorts.png Graphic file (type png)
<use ./images/NetworkPorts.png>
Package pdftex.def Info: ./images/NetworkPorts.png used on input line 1518.
......@@ -1577,7 +1577,7 @@ Overfull \hbox (3.52113pt too wide) in paragraph at lines 1581--1582
[][][][][][][][]
[]
<./images/Desplegar.png, id=784, 1131.62775pt x 69.25874pt>
<./images/Desplegar.png, id=785, 1131.62775pt x 69.25874pt>
File: ./images/Desplegar.png Graphic file (type png)
<use ./images/Desplegar.png>
Package pdftex.def Info: ./images/Desplegar.png used on input line 1590.
......@@ -1598,7 +1598,7 @@ Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 1642.
Here is how much of TeX's memory you used:
30195 strings out of 492970
576236 string characters out of 3126594
941464 words of memory out of 3000000
942464 words of memory out of 3000000
33153 multiletter control sequences out of 15000+200000
627749 words of font info for 282 fonts, out of 3000000 for 9000
1141 hyphenation exceptions out of 8191
......@@ -1615,14 +1615,15 @@ ta/Local/Programs/MiKTeX 2.9/fonts/type1/urw/courier/ucrr8a.pfb><C:/Users/bruno
s/bruno/AppData/Local/Programs/MiKTeX 2.9/fonts/type1/urw/helvetic/uhvbo8a.pfb>
<C:/Users/bruno/AppData/Local/Programs/MiKTeX 2.9/fonts/type1/urw/helvetic/uhvr
8a.pfb><C:/Users/bruno/AppData/Local/Programs/MiKTeX 2.9/fonts/type1/urw/symbol
/usyr.pfb><C:/Users/bruno/AppData/Local/Programs/MiKTeX 2.9/fonts/type1/urw/tim
es/utmb8a.pfb><C:/Users/bruno/AppData/Local/Programs/MiKTeX 2.9/fonts/type1/urw
/times/utmbi8a.pfb><C:/Users/bruno/AppData/Local/Programs/MiKTeX 2.9/fonts/type
1/urw/times/utmr8a.pfb><C:/Users/bruno/AppData/Local/Programs/MiKTeX 2.9/fonts/
type1/urw/times/utmri8a.pfb>
Output written on main.pdf (42 pages, 1356465 bytes).
/usyr.pfb><C:/Users/bruno/AppData/Local/Programs/MiKTeX 2.9/fonts/type1/urw/sym
bol/usyr.pfb><C:/Users/bruno/AppData/Local/Programs/MiKTeX 2.9/fonts/type1/urw/
times/utmb8a.pfb><C:/Users/bruno/AppData/Local/Programs/MiKTeX 2.9/fonts/type1/
urw/times/utmbi8a.pfb><C:/Users/bruno/AppData/Local/Programs/MiKTeX 2.9/fonts/t
ype1/urw/times/utmr8a.pfb><C:/Users/bruno/AppData/Local/Programs/MiKTeX 2.9/fon
ts/type1/urw/times/utmri8a.pfb>
Output written on main.pdf (42 pages, 1360124 bytes).
PDF statistics:
970 PDF objects out of 1000 (max. 8388607)
974 PDF objects out of 1000 (max. 8388607)
358 named destinations out of 1000 (max. 500000)
52154 words of extra memory for PDF output out of 61914 (max. 10000000)
......@@ -870,27 +870,27 @@ Para una mayor comprensión de la interpretación de un árbol de decisión, se
La construcción del modelo basado en reglas borrosas es análoga al procedimiento de la construcción de árboles de decisión. Por esta razón, primero debemos comprender el modelo que representa a las reglas borrosas. Empezaremos por comprender la unidad mínima de la regla, que es cada uno de los antecedentes que la componen. Los antecedentes de las reglas borrosas representan una condición, en forma de intervalos (para los atributos numéricos) o directamente una comparación para los atributos categóricos. En el caso de los antecedentes numéricos, podemos entender gráficamente los intervalos como una función a trozos que dibujan un trapecio. Los antecedentes numéricos tienen la forma [A, B, C, D]. La interpretación habitual de la regla sería:
\begin{itemize}
\item $x <= A$ entonces $x = 0$
\item $x \in (A,B)$ entonces $x$ tiene un cierto grado de activación entre $(0,1)$
\item $x \in [B,C]$ entonces $x = 1$
\item $x \in (C,D)$ entonces $x$ tiene un cierto grado de activación entre $(0,1)$
\item $x >= D$ entonces $x = 0$
\item $x <= A$ entonces $\mu(x) = 0$
\item $x \in (A,B)$ entonces $\mu(x)$ tiene un cierto grado de activación entre $(0,1)$
\item $x \in [B,C]$ entonces $\mu(x) = 1$
\item $x \in (C,D)$ entonces $\mu(x)$ tiene un cierto grado de activación entre $(0,1)$
\item $x >= D$ entonces $\mu(x) = 0$
\end{itemize}
Existen casos especiales donde $A=B$, cuya interpretación sería:
\begin{itemize}
\item $x \in (-\infty,C]$ entonces $x = 1$
\item $x \in (C,D)$ entonces $x$ tiene un cierto grado de activación entre $(0,1)$
\item $x => D$ entonces $x = 0$
\item $x \in (-\infty,C]$ entonces $\mu(x) = 1$
\item $x \in (C,D)$ entonces $\mu(x)$ tiene un cierto grado de activación entre $(0,1)$
\item $x => D$ entonces $\mu(x) = 0$
\end{itemize}
O bien el caso donde $C=D$:
\begin{itemize}
\item $x <= A$ entonces $x = 0$
\item $x \in (A,B)$ entonces $x$ tiene un cierto grado de activación entre $(0,1)$
\item $x \in [B,+\infty)$ entonces $x = 1$
\item $x <= A$ entonces $\mu(x) = 0$
\item $x \in (A,B)$ entonces $\mu(x)$ tiene un cierto grado de activación entre $(0,1)$
\item $x \in [B,+\infty)$ entonces $\mu(x) = 1$
\end{itemize}
Teniendo en cuenta los casos anteriores solo queda determinar cuál es el grado de activación para los intervalos $(A,B)$ y $(C,D)$. Para comprender mejor la activación de dichos intervalos podemos fijarnos en la representación de trapecio de la figura \ref{fig:fuzzyrule}.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment